blob: 751630136c4fb93d489e68362581b4b4d2f6294b [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002# From configure.in Revision: 56782 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004# Generated by GNU Autoconf 2.59 for python 3.0.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Skip Montanaroeb33e5a2007-08-17 12:57:41 +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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015# Be Bourne compatible
Martin v. Löwis11437992002-04-12 09:54:03 +000016if 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+"$@"}'='"$@"'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
23 set -o posix
24fi
25DUALCASE=1; export DUALCASE # for MKS sh
Thomas Wouters89f507f2006-12-13 04:49:30 +000026
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027# Support unset when possible.
28if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
29 as_unset=unset
30else
31 as_unset=false
Martin v. Löwis11437992002-04-12 09:54:03 +000032fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000033
34
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000035# 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
47 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
48 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
Martin v. Löwis11437992002-04-12 09:54:03 +000067
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000068# Name of the executable.
69as_me=`$as_basename "$0" ||
70$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
80
81# PATH needs CR, and LINENO needs CR and PATH.
Martin v. Löwis11437992002-04-12 09:54:03 +000082# 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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000103 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
Martin v. Löwis11437992002-04-12 09:54:03 +0000113for 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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000120 ;;
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
Martin v. Löwis11437992002-04-12 09:54:03 +0000126 fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000127 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 '')
Martin v. Löwis11437992002-04-12 09:54:03 +0000133 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000134for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000135do
136 IFS=$as_save_IFS
137 test -z "$as_dir" && as_dir=.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000138 for as_base in sh bash ksh sh5; do
139 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000140 /*)
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000141 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
147 $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; }
149 CONFIG_SHELL=$as_dir/$as_base
150 export CONFIG_SHELL
151 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
152 fi;;
153 esac
154 done
Thomas Wouters477c8d52006-05-27 19:21:47 +0000155done
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000156;;
157 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000158
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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000161 # 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.
Martin v. Löwis11437992002-04-12 09:54:03 +0000165 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000166 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
167 sed '=' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000168 sed '
169 N
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000170 s,$,-,
171 : loop
172 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
Martin v. Löwis11437992002-04-12 09:54:03 +0000173 t loop
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000174 s,-$,,
175 s,^['$as_cr_digits']*\n,,
Martin v. Löwis11437992002-04-12 09:54:03 +0000176 ' >$as_me.lineno &&
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000177 chmod +x $as_me.lineno ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000178 { 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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000183 # original and so on. Autoconf is especially sensible to this).
184 . ./$as_me.lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000185 # Exit status is that of the last command.
186 exit
187}
188
189
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000190case `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= ;;
Martin v. Löwis11437992002-04-12 09:54:03 +0000195esac
196
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000197if expr a : '\(a\)' >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000198 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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000206 # 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
Martin v. Löwis11437992002-04-12 09:54:03 +0000210 as_ln_s='cp -p'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000211 else
212 as_ln_s='ln -s'
213 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000214elif ln conf$$.file conf$$ 2>/dev/null; then
215 as_ln_s=ln
216else
217 as_ln_s='cp -p'
218fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000219rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwis11437992002-04-12 09:54:03 +0000220
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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000228as_executable_p="test -f"
Martin v. Löwis11437992002-04-12 09:54:03 +0000229
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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000237# IFS
238# We need space, tab and new line, in precisely that order.
239as_nl='
240'
241IFS=" $as_nl"
Martin v. Löwis11437992002-04-12 09:54:03 +0000242
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000243# CDPATH.
244$as_unset CDPATH
245
Martin v. Löwis11437992002-04-12 09:54:03 +0000246
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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000252exec 6>&1
253
Martin v. Löwis11437992002-04-12 09:54:03 +0000254#
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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000265# 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
Martin v. Löwis11437992002-04-12 09:54:03 +0000270# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000271PACKAGE_NAME='python'
272PACKAGE_TARNAME='python'
Guido van Rossum0c4eb622006-03-30 16:19:24 +0000273PACKAGE_VERSION='3.0'
274PACKAGE_STRING='python 3.0'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000275PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
Martin v. Löwis11437992002-04-12 09:54:03 +0000276
277ac_unique_file="Include/object.h"
278# Factoring default headers for most tests.
279ac_includes_default="\
280#include <stdio.h>
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000281#if HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000282# include <sys/types.h>
283#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000284#if HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000285# include <sys/stat.h>
286#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000287#if STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000288# include <stdlib.h>
289# include <stddef.h>
290#else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000291# if HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000292# include <stdlib.h>
293# endif
294#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000295#if HAVE_STRING_H
296# if !STDC_HEADERS && HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000297# include <memory.h>
298# endif
299# include <string.h>
300#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000301#if HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000302# include <strings.h>
303#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000304#if HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000305# include <inttypes.h>
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000306#else
307# if HAVE_STDINT_H
308# include <stdint.h>
309# endif
Thomas Wouters477c8d52006-05-27 19:21:47 +0000310#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000311#if HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000312# include <unistd.h>
313#endif"
314
Skip Montanaroeb33e5a2007-08-17 12:57:41 +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 UNIVERSALSDK PYTHONFRAMEWORK PYTHONFRAMEWORKDIR PYTHONFRAMEWORKPREFIX PYTHONFRAMEWORKINSTALLDIR FRAMEWORKINSTALLFIRST FRAMEWORKINSTALLLAST FRAMEWORKALTINSTALLFIRST FRAMEWORKALTINSTALLLAST FRAMEWORKUNIXTOOLSPREFIX MACHDEP SGI_ABI EXTRAPLATDIR EXTRAMACHDEPPATH CONFIGURE_MACOSX_DEPLOYMENT_TARGET EXPORT_MACOSX_DEPLOYMENT_TARGET CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX MAINCC CPP EGREP BUILDEXEEXT LIBRARY LDLIBRARY DLLLIBRARY BLDLIBRARY LDLIBRARYDIR INSTSONAME RUNSHARED LINKCC RANLIB ac_ct_RANLIB AR SVNVERSION INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN OPT BASECFLAGS OTHER_LIBTOOL_OPT LIBTOOL_CRUFT SO LDSHARED BLDSHARED CCSHARED LINKFORSHARED CFLAGSFORSHARED SHLIBS USE_SIGNAL_MODULE SIGNAL_OBJS USE_THREAD_MODULE LDLAST THREADOBJ DLINCLDIR DYNLOADFILE MACHDEP_OBJS TRUE LIBOBJS HAVE_GETHOSTBYNAME_R_6_ARG HAVE_GETHOSTBYNAME_R_5_ARG HAVE_GETHOSTBYNAME_R_3_ARG HAVE_GETHOSTBYNAME_R HAVE_GETHOSTBYNAME LIBM LIBC UNICODE_OBJS THREADHEADERS SRCDIRS LTLIBOBJS'
Skip Montanaro6dead952003-09-25 14:50:04 +0000316ac_subst_files=''
Guido van Rossum627b2d71993-12-24 10:39:16 +0000317
Guido van Rossum7f43da71994-08-01 12:15:30 +0000318# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000319ac_init_help=
320ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000321# The variables have the same names as the options, with
322# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000323cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000324exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000325no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000326no_recursion=
327prefix=NONE
328program_prefix=NONE
329program_suffix=NONE
330program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000331silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000332site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000333srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000334verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000335x_includes=NONE
336x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000337
338# Installation directory options.
339# These are left unexpanded so users can "make install exec_prefix=/foo"
340# and all the variables that are supposed to be based on exec_prefix
341# by default will actually change.
342# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000343bindir='${exec_prefix}/bin'
344sbindir='${exec_prefix}/sbin'
345libexecdir='${exec_prefix}/libexec'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000346datadir='${prefix}/share'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000347sysconfdir='${prefix}/etc'
348sharedstatedir='${prefix}/com'
349localstatedir='${prefix}/var'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000350libdir='${exec_prefix}/lib'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000351includedir='${prefix}/include'
352oldincludedir='/usr/include'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000353infodir='${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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000361 eval "$ac_prev=\$ac_option"
Guido van Rossum7f43da71994-08-01 12:15:30 +0000362 ac_prev=
363 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000364 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000365
Skip Montanaroeb33e5a2007-08-17 12:57:41 +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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000392 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000393 ac_prev=datadir ;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000394 -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.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000401 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000402 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
403 { (exit 1); exit 1; }; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000404 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.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000410 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000411 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
412 { (exit 1); exit 1; }; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000413 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
414 case $ac_option in
415 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
416 *) ac_optarg=yes ;;
417 esac
418 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 \
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000470 | --localstate | --localstat | --localsta | --localst \
471 | --locals | --local | --loca | --loc | --lo)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000472 ac_prev=localstatedir ;;
473 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000474 | --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.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000592 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000593 { echo "$as_me: error: invalid package name: $ac_package" >&2
594 { (exit 1); exit 1; }; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000595 ac_package=`echo $ac_package| sed 's/-/_/g'`
596 case $ac_option in
597 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
598 *) ac_optarg=yes ;;
599 esac
600 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.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000605 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
Martin v. Löwis11437992002-04-12 09:54:03 +0000606 { echo "$as_me: error: invalid package name: $ac_package" >&2
607 { (exit 1); exit 1; }; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000608 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; }; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000640 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
641 eval "$ac_envvar='$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000642 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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000661# Be sure to have absolute paths.
662for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000663do
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000664 eval ac_val=$`echo $ac_var`
Martin v. Löwis11437992002-04-12 09:54:03 +0000665 case $ac_val in
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000666 [\\/$]* | ?:[\\/]* | 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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000670done
671
672# Be sure to have absolute paths.
673for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
674 localstatedir libdir includedir oldincludedir infodir mandir
675do
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
Martin v. Löwis11437992002-04-12 09:54:03 +0000682done
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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000711 # Try the directory containing this script, then its parent.
712 ac_confdir=`(dirname "$0") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000713$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +0000714 X"$0" : 'X\(//\)[^/]' \| \
715 X"$0" : 'X\(//\)$' \| \
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000716 X"$0" : 'X\(/\)' \| \
717 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000718echo X"$0" |
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000719 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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000725 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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000731if test ! -r $srcdir/$ac_unique_file; then
732 if test "$ac_srcdir_defaulted" = yes; then
733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000734 { (exit 1); exit 1; }; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000735 else
736 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +0000737 { (exit 1); exit 1; }; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000738 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +0000739fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +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; }; }
743srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
744ac_env_build_alias_set=${build_alias+set}
745ac_env_build_alias_value=$build_alias
746ac_cv_env_build_alias_set=${build_alias+set}
747ac_cv_env_build_alias_value=$build_alias
748ac_env_host_alias_set=${host_alias+set}
749ac_env_host_alias_value=$host_alias
750ac_cv_env_host_alias_set=${host_alias+set}
751ac_cv_env_host_alias_value=$host_alias
752ac_env_target_alias_set=${target_alias+set}
753ac_env_target_alias_value=$target_alias
754ac_cv_env_target_alias_set=${target_alias+set}
755ac_cv_env_target_alias_value=$target_alias
756ac_env_CC_set=${CC+set}
757ac_env_CC_value=$CC
758ac_cv_env_CC_set=${CC+set}
759ac_cv_env_CC_value=$CC
760ac_env_CFLAGS_set=${CFLAGS+set}
761ac_env_CFLAGS_value=$CFLAGS
762ac_cv_env_CFLAGS_set=${CFLAGS+set}
763ac_cv_env_CFLAGS_value=$CFLAGS
764ac_env_LDFLAGS_set=${LDFLAGS+set}
765ac_env_LDFLAGS_value=$LDFLAGS
766ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
767ac_cv_env_LDFLAGS_value=$LDFLAGS
768ac_env_CPPFLAGS_set=${CPPFLAGS+set}
769ac_env_CPPFLAGS_value=$CPPFLAGS
770ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
771ac_cv_env_CPPFLAGS_value=$CPPFLAGS
772ac_env_CPP_set=${CPP+set}
773ac_env_CPP_value=$CPP
774ac_cv_env_CPP_set=${CPP+set}
775ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000776
Martin v. Löwis11437992002-04-12 09:54:03 +0000777#
778# Report the --help message.
779#
780if test "$ac_init_help" = "long"; then
781 # Omit some internal or obsolete options to make the list less imposing.
782 # This message is too long to be a string in the A/UX 3.1 sh.
783 cat <<_ACEOF
Guido van Rossum0c4eb622006-03-30 16:19:24 +0000784\`configure' configures python 3.0 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000785
786Usage: $0 [OPTION]... [VAR=VALUE]...
787
788To assign environment variables (e.g., CC, CFLAGS...), specify them as
789VAR=VALUE. See below for descriptions of some of the useful variables.
790
791Defaults for the options are specified in brackets.
792
793Configuration:
794 -h, --help display this help and exit
795 --help=short display options specific to this package
796 --help=recursive display the short help of all the included packages
797 -V, --version display version information and exit
798 -q, --quiet, --silent do not print \`checking...' messages
799 --cache-file=FILE cache test results in FILE [disabled]
800 -C, --config-cache alias for \`--cache-file=config.cache'
801 -n, --no-create do not create output files
802 --srcdir=DIR find the sources in DIR [configure dir or \`..']
803
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000804_ACEOF
805
806 cat <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +0000807Installation 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]
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000824 --datadir=DIR read-only architecture-independent data [PREFIX/share]
Martin v. Löwis11437992002-04-12 09:54:03 +0000825 --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]
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000831 --infodir=DIR info documentation [PREFIX/info]
832 --mandir=DIR man documentation [PREFIX/man]
Martin v. Löwis11437992002-04-12 09:54:03 +0000833_ACEOF
834
835 cat <<\_ACEOF
836_ACEOF
837fi
838
839if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000840 case $ac_init_help in
Guido van Rossum0c4eb622006-03-30 16:19:24 +0000841 short | recursive ) echo "Configuration of python 3.0:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +0000842 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000843 cat <<\_ACEOF
844
845Optional Features:
846 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
847 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Thomas Wouters477c8d52006-05-27 19:21:47 +0000848 --enable-universalsdk[SDKDIR]
849 Build agains Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000850 --enable-framework[=INSTALLDIR]
851 Build (MacOSX|Darwin) framework
852 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +0000853 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000854 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
855 --enable-ipv6 Enable ipv6 (with ipv4) support
856 --disable-ipv6 Disable ipv6 support
857 --enable-unicode[=ucs[24]]
858 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000859
860Optional Packages:
861 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
862 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000863 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000864 --with-cxx-main=<compiler>
865 compile main() and link python executable with C++
866 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000867 --with-suffix=.exe set executable suffix
868 --with-pydebug build with Py_DEBUG defined
869 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +0000870 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000871 --with-signal-module disable/enable signal module
872 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
873 --with(out)-threads[=DIRECTORY]
874 disable/enable thread support
875 --with(out)-thread[=DIRECTORY]
876 deprecated; use --with(out)-threads
877 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000878 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +0000879 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000880 --with(out)-pymalloc disable/enable specialized mallocs
881 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000882 --with-fpectl enable SIGFPE catching
883 --with-libm=STRING math library
884 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000885
886Some influential environment variables:
887 CC C compiler command
888 CFLAGS C compiler flags
889 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
890 nonstandard directory <lib dir>
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000891 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
892 headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +0000893 CPP C preprocessor
894
895Use these variables to override the choices made by `configure' or to help
896it to find libraries and programs with nonstandard names/locations.
897
Martin v. Löwis1d459062005-03-14 21:23:33 +0000898Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +0000899_ACEOF
900fi
901
902if test "$ac_init_help" = "recursive"; then
903 # If there are subdirs, report their specific --help.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000904 ac_popdir=`pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000905 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000906 test -d $ac_dir || continue
Martin v. Löwis11437992002-04-12 09:54:03 +0000907 ac_builddir=.
908
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000909if test "$ac_dir" != .; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000910 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000911 # A "../" for each directory in $ac_dir_suffix.
912 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
913else
914 ac_dir_suffix= ac_top_builddir=
915fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000916
917case $srcdir in
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000918 .) # No --srcdir option. We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 ac_srcdir=.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000920 if test -z "$ac_top_builddir"; then
921 ac_top_srcdir=.
922 else
923 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
924 fi ;;
925 [\\/]* | ?:[\\/]* ) # Absolute path.
Martin v. Löwis11437992002-04-12 09:54:03 +0000926 ac_srcdir=$srcdir$ac_dir_suffix;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000927 ac_top_srcdir=$srcdir ;;
928 *) # Relative path.
929 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
930 ac_top_srcdir=$ac_top_builddir$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +0000931esac
Skip Montanarof0d5f792004-08-15 14:08:23 +0000932
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000933# Do not use `cd foo && pwd` to compute absolute paths, because
934# the directories may not exist.
935case `pwd` in
936.) ac_abs_builddir="$ac_dir";;
937*)
938 case "$ac_dir" in
939 .) ac_abs_builddir=`pwd`;;
940 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
941 *) ac_abs_builddir=`pwd`/"$ac_dir";;
942 esac;;
943esac
944case $ac_abs_builddir in
945.) ac_abs_top_builddir=${ac_top_builddir}.;;
946*)
947 case ${ac_top_builddir}. in
948 .) ac_abs_top_builddir=$ac_abs_builddir;;
949 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
950 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
951 esac;;
952esac
953case $ac_abs_builddir in
954.) ac_abs_srcdir=$ac_srcdir;;
955*)
956 case $ac_srcdir in
957 .) ac_abs_srcdir=$ac_abs_builddir;;
958 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
959 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
960 esac;;
961esac
962case $ac_abs_builddir in
963.) ac_abs_top_srcdir=$ac_top_srcdir;;
964*)
965 case $ac_top_srcdir in
966 .) ac_abs_top_srcdir=$ac_abs_builddir;;
967 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
968 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
969 esac;;
970esac
971
972 cd $ac_dir
973 # Check for guested configure; otherwise get Cygnus style configure.
974 if test -f $ac_srcdir/configure.gnu; then
975 echo
976 $SHELL $ac_srcdir/configure.gnu --help=recursive
977 elif test -f $ac_srcdir/configure; then
978 echo
979 $SHELL $ac_srcdir/configure --help=recursive
980 elif test -f $ac_srcdir/configure.ac ||
981 test -f $ac_srcdir/configure.in; then
982 echo
983 $ac_configure --help
Martin v. Löwis11437992002-04-12 09:54:03 +0000984 else
985 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000986 fi
987 cd $ac_popdir
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 done
989fi
990
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000991test -n "$ac_init_help" && exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +0000992if $ac_init_version; then
993 cat <<\_ACEOF
Guido van Rossum0c4eb622006-03-30 16:19:24 +0000994python configure 3.0
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000995generated by GNU Autoconf 2.59
Martin v. Löwis11437992002-04-12 09:54:03 +0000996
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000997Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +0000998This configure script is free software; the Free Software Foundation
999gives unlimited permission to copy, distribute and modify it.
1000_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001001 exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001002fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001003exec 5>config.log
1004cat >&5 <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001005This file contains any messages produced by compilers while
1006running configure, to aid debugging if configure makes a mistake.
1007
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001008It was created by python $as_me 3.0, which was
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001009generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001010
1011 $ $0 $@
1012
1013_ACEOF
1014{
1015cat <<_ASUNAME
1016## --------- ##
1017## Platform. ##
1018## --------- ##
1019
1020hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1021uname -m = `(uname -m) 2>/dev/null || echo unknown`
1022uname -r = `(uname -r) 2>/dev/null || echo unknown`
1023uname -s = `(uname -s) 2>/dev/null || echo unknown`
1024uname -v = `(uname -v) 2>/dev/null || echo unknown`
1025
1026/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1027/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1028
1029/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1030/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1031/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001032hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001033/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1034/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1035/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1036
1037_ASUNAME
1038
1039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1040for as_dir in $PATH
1041do
1042 IFS=$as_save_IFS
1043 test -z "$as_dir" && as_dir=.
1044 echo "PATH: $as_dir"
1045done
1046
1047} >&5
1048
1049cat >&5 <<_ACEOF
1050
1051
1052## ----------- ##
1053## Core tests. ##
1054## ----------- ##
1055
1056_ACEOF
1057
1058
1059# Keep a trace of the command line.
1060# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001061# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001062# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001063# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001064ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001065ac_configure_args0=
1066ac_configure_args1=
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001067ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001068ac_must_keep_next=false
1069for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001070do
Skip Montanaro6dead952003-09-25 14:50:04 +00001071 for ac_arg
1072 do
1073 case $ac_arg in
1074 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1075 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1076 | -silent | --silent | --silen | --sile | --sil)
1077 continue ;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001078 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
Skip Montanaro6dead952003-09-25 14:50:04 +00001079 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1080 esac
1081 case $ac_pass in
1082 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1083 2)
1084 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1085 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001086 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001087 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001088 case $ac_arg in
1089 *=* | --config-cache | -C | -disable-* | --disable-* \
1090 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1091 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1092 | -with-* | --with-* | -without-* | --without-* | --x)
1093 case "$ac_configure_args0 " in
1094 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1095 esac
1096 ;;
1097 -* ) ac_must_keep_next=true ;;
1098 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001099 fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001100 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1101 # Get rid of the leading space.
1102 ac_sep=" "
Skip Montanaro6dead952003-09-25 14:50:04 +00001103 ;;
1104 esac
1105 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001106done
Skip Montanaro6dead952003-09-25 14:50:04 +00001107$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1108$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 +00001109
1110# When interrupted or exit'd, cleanup temporary files, and complete
1111# config.log. We remove comments because anyway the quotes in there
1112# would cause problems or look ugly.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001113# WARNING: Be sure not to use single quotes in there, as some shells,
1114# such as our DU 5.0 friend, will then `close' the trap.
Martin v. Löwis11437992002-04-12 09:54:03 +00001115trap 'exit_status=$?
1116 # Save into config.log some information that might help in debugging.
1117 {
1118 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001119
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 cat <<\_ASBOX
1121## ---------------- ##
1122## Cache variables. ##
1123## ---------------- ##
1124_ASBOX
1125 echo
1126 # The following way of writing the cache mishandles newlines in values,
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001127{
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 (set) 2>&1 |
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001129 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1130 *ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 sed -n \
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001132 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1133 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 ;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001135 *)
1136 sed -n \
1137 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1138 ;;
1139 esac;
1140}
Martin v. Löwis11437992002-04-12 09:54:03 +00001141 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001142
1143 cat <<\_ASBOX
1144## ----------------- ##
1145## Output variables. ##
1146## ----------------- ##
1147_ASBOX
1148 echo
1149 for ac_var in $ac_subst_vars
1150 do
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001151 eval ac_val=$`echo $ac_var`
1152 echo "$ac_var='"'"'$ac_val'"'"'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001153 done | sort
1154 echo
1155
1156 if test -n "$ac_subst_files"; then
1157 cat <<\_ASBOX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001158## ------------- ##
1159## Output files. ##
1160## ------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001161_ASBOX
1162 echo
1163 for ac_var in $ac_subst_files
1164 do
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001165 eval ac_val=$`echo $ac_var`
1166 echo "$ac_var='"'"'$ac_val'"'"'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001167 done | sort
1168 echo
1169 fi
1170
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 if test -s confdefs.h; then
1172 cat <<\_ASBOX
1173## ----------- ##
1174## confdefs.h. ##
1175## ----------- ##
1176_ASBOX
1177 echo
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001178 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001179 echo
1180 fi
1181 test "$ac_signal" != 0 &&
1182 echo "$as_me: caught signal $ac_signal"
1183 echo "$as_me: exit $exit_status"
1184 } >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001185 rm -f core *.core &&
1186 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 exit $exit_status
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001188 ' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001189for ac_signal in 1 2 13 15; do
1190 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1191done
1192ac_signal=0
1193
1194# confdefs.h avoids OS command line length limits that DEFS can exceed.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001195rm -rf conftest* confdefs.h
1196# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1197echo >confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001198
1199# Predefined preprocessor variables.
1200
1201cat >>confdefs.h <<_ACEOF
1202#define PACKAGE_NAME "$PACKAGE_NAME"
1203_ACEOF
1204
1205
1206cat >>confdefs.h <<_ACEOF
1207#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1208_ACEOF
1209
1210
1211cat >>confdefs.h <<_ACEOF
1212#define PACKAGE_VERSION "$PACKAGE_VERSION"
1213_ACEOF
1214
1215
1216cat >>confdefs.h <<_ACEOF
1217#define PACKAGE_STRING "$PACKAGE_STRING"
1218_ACEOF
1219
1220
1221cat >>confdefs.h <<_ACEOF
1222#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1223_ACEOF
1224
1225
1226# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001227# Prefer explicitly selected file to automatically selected ones.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001228if test -z "$CONFIG_SITE"; then
1229 if test "x$prefix" != xNONE; then
1230 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1231 else
1232 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1233 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001234fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001235for ac_site_file in $CONFIG_SITE; do
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001236 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1238echo "$as_me: loading site script $ac_site_file" >&6;}
1239 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001240 . "$ac_site_file"
1241 fi
1242done
1243
1244if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 # Some versions of bash will fail to source /dev/null (special
1246 # files actually), so we avoid doing that.
1247 if test -f "$cache_file"; then
1248 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1249echo "$as_me: loading cache $cache_file" >&6;}
1250 case $cache_file in
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001251 [\\/]* | ?:[\\/]* ) . $cache_file;;
1252 *) . ./$cache_file;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001253 esac
1254 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001255else
Martin v. Löwis11437992002-04-12 09:54:03 +00001256 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1257echo "$as_me: creating cache $cache_file" >&6;}
1258 >$cache_file
1259fi
1260
1261# Check that the precious variables saved in the cache have kept the same
1262# value.
1263ac_cache_corrupted=false
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001264for ac_var in `(set) 2>&1 |
1265 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001266 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1267 eval ac_new_set=\$ac_env_${ac_var}_set
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001268 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1269 eval ac_new_val="\$ac_env_${ac_var}_value"
Martin v. Löwis11437992002-04-12 09:54:03 +00001270 case $ac_old_set,$ac_new_set in
1271 set,)
1272 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1273echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1274 ac_cache_corrupted=: ;;
1275 ,set)
1276 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1277echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1278 ac_cache_corrupted=: ;;
1279 ,);;
1280 *)
1281 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001282 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001283echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001284 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001285echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001286 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001287echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001288 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001289 fi;;
1290 esac
1291 # Pass precious variables to config.status.
1292 if test "$ac_new_set" = set; then
1293 case $ac_new_val in
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001294 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1295 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001296 *) ac_arg=$ac_var=$ac_new_val ;;
1297 esac
1298 case " $ac_configure_args " in
1299 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1300 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1301 esac
1302 fi
1303done
1304if $ac_cache_corrupted; then
1305 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1306echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1307 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1308echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1309 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001310fi
1311
Guido van Rossum7f43da71994-08-01 12:15:30 +00001312ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001313ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001314ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1315ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1316ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001317
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318
Michael W. Hudson54241132001-12-07 15:38:26 +00001319
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001346
1347
Martin v. Löwis11437992002-04-12 09:54:03 +00001348
1349
1350
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001351
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001352
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001353# We don't use PACKAGE_ variables, and they cause conflicts
1354# with other autoconf-based packages that include Python.h
1355grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1356rm confdefs.h
1357mv confdefs.h.new confdefs.h
1358
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001359
Guido van Rossum0c4eb622006-03-30 16:19:24 +00001360VERSION=3.0
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001361
Martin v. Löwis1142de32002-03-29 16:28:31 +00001362
1363SOVERSION=1.0
1364
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001365# The later defininition of _XOPEN_SOURCE disables certain features
1366# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1367
1368cat >>confdefs.h <<\_ACEOF
1369#define _GNU_SOURCE 1
1370_ACEOF
1371
1372
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001373# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1374# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1375# them.
1376
1377cat >>confdefs.h <<\_ACEOF
1378#define _NETBSD_SOURCE 1
1379_ACEOF
1380
1381
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001382# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1383# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1384# them.
1385
1386cat >>confdefs.h <<\_ACEOF
1387#define __BSD_VISIBLE 1
1388_ACEOF
1389
1390
Guido van Rossum806c2462007-08-06 23:33:07 +00001391# OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
1392# also defined. This can be overridden by defining _BSD_SOURCE
1393
1394cat >>confdefs.h <<\_ACEOF
1395#define _BSD_SOURCE 1
1396_ACEOF
1397
1398
Martin v. Löwisd6320502004-08-12 13:45:08 +00001399# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1400# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1401
1402cat >>confdefs.h <<\_ACEOF
1403#define _BSD_TYPES 1
1404_ACEOF
1405
1406
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001407define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001408
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001409# Arguments passed to configure.
1410
1411CONFIG_ARGS="$ac_configure_args"
1412
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001413# Check whether --enable-universalsdk or --disable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001414if test "${enable_universalsdk+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001415 enableval="$enable_universalsdk"
1416
Thomas Wouters477c8d52006-05-27 19:21:47 +00001417 case $enableval in
1418 yes)
1419 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1420 ;;
1421 esac
1422 case $enableval in
1423 no)
1424 UNIVERSALSDK=
1425 enable_universalsdk=
1426 ;;
1427 *)
1428 UNIVERSALSDK=$enableval
1429 ;;
1430 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001431
Thomas Wouters477c8d52006-05-27 19:21:47 +00001432else
1433
1434 UNIVERSALSDK=
1435 enable_universalsdk=
1436
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001437fi;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001438
1439
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001440# Check whether --enable-framework or --disable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001441if test "${enable_framework+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001442 enableval="$enable_framework"
1443
Jack Jansene578a632001-08-15 01:27:14 +00001444 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001445 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001446 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001447 esac
1448 case $enableval in
1449 no)
1450 PYTHONFRAMEWORK=
1451 PYTHONFRAMEWORKDIR=no-framework
1452 PYTHONFRAMEWORKPREFIX=
1453 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001454 FRAMEWORKINSTALLFIRST=
1455 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001456 FRAMEWORKALTINSTALLFIRST=
1457 FRAMEWORKALTINSTALLLAST=
1458 if test "x${prefix}" = "xNONE"; then
1459 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1460 else
1461 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1462 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001463 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001464 ;;
1465 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001466 PYTHONFRAMEWORK=Python
1467 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001468 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001469 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00001470 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
1471 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001472 FRAMEWORKALTINSTALLFIRST="${FRAMEWORKINSTALLFIRST} bininstall maninstall"
1473 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
1474 if test "x${prefix}" = "xNONE" ; then
1475 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1476 else
1477 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1478 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00001479 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00001480
1481 # Add makefiles for Mac specific code to the list of output
1482 # files:
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001483 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001484
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001485 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001486
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001487 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00001488
Jack Jansene578a632001-08-15 01:27:14 +00001489 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001490
Guido van Rossum563e7081996-09-10 18:20:48 +00001491else
Martin v. Löwis11437992002-04-12 09:54:03 +00001492
Jack Jansene578a632001-08-15 01:27:14 +00001493 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001494 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001495 PYTHONFRAMEWORKPREFIX=
1496 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001497 FRAMEWORKINSTALLFIRST=
1498 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001499 FRAMEWORKALTINSTALLFIRST=
1500 FRAMEWORKALTINSTALLLAST=
1501 if test "x${prefix}" = "xNONE" ; then
1502 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
1503 else
1504 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
1505 fi
Jack Jansene578a632001-08-15 01:27:14 +00001506 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001507
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001508fi;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001509
1510
Michael W. Hudson54241132001-12-07 15:38:26 +00001511
1512
1513
1514
Jack Jansene578a632001-08-15 01:27:14 +00001515
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00001516
1517
1518
Jack Jansene578a632001-08-15 01:27:14 +00001519##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001520## AC_HELP_STRING(--with-dyld,
1521## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001522##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001523# Set name for machine-dependent library files
1524
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001525echo "$as_me:$LINENO: checking MACHDEP" >&5
1526echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001527if test -z "$MACHDEP"
1528then
Guido van Rossum563e7081996-09-10 18:20:48 +00001529 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001530 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1531 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001532 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001533 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001534 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001535 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001536 ac_md_system=`echo $ac_sys_system |
1537 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1538 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001539 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001540 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001541
Guido van Rossum07397971997-04-29 21:49:50 +00001542 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001543 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001544 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001545 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001546 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001547 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001548 esac
1549fi
Guido van Rossum91922671997-10-09 20:24:13 +00001550
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001551# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1552# disable features if it is defined, without any means to access these
1553# features as extensions. For these systems, we skip the definition of
1554# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1555# some feature, make sure there is no alternative way to access this
1556# feature. Also, when using wildcards, make sure you have verified the
1557# need for not defining _XOPEN_SOURCE on all systems matching the
1558# wildcard, and that the wildcard does not include future systems
1559# (which may remove their limitations).
1560case $ac_sys_system/$ac_sys_release in
1561 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1562 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001563 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Thomas Wouters89f507f2006-12-13 04:49:30 +00001564 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0])
1565 define_xopen_source=no;;
1566 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
1567 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
1568 # Marc Recht
1569 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6A-S)
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001570 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001571 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1572 # of union __?sigval. Reported by Stuart Bishop.
1573 SunOS/5.6)
1574 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001575 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1576 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00001577 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00001578 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001579 define_xopen_source=no;;
1580 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001581 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001582 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001583 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001584 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1585 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1586 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1587 # This should hopefully be fixed in FreeBSD 4.9
1588 FreeBSD/4.8* | Darwin/6* )
1589 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001590 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
1591 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
1592 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001593 AIX/4)
1594 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001595 AIX/5)
1596 if test `uname -r` -eq 1; then
1597 define_xopen_source=no
1598 fi
1599 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00001600 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
1601 # disables platform specific features beyond repair.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001602 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
Thomas Wouters0e3f5912006-08-11 14:57:12 +00001603 # has no effect, don't bother defining them
1604 Darwin/[789].*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +00001605 define_xopen_source=no
1606 ;;
1607
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001608esac
1609
1610if test $define_xopen_source = yes
1611then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001612 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
1613 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00001614 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
1615 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00001616 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00001617 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00001618
1619cat >>confdefs.h <<\_ACEOF
1620#define _XOPEN_SOURCE 500
1621_ACEOF
1622
1623 ;;
1624 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001625
1626cat >>confdefs.h <<\_ACEOF
1627#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001628_ACEOF
1629
Skip Montanarof0d5f792004-08-15 14:08:23 +00001630 ;;
1631 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001632
1633 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1634 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1635 # several APIs are not declared. Since this is also needed in some
1636 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00001637 # except for Solaris 10, where it must not be defined,
1638 # as it implies XPG4.2
1639 case $ac_sys_system/$ac_sys_release in
1640 SunOS/5.10)
1641 ;;
1642 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001643
1644cat >>confdefs.h <<\_ACEOF
1645#define _XOPEN_SOURCE_EXTENDED 1
1646_ACEOF
1647
Martin v. Löwis7dece662005-11-26 11:38:24 +00001648 ;;
1649 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001650
Bob Ippolito7026a0a2005-03-28 23:23:47 +00001651
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001652cat >>confdefs.h <<\_ACEOF
1653#define _POSIX_C_SOURCE 200112L
1654_ACEOF
1655
1656
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001657fi
1658
Guido van Rossum91922671997-10-09 20:24:13 +00001659#
1660# SGI compilers allow the specification of the both the ABI and the
1661# ISA on the command line. Depending on the values of these switches,
1662# different and often incompatable code will be generated.
1663#
1664# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1665# thus supply support for various ABI/ISA combinations. The MACHDEP
1666# variable is also adjusted.
1667#
1668
1669if test ! -z "$SGI_ABI"
1670then
1671 CC="cc $SGI_ABI"
1672 LDFLAGS="$SGI_ABI $LDFLAGS"
1673 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1674fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001675echo "$as_me:$LINENO: result: $MACHDEP" >&5
1676echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001677
Jack Jansen83f898c2002-12-30 22:23:40 +00001678# And add extra plat-mac for darwin
1679
Jack Jansen7b59b422003-03-17 15:44:10 +00001680
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001681echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1682echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
Jack Jansen83f898c2002-12-30 22:23:40 +00001683if test -z "$EXTRAPLATDIR"
1684then
1685 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001686 darwin)
1687 EXTRAPLATDIR="\$(PLATMACDIRS)"
1688 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1689 ;;
1690 *)
1691 EXTRAPLATDIR=""
1692 EXTRAMACHDEPPATH=""
1693 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001694 esac
1695fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001696echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1697echo "${ECHO_T}$EXTRAPLATDIR" >&6
Jack Jansen83f898c2002-12-30 22:23:40 +00001698
Jack Jansen6b08a402004-06-03 12:41:45 +00001699# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
1700# it may influence the way we can build extensions, so distutils
1701# needs to check it
1702
Thomas Wouters477c8d52006-05-27 19:21:47 +00001703
Jack Jansen6b08a402004-06-03 12:41:45 +00001704CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00001705EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00001706
Guido van Rossum627b2d71993-12-24 10:39:16 +00001707# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001708
1709# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1710# for debug/optimization stuff. BASECFLAGS is for flags that are required
1711# just to get things to compile and link. Users are free to override OPT
1712# when running configure or make. The build should not break if they do.
1713# BASECFLAGS should generally not be messed with, however.
1714
1715# XXX shouldn't some/most/all of this code be merged with the stuff later
1716# on that fiddles with OPT and BASECFLAGS?
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001717echo "$as_me:$LINENO: checking for --without-gcc" >&5
1718echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001719
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001720# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001721if test "${with_gcc+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001722 withval="$with_gcc"
1723
Guido van Rossum7f43da71994-08-01 12:15:30 +00001724 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001725 no) CC=cc
1726 without_gcc=yes;;
1727 yes) CC=gcc
1728 without_gcc=no;;
1729 *) CC=$withval
1730 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001731 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001732else
Martin v. Löwis11437992002-04-12 09:54:03 +00001733
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001734 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001735 AIX*) CC=cc_r
1736 without_gcc=;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001737 Monterey*)
1738 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001739 without_gcc=;;
1740 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001741 esac
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001742fi;
1743echo "$as_me:$LINENO: result: $without_gcc" >&5
1744echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001745
Guido van Rossum8b131c51995-03-09 14:10:13 +00001746# If the user switches compilers, we can't believe the cache
1747if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1748then
Martin v. Löwis11437992002-04-12 09:54:03 +00001749 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1750(it is also a good idea to do 'make clean' before compiling)" >&5
1751echo "$as_me: error: cached CC is different -- throw away $cache_file
1752(it is also a good idea to do 'make clean' before compiling)" >&2;}
1753 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001754fi
1755
Martin v. Löwis11437992002-04-12 09:54:03 +00001756ac_ext=c
1757ac_cpp='$CPP $CPPFLAGS'
1758ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1759ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1760ac_compiler_gnu=$ac_cv_c_compiler_gnu
1761if test -n "$ac_tool_prefix"; then
1762 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1763set dummy ${ac_tool_prefix}gcc; ac_word=$2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001764echo "$as_me:$LINENO: checking for $ac_word" >&5
1765echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001766if test "${ac_cv_prog_CC+set}" = set; then
1767 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001768else
1769 if test -n "$CC"; then
1770 ac_cv_prog_CC="$CC" # Let the user override the test.
1771else
Martin v. Löwis11437992002-04-12 09:54:03 +00001772as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1773for as_dir in $PATH
1774do
1775 IFS=$as_save_IFS
1776 test -z "$as_dir" && as_dir=.
1777 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001778 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001779 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1780 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1781 break 2
1782 fi
1783done
1784done
1785
Jack Jansendd19cf82001-12-06 22:36:17 +00001786fi
1787fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001788CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001789if test -n "$CC"; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001790 echo "$as_me:$LINENO: result: $CC" >&5
1791echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001792else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001793 echo "$as_me:$LINENO: result: no" >&5
1794echo "${ECHO_T}no" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001795fi
1796
1797fi
1798if test -z "$ac_cv_prog_CC"; then
1799 ac_ct_CC=$CC
1800 # Extract the first word of "gcc", so it can be a program name with args.
1801set dummy gcc; ac_word=$2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001802echo "$as_me:$LINENO: checking for $ac_word" >&5
1803echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001804if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1805 echo $ECHO_N "(cached) $ECHO_C" >&6
1806else
1807 if test -n "$ac_ct_CC"; then
1808 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1809else
1810as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1811for as_dir in $PATH
1812do
1813 IFS=$as_save_IFS
1814 test -z "$as_dir" && as_dir=.
1815 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001816 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001817 ac_cv_prog_ac_ct_CC="gcc"
1818 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1819 break 2
1820 fi
1821done
1822done
1823
1824fi
1825fi
1826ac_ct_CC=$ac_cv_prog_ac_ct_CC
1827if test -n "$ac_ct_CC"; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001828 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1829echo "${ECHO_T}$ac_ct_CC" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001830else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001831 echo "$as_me:$LINENO: result: no" >&5
1832echo "${ECHO_T}no" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001833fi
1834
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001835 CC=$ac_ct_CC
Martin v. Löwis11437992002-04-12 09:54:03 +00001836else
1837 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001838fi
1839
Jack Jansendd19cf82001-12-06 22:36:17 +00001840if test -z "$CC"; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001841 if test -n "$ac_tool_prefix"; then
1842 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00001843set dummy ${ac_tool_prefix}cc; ac_word=$2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001844echo "$as_me:$LINENO: checking for $ac_word" >&5
1845echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001846if test "${ac_cv_prog_CC+set}" = set; then
1847 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001848else
1849 if test -n "$CC"; then
1850 ac_cv_prog_CC="$CC" # Let the user override the test.
1851else
Martin v. Löwis11437992002-04-12 09:54:03 +00001852as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1853for as_dir in $PATH
1854do
1855 IFS=$as_save_IFS
1856 test -z "$as_dir" && as_dir=.
1857 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001858 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001859 ac_cv_prog_CC="${ac_tool_prefix}cc"
1860 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1861 break 2
1862 fi
1863done
1864done
1865
1866fi
1867fi
1868CC=$ac_cv_prog_CC
1869if test -n "$CC"; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001870 echo "$as_me:$LINENO: result: $CC" >&5
1871echo "${ECHO_T}$CC" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001872else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001873 echo "$as_me:$LINENO: result: no" >&5
1874echo "${ECHO_T}no" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001875fi
1876
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001877fi
1878if test -z "$ac_cv_prog_CC"; then
1879 ac_ct_CC=$CC
1880 # Extract the first word of "cc", so it can be a program name with args.
1881set dummy cc; ac_word=$2
1882echo "$as_me:$LINENO: checking for $ac_word" >&5
1883echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1884if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1885 echo $ECHO_N "(cached) $ECHO_C" >&6
1886else
1887 if test -n "$ac_ct_CC"; then
1888 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1889else
1890as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1891for as_dir in $PATH
1892do
1893 IFS=$as_save_IFS
1894 test -z "$as_dir" && as_dir=.
1895 for ac_exec_ext in '' $ac_executable_extensions; do
1896 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1897 ac_cv_prog_ac_ct_CC="cc"
1898 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1899 break 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001900 fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001901done
1902done
1903
1904fi
1905fi
1906ac_ct_CC=$ac_cv_prog_ac_ct_CC
1907if test -n "$ac_ct_CC"; then
1908 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1909echo "${ECHO_T}$ac_ct_CC" >&6
1910else
1911 echo "$as_me:$LINENO: result: no" >&5
1912echo "${ECHO_T}no" >&6
1913fi
1914
1915 CC=$ac_ct_CC
1916else
1917 CC="$ac_cv_prog_CC"
1918fi
1919
Martin v. Löwis11437992002-04-12 09:54:03 +00001920fi
1921if test -z "$CC"; then
1922 # Extract the first word of "cc", so it can be a program name with args.
1923set dummy cc; ac_word=$2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001924echo "$as_me:$LINENO: checking for $ac_word" >&5
1925echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001926if test "${ac_cv_prog_CC+set}" = set; then
1927 echo $ECHO_N "(cached) $ECHO_C" >&6
1928else
1929 if test -n "$CC"; then
1930 ac_cv_prog_CC="$CC" # Let the user override the test.
1931else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001932 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001933as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1934for as_dir in $PATH
1935do
1936 IFS=$as_save_IFS
1937 test -z "$as_dir" && as_dir=.
1938 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001939 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001940 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1941 ac_prog_rejected=yes
1942 continue
1943 fi
1944 ac_cv_prog_CC="cc"
1945 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1946 break 2
1947 fi
1948done
1949done
1950
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001951if test $ac_prog_rejected = yes; then
1952 # We found a bogon in the path, so make sure we never use it.
1953 set dummy $ac_cv_prog_CC
1954 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001955 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001956 # We chose a different compiler from the bogus one.
1957 # However, it has the same basename, so the bogon will be chosen
1958 # first if we set CC to just the basename; use the full file name.
1959 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00001960 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001961 fi
1962fi
1963fi
1964fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001965CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001966if test -n "$CC"; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001967 echo "$as_me:$LINENO: result: $CC" >&5
1968echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001969else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001970 echo "$as_me:$LINENO: result: no" >&5
1971echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001972fi
1973
Martin v. Löwis11437992002-04-12 09:54:03 +00001974fi
1975if test -z "$CC"; then
1976 if test -n "$ac_tool_prefix"; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001977 for ac_prog in cl
Martin v. Löwis11437992002-04-12 09:54:03 +00001978 do
1979 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1980set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001981echo "$as_me:$LINENO: checking for $ac_word" >&5
1982echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001983if test "${ac_cv_prog_CC+set}" = set; then
1984 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00001985else
1986 if test -n "$CC"; then
1987 ac_cv_prog_CC="$CC" # Let the user override the test.
1988else
Martin v. Löwis11437992002-04-12 09:54:03 +00001989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1990for as_dir in $PATH
1991do
1992 IFS=$as_save_IFS
1993 test -z "$as_dir" && as_dir=.
1994 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001995 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001996 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1997 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1998 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00001999 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002000done
2001done
2002
2003fi
2004fi
2005CC=$ac_cv_prog_CC
2006if test -n "$CC"; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002007 echo "$as_me:$LINENO: result: $CC" >&5
2008echo "${ECHO_T}$CC" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002009else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002010 echo "$as_me:$LINENO: result: no" >&5
2011echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002012fi
2013
Martin v. Löwis11437992002-04-12 09:54:03 +00002014 test -n "$CC" && break
2015 done
2016fi
2017if test -z "$CC"; then
2018 ac_ct_CC=$CC
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002019 for ac_prog in cl
Martin v. Löwis11437992002-04-12 09:54:03 +00002020do
2021 # Extract the first word of "$ac_prog", so it can be a program name with args.
2022set dummy $ac_prog; ac_word=$2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002023echo "$as_me:$LINENO: checking for $ac_word" >&5
2024echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002025if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2026 echo $ECHO_N "(cached) $ECHO_C" >&6
2027else
2028 if test -n "$ac_ct_CC"; then
2029 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2030else
2031as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2032for as_dir in $PATH
2033do
2034 IFS=$as_save_IFS
2035 test -z "$as_dir" && as_dir=.
2036 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002037 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002038 ac_cv_prog_ac_ct_CC="$ac_prog"
2039 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2040 break 2
2041 fi
2042done
2043done
Jack Jansendd19cf82001-12-06 22:36:17 +00002044
Martin v. Löwis11437992002-04-12 09:54:03 +00002045fi
2046fi
2047ac_ct_CC=$ac_cv_prog_ac_ct_CC
2048if test -n "$ac_ct_CC"; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002049 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2050echo "${ECHO_T}$ac_ct_CC" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002051else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002052 echo "$as_me:$LINENO: result: no" >&5
2053echo "${ECHO_T}no" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002054fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002055
Martin v. Löwis11437992002-04-12 09:54:03 +00002056 test -n "$ac_ct_CC" && break
2057done
Michael W. Hudson54241132001-12-07 15:38:26 +00002058
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002059 CC=$ac_ct_CC
Martin v. Löwis11437992002-04-12 09:54:03 +00002060fi
2061
2062fi
2063
2064
Skip Montanaro6dead952003-09-25 14:50:04 +00002065test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2066See \`config.log' for more details." >&5
2067echo "$as_me: error: no acceptable C compiler found in \$PATH
2068See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002069 { (exit 1); exit 1; }; }
2070
2071# Provide some information about the compiler.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002072echo "$as_me:$LINENO:" \
2073 "checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002074ac_compiler=`set X $ac_compile; echo $2`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002075{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2076 (eval $ac_compiler --version </dev/null >&5) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002077 ac_status=$?
2078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2079 (exit $ac_status); }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002080{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2081 (eval $ac_compiler -v </dev/null >&5) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002082 ac_status=$?
2083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2084 (exit $ac_status); }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002085{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2086 (eval $ac_compiler -V </dev/null >&5) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002087 ac_status=$?
2088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2089 (exit $ac_status); }
2090
2091cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002092/* confdefs.h. */
2093_ACEOF
2094cat confdefs.h >>conftest.$ac_ext
2095cat >>conftest.$ac_ext <<_ACEOF
2096/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002097
Martin v. Löwis11437992002-04-12 09:54:03 +00002098int
2099main ()
2100{
2101
2102 ;
2103 return 0;
2104}
2105_ACEOF
2106ac_clean_files_save=$ac_clean_files
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002107ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002108# Try to create an executable without -o first, disregard a.out.
2109# It will help us diagnose broken compilers, and finding out an intuition
2110# of exeext.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002111echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2112echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002113ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002114if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2115 (eval $ac_link_default) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002116 ac_status=$?
2117 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2118 (exit $ac_status); }; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002119 # Find the output, starting from the most likely. This scheme is
2120# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2121# resort.
2122
2123# Be careful to initialize this variable, since it used to be cached.
2124# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2125ac_cv_exeext=
2126# b.out is created by i960 compilers.
2127for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
Skip Montanaro6dead952003-09-25 14:50:04 +00002128do
2129 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002130 case $ac_file in
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002131 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2132 ;;
2133 conftest.$ac_ext )
2134 # This is the source file.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002135 ;;
2136 [ab].out )
2137 # We found the default executable, but exeext='' is most
2138 # certainly right.
2139 break;;
2140 *.* )
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002141 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2142 # FIXME: I believe we export ac_cv_exeext for Libtool,
2143 # but it would be cool to find out if it's true. Does anybody
2144 # maintain Libtool? --akim.
2145 export ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002146 break;;
2147 * )
2148 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002149 esac
2150done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002151else
Martin v. Löwis11437992002-04-12 09:54:03 +00002152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002153sed 's/^/| /' conftest.$ac_ext >&5
2154
2155{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2156See \`config.log' for more details." >&5
2157echo "$as_me: error: C compiler cannot create executables
2158See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002159 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002160fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002161
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002162ac_exeext=$ac_cv_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002163echo "$as_me:$LINENO: result: $ac_file" >&5
2164echo "${ECHO_T}$ac_file" >&6
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002165
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002166# Check the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002167# the compiler is broken, or we cross compile.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002168echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2169echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002170# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2171# If not cross compiling, check that we can run a simple program.
2172if test "$cross_compiling" != yes; then
2173 if { ac_try='./$ac_file'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2175 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002176 ac_status=$?
2177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2178 (exit $ac_status); }; }; then
2179 cross_compiling=no
2180 else
2181 if test "$cross_compiling" = maybe; then
2182 cross_compiling=yes
2183 else
2184 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002185If you meant to cross compile, use \`--host'.
2186See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002187echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002188If you meant to cross compile, use \`--host'.
2189See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002190 { (exit 1); exit 1; }; }
2191 fi
2192 fi
2193fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002194echo "$as_me:$LINENO: result: yes" >&5
2195echo "${ECHO_T}yes" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002196
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002197rm -f a.out a.exe conftest$ac_cv_exeext b.out
2198ac_clean_files=$ac_clean_files_save
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002199# Check the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002200# the compiler is broken, or we cross compile.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002201echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2202echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2203echo "$as_me:$LINENO: result: $cross_compiling" >&5
2204echo "${ECHO_T}$cross_compiling" >&6
Thomas Wouters477c8d52006-05-27 19:21:47 +00002205
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002206echo "$as_me:$LINENO: checking for suffix of executables" >&5
2207echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2208if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2209 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002210 ac_status=$?
2211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2212 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002213 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2214# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2215# work properly (i.e., refer to `conftest.exe'), while it won't with
2216# `rm'.
2217for ac_file in conftest.exe conftest conftest.*; do
2218 test -f "$ac_file" || continue
2219 case $ac_file in
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002220 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002221 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002222 export ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002223 break;;
2224 * ) break;;
2225 esac
2226done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002227else
Skip Montanaro6dead952003-09-25 14:50:04 +00002228 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2229See \`config.log' for more details." >&5
2230echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2231See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002232 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002233fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002234
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002235rm -f conftest$ac_cv_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002236echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2237echo "${ECHO_T}$ac_cv_exeext" >&6
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002238
2239rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002240EXEEXT=$ac_cv_exeext
2241ac_exeext=$EXEEXT
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002242echo "$as_me:$LINENO: checking for suffix of object files" >&5
2243echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002244if test "${ac_cv_objext+set}" = set; then
2245 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002246else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002247 cat >conftest.$ac_ext <<_ACEOF
2248/* confdefs.h. */
2249_ACEOF
2250cat confdefs.h >>conftest.$ac_ext
2251cat >>conftest.$ac_ext <<_ACEOF
2252/* end confdefs.h. */
2253
2254int
2255main ()
2256{
2257
2258 ;
2259 return 0;
2260}
2261_ACEOF
2262rm -f conftest.o conftest.obj
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002263if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2264 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002265 ac_status=$?
2266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2267 (exit $ac_status); }; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002268 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002269 case $ac_file in
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002270 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002271 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2272 break;;
2273 esac
2274done
2275else
2276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002277sed 's/^/| /' conftest.$ac_ext >&5
2278
2279{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2280See \`config.log' for more details." >&5
2281echo "$as_me: error: cannot compute suffix of object files: cannot compile
2282See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002283 { (exit 1); exit 1; }; }
2284fi
2285
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002286rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002287fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002288echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2289echo "${ECHO_T}$ac_cv_objext" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002290OBJEXT=$ac_cv_objext
2291ac_objext=$OBJEXT
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002292echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2293echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002294if test "${ac_cv_c_compiler_gnu+set}" = set; then
2295 echo $ECHO_N "(cached) $ECHO_C" >&6
2296else
2297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002298/* confdefs.h. */
2299_ACEOF
2300cat confdefs.h >>conftest.$ac_ext
2301cat >>conftest.$ac_ext <<_ACEOF
2302/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002303
Martin v. Löwis11437992002-04-12 09:54:03 +00002304int
2305main ()
2306{
2307#ifndef __GNUC__
2308 choke me
2309#endif
2310
2311 ;
2312 return 0;
2313}
2314_ACEOF
2315rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002316if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2317 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002319 grep -v '^ *+' conftest.er1 >conftest.err
2320 rm -f conftest.er1
2321 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002323 (exit $ac_status); } &&
2324 { ac_try='test -z "$ac_c_werror_flag"
2325 || test ! -s conftest.err'
2326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2327 (eval $ac_try) 2>&5
2328 ac_status=$?
2329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2330 (exit $ac_status); }; } &&
2331 { ac_try='test -s conftest.$ac_objext'
2332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2333 (eval $ac_try) 2>&5
2334 ac_status=$?
2335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2336 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002337 ac_compiler_gnu=yes
2338else
2339 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002340sed 's/^/| /' conftest.$ac_ext >&5
2341
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002342ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002343fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002344rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002345ac_cv_c_compiler_gnu=$ac_compiler_gnu
2346
2347fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002348echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2349echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002350GCC=`test $ac_compiler_gnu = yes && echo yes`
2351ac_test_CFLAGS=${CFLAGS+set}
2352ac_save_CFLAGS=$CFLAGS
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002353CFLAGS="-g"
2354echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2355echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002356if test "${ac_cv_prog_cc_g+set}" = set; then
2357 echo $ECHO_N "(cached) $ECHO_C" >&6
2358else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002359 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002360/* confdefs.h. */
2361_ACEOF
2362cat confdefs.h >>conftest.$ac_ext
2363cat >>conftest.$ac_ext <<_ACEOF
2364/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002365
Martin v. Löwis11437992002-04-12 09:54:03 +00002366int
2367main ()
2368{
2369
2370 ;
2371 return 0;
2372}
2373_ACEOF
2374rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002375if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2376 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002377 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002378 grep -v '^ *+' conftest.er1 >conftest.err
2379 rm -f conftest.er1
2380 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002382 (exit $ac_status); } &&
2383 { ac_try='test -z "$ac_c_werror_flag"
2384 || test ! -s conftest.err'
2385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2386 (eval $ac_try) 2>&5
2387 ac_status=$?
2388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2389 (exit $ac_status); }; } &&
2390 { ac_try='test -s conftest.$ac_objext'
2391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2392 (eval $ac_try) 2>&5
2393 ac_status=$?
2394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2395 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002396 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002397else
Martin v. Löwis11437992002-04-12 09:54:03 +00002398 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002399sed 's/^/| /' conftest.$ac_ext >&5
2400
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002401ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002402fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002403rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002404fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002405echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2406echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002407if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002408 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002409elif test $ac_cv_prog_cc_g = yes; then
2410 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002411 CFLAGS="-g -O2"
2412 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002413 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002414 fi
2415else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002416 if test "$GCC" = yes; then
2417 CFLAGS="-O2"
2418 else
2419 CFLAGS=
2420 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002421fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002422echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2423echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2424if test "${ac_cv_prog_cc_stdc+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00002425 echo $ECHO_N "(cached) $ECHO_C" >&6
2426else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002427 ac_cv_prog_cc_stdc=no
Skip Montanaro6dead952003-09-25 14:50:04 +00002428ac_save_CC=$CC
2429cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002430/* confdefs.h. */
2431_ACEOF
2432cat confdefs.h >>conftest.$ac_ext
2433cat >>conftest.$ac_ext <<_ACEOF
2434/* end confdefs.h. */
2435#include <stdarg.h>
2436#include <stdio.h>
2437#include <sys/types.h>
2438#include <sys/stat.h>
2439/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2440struct buf { int x; };
2441FILE * (*rcsopen) (struct buf *, struct stat *, int);
2442static char *e (p, i)
2443 char **p;
2444 int i;
2445{
2446 return p[i];
2447}
2448static char *f (char * (*g) (char **, int), char **p, ...)
2449{
2450 char *s;
2451 va_list v;
2452 va_start (v,p);
2453 s = g (p, va_arg (v,int));
2454 va_end (v);
2455 return s;
2456}
Skip Montanarof0d5f792004-08-15 14:08:23 +00002457
2458/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2459 function prototypes and stuff, but not '\xHH' hex character constants.
2460 These don't provoke an error unfortunately, instead are silently treated
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002461 as 'x'. The following induces an error, until -std1 is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00002462 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2463 array size at least. It's necessary to write '\x00'==0 to get something
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002464 that's true only with -std1. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00002465int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2466
Skip Montanaro6dead952003-09-25 14:50:04 +00002467int test (int i, double x);
2468struct s1 {int (*f) (int a);};
2469struct s2 {int (*f) (double a);};
2470int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2471int argc;
2472char **argv;
2473int
2474main ()
2475{
2476return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2477 ;
2478 return 0;
2479}
2480_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002481# Don't try gcc -ansi; that turns off useful extensions and
2482# breaks some systems' header files.
2483# AIX -qlanglvl=ansi
2484# Ultrix and OSF/1 -std1
2485# HP-UX 10.20 and later -Ae
2486# HP-UX older versions -Aa -D_HPUX_SOURCE
2487# SVR4 -Xc -D__EXTENSIONS__
2488for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00002489do
2490 CC="$ac_save_CC $ac_arg"
2491 rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002492if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2493 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00002494 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002495 grep -v '^ *+' conftest.er1 >conftest.err
2496 rm -f conftest.er1
2497 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002499 (exit $ac_status); } &&
2500 { ac_try='test -z "$ac_c_werror_flag"
2501 || test ! -s conftest.err'
2502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2503 (eval $ac_try) 2>&5
2504 ac_status=$?
2505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2506 (exit $ac_status); }; } &&
2507 { ac_try='test -s conftest.$ac_objext'
2508 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2509 (eval $ac_try) 2>&5
2510 ac_status=$?
2511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2512 (exit $ac_status); }; }; then
2513 ac_cv_prog_cc_stdc=$ac_arg
2514break
Skip Montanaro6dead952003-09-25 14:50:04 +00002515else
2516 echo "$as_me: failed program was:" >&5
2517sed 's/^/| /' conftest.$ac_ext >&5
2518
2519fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002520rm -f conftest.err conftest.$ac_objext
Skip Montanaro6dead952003-09-25 14:50:04 +00002521done
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002522rm -f conftest.$ac_ext conftest.$ac_objext
Skip Montanaro6dead952003-09-25 14:50:04 +00002523CC=$ac_save_CC
2524
2525fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002526
2527case "x$ac_cv_prog_cc_stdc" in
2528 x|xno)
2529 echo "$as_me:$LINENO: result: none needed" >&5
2530echo "${ECHO_T}none needed" >&6 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002531 *)
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002532 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2533echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2534 CC="$CC $ac_cv_prog_cc_stdc" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002535esac
2536
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002537# Some people use a C++ compiler to compile C. Since we use `exit',
2538# in C++ we need to declare it. In case someone uses the same compiler
2539# for both compiling C and C++ we need to have the C++ compiler decide
2540# the declaration of exit, since it's the most demanding environment.
2541cat >conftest.$ac_ext <<_ACEOF
2542#ifndef __cplusplus
2543 choke me
2544#endif
2545_ACEOF
2546rm -f conftest.$ac_objext
2547if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2548 (eval $ac_compile) 2>conftest.er1
2549 ac_status=$?
2550 grep -v '^ *+' conftest.er1 >conftest.err
2551 rm -f conftest.er1
2552 cat conftest.err >&5
2553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2554 (exit $ac_status); } &&
2555 { ac_try='test -z "$ac_c_werror_flag"
2556 || test ! -s conftest.err'
2557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2558 (eval $ac_try) 2>&5
2559 ac_status=$?
2560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2561 (exit $ac_status); }; } &&
2562 { ac_try='test -s conftest.$ac_objext'
2563 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2564 (eval $ac_try) 2>&5
2565 ac_status=$?
2566 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2567 (exit $ac_status); }; }; then
2568 for ac_declaration in \
2569 '' \
2570 'extern "C" void std::exit (int) throw (); using std::exit;' \
2571 'extern "C" void std::exit (int); using std::exit;' \
2572 'extern "C" void exit (int) throw ();' \
2573 'extern "C" void exit (int);' \
2574 'void exit (int);'
2575do
2576 cat >conftest.$ac_ext <<_ACEOF
2577/* confdefs.h. */
2578_ACEOF
2579cat confdefs.h >>conftest.$ac_ext
2580cat >>conftest.$ac_ext <<_ACEOF
2581/* end confdefs.h. */
2582$ac_declaration
2583#include <stdlib.h>
2584int
2585main ()
2586{
2587exit (42);
2588 ;
2589 return 0;
2590}
2591_ACEOF
2592rm -f conftest.$ac_objext
2593if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2594 (eval $ac_compile) 2>conftest.er1
2595 ac_status=$?
2596 grep -v '^ *+' conftest.er1 >conftest.err
2597 rm -f conftest.er1
2598 cat conftest.err >&5
2599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2600 (exit $ac_status); } &&
2601 { ac_try='test -z "$ac_c_werror_flag"
2602 || test ! -s conftest.err'
2603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2604 (eval $ac_try) 2>&5
2605 ac_status=$?
2606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2607 (exit $ac_status); }; } &&
2608 { ac_try='test -s conftest.$ac_objext'
2609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2610 (eval $ac_try) 2>&5
2611 ac_status=$?
2612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2613 (exit $ac_status); }; }; then
2614 :
2615else
2616 echo "$as_me: failed program was:" >&5
2617sed 's/^/| /' conftest.$ac_ext >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002618
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002619continue
2620fi
2621rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2622 cat >conftest.$ac_ext <<_ACEOF
2623/* confdefs.h. */
2624_ACEOF
2625cat confdefs.h >>conftest.$ac_ext
2626cat >>conftest.$ac_ext <<_ACEOF
2627/* end confdefs.h. */
2628$ac_declaration
2629int
2630main ()
2631{
2632exit (42);
2633 ;
2634 return 0;
2635}
2636_ACEOF
2637rm -f conftest.$ac_objext
2638if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2639 (eval $ac_compile) 2>conftest.er1
2640 ac_status=$?
2641 grep -v '^ *+' conftest.er1 >conftest.err
2642 rm -f conftest.er1
2643 cat conftest.err >&5
2644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2645 (exit $ac_status); } &&
2646 { ac_try='test -z "$ac_c_werror_flag"
2647 || test ! -s conftest.err'
2648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2649 (eval $ac_try) 2>&5
2650 ac_status=$?
2651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2652 (exit $ac_status); }; } &&
2653 { ac_try='test -s conftest.$ac_objext'
2654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2655 (eval $ac_try) 2>&5
2656 ac_status=$?
2657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2658 (exit $ac_status); }; }; then
2659 break
2660else
2661 echo "$as_me: failed program was:" >&5
2662sed 's/^/| /' conftest.$ac_ext >&5
2663
2664fi
2665rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2666done
2667rm -f conftest*
2668if test -n "$ac_declaration"; then
2669 echo '#ifdef __cplusplus' >>confdefs.h
2670 echo $ac_declaration >>confdefs.h
2671 echo '#endif' >>confdefs.h
2672fi
2673
2674else
2675 echo "$as_me: failed program was:" >&5
2676sed 's/^/| /' conftest.$ac_ext >&5
2677
2678fi
2679rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002680ac_ext=c
2681ac_cpp='$CPP $CPPFLAGS'
2682ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2683ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2684ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002685
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002686
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002687
2688
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002689echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
2690echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002691
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002692# Check whether --with-cxx_main or --without-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002693if test "${with_cxx_main+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002694 withval="$with_cxx_main"
2695
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002696
2697 case $withval in
2698 no) with_cxx_main=no
2699 MAINCC='$(CC)';;
2700 yes) with_cxx_main=yes
2701 MAINCC='$(CXX)';;
2702 *) with_cxx_main=yes
2703 MAINCC=$withval
2704 if test -z "$CXX"
2705 then
2706 CXX=$withval
2707 fi;;
2708 esac
2709else
2710
2711 with_cxx_main=no
2712 MAINCC='$(CC)'
2713
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002714fi;
2715echo "$as_me:$LINENO: result: $with_cxx_main" >&5
2716echo "${ECHO_T}$with_cxx_main" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002717
2718preset_cxx="$CXX"
2719if test -z "$CXX"
2720then
2721 case "$CC" in
2722 gcc) # Extract the first word of "g++", so it can be a program name with args.
2723set dummy g++; ac_word=$2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002724echo "$as_me:$LINENO: checking for $ac_word" >&5
2725echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002726if test "${ac_cv_path_CXX+set}" = set; then
2727 echo $ECHO_N "(cached) $ECHO_C" >&6
2728else
2729 case $CXX in
2730 [\\/]* | ?:[\\/]*)
2731 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2732 ;;
2733 *)
2734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2735for as_dir in notfound
2736do
2737 IFS=$as_save_IFS
2738 test -z "$as_dir" && as_dir=.
2739 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002740 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002741 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
2742 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2743 break 2
2744 fi
2745done
2746done
2747
2748 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
2749 ;;
2750esac
2751fi
2752CXX=$ac_cv_path_CXX
Thomas Wouters477c8d52006-05-27 19:21:47 +00002753
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002754if test -n "$CXX"; then
2755 echo "$as_me:$LINENO: result: $CXX" >&5
2756echo "${ECHO_T}$CXX" >&6
2757else
2758 echo "$as_me:$LINENO: result: no" >&5
2759echo "${ECHO_T}no" >&6
2760fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002761 ;;
2762 cc) # Extract the first word of "c++", so it can be a program name with args.
2763set dummy c++; ac_word=$2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002764echo "$as_me:$LINENO: checking for $ac_word" >&5
2765echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002766if test "${ac_cv_path_CXX+set}" = set; then
2767 echo $ECHO_N "(cached) $ECHO_C" >&6
2768else
2769 case $CXX in
2770 [\\/]* | ?:[\\/]*)
2771 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2772 ;;
2773 *)
2774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2775for as_dir in notfound
2776do
2777 IFS=$as_save_IFS
2778 test -z "$as_dir" && as_dir=.
2779 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002780 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002781 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
2782 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2783 break 2
2784 fi
2785done
2786done
2787
2788 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
2789 ;;
2790esac
2791fi
2792CXX=$ac_cv_path_CXX
Thomas Wouters477c8d52006-05-27 19:21:47 +00002793
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002794if test -n "$CXX"; then
2795 echo "$as_me:$LINENO: result: $CXX" >&5
2796echo "${ECHO_T}$CXX" >&6
2797else
2798 echo "$as_me:$LINENO: result: no" >&5
2799echo "${ECHO_T}no" >&6
2800fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002801 ;;
2802 esac
2803 if test "$CXX" = "notfound"
2804 then
2805 CXX=""
2806 fi
2807fi
2808if test -z "$CXX"
2809then
2810 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
2811do
2812 # Extract the first word of "$ac_prog", so it can be a program name with args.
2813set dummy $ac_prog; ac_word=$2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002814echo "$as_me:$LINENO: checking for $ac_word" >&5
2815echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002816if test "${ac_cv_prog_CXX+set}" = set; then
2817 echo $ECHO_N "(cached) $ECHO_C" >&6
2818else
2819 if test -n "$CXX"; then
2820 ac_cv_prog_CXX="$CXX" # Let the user override the test.
2821else
2822as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2823for as_dir in $PATH
2824do
2825 IFS=$as_save_IFS
2826 test -z "$as_dir" && as_dir=.
2827 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002828 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002829 ac_cv_prog_CXX="$ac_prog"
2830 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2831 break 2
2832 fi
2833done
2834done
2835
2836fi
2837fi
2838CXX=$ac_cv_prog_CXX
2839if test -n "$CXX"; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002840 echo "$as_me:$LINENO: result: $CXX" >&5
2841echo "${ECHO_T}$CXX" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002842else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002843 echo "$as_me:$LINENO: result: no" >&5
2844echo "${ECHO_T}no" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00002845fi
2846
2847 test -n "$CXX" && break
2848done
2849test -n "$CXX" || CXX="notfound"
2850
2851 if test "$CXX" = "notfound"
2852 then
2853 CXX=""
2854 fi
2855fi
2856if test "$preset_cxx" != "$CXX"
2857then
2858 { echo "$as_me:$LINENO: WARNING:
2859
2860 By default, distutils will build C++ extension modules with \"$CXX\".
2861 If this is not intended, then set CXX on the configure command line.
2862 " >&5
2863echo "$as_me: WARNING:
2864
2865 By default, distutils will build C++ extension modules with \"$CXX\".
2866 If this is not intended, then set CXX on the configure command line.
2867 " >&2;}
2868fi
2869
2870
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002871# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002872
2873ac_ext=c
2874ac_cpp='$CPP $CPPFLAGS'
2875ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2876ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2877ac_compiler_gnu=$ac_cv_c_compiler_gnu
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002878echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2879echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002880# On Suns, sometimes $CPP names a directory.
2881if test -n "$CPP" && test -d "$CPP"; then
2882 CPP=
2883fi
2884if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002885 if test "${ac_cv_prog_CPP+set}" = set; then
2886 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002887else
Martin v. Löwis11437992002-04-12 09:54:03 +00002888 # Double quotes because CPP needs to be expanded
2889 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2890 do
2891 ac_preproc_ok=false
2892for ac_c_preproc_warn_flag in '' yes
2893do
2894 # Use a header file that comes with gcc, so configuring glibc
2895 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002896 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2897 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002898 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002899 # not just through cpp. "Syntax error" is here to catch this case.
2900 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002901/* confdefs.h. */
2902_ACEOF
2903cat confdefs.h >>conftest.$ac_ext
2904cat >>conftest.$ac_ext <<_ACEOF
2905/* end confdefs.h. */
2906#ifdef __STDC__
2907# include <limits.h>
2908#else
2909# include <assert.h>
2910#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00002911 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00002912_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002913if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2914 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002915 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002916 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002917 rm -f conftest.er1
2918 cat conftest.err >&5
2919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002920 (exit $ac_status); } >/dev/null; then
2921 if test -s conftest.err; then
2922 ac_cpp_err=$ac_c_preproc_warn_flag
2923 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2924 else
2925 ac_cpp_err=
2926 fi
2927else
2928 ac_cpp_err=yes
2929fi
2930if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002931 :
2932else
Martin v. Löwis11437992002-04-12 09:54:03 +00002933 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002934sed 's/^/| /' conftest.$ac_ext >&5
2935
Martin v. Löwis11437992002-04-12 09:54:03 +00002936 # Broken: fails on valid input.
2937continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002938fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002939rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002940
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002941 # OK, works on sane cases. Now check whether non-existent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00002942 # can be detected and how.
2943 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002944/* confdefs.h. */
2945_ACEOF
2946cat confdefs.h >>conftest.$ac_ext
2947cat >>conftest.$ac_ext <<_ACEOF
2948/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002949#include <ac_nonexistent.h>
2950_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002951if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2952 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002953 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002954 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002955 rm -f conftest.er1
2956 cat conftest.err >&5
2957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002958 (exit $ac_status); } >/dev/null; then
2959 if test -s conftest.err; then
2960 ac_cpp_err=$ac_c_preproc_warn_flag
2961 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2962 else
2963 ac_cpp_err=
2964 fi
2965else
2966 ac_cpp_err=yes
2967fi
2968if test -z "$ac_cpp_err"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002969 # Broken: success on invalid input.
2970continue
2971else
2972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002973sed 's/^/| /' conftest.$ac_ext >&5
2974
Martin v. Löwis11437992002-04-12 09:54:03 +00002975 # Passes both tests.
2976ac_preproc_ok=:
2977break
2978fi
2979rm -f conftest.err conftest.$ac_ext
2980
2981done
2982# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2983rm -f conftest.err conftest.$ac_ext
2984if $ac_preproc_ok; then
2985 break
2986fi
2987
2988 done
2989 ac_cv_prog_CPP=$CPP
2990
2991fi
2992 CPP=$ac_cv_prog_CPP
2993else
2994 ac_cv_prog_CPP=$CPP
2995fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00002996echo "$as_me:$LINENO: result: $CPP" >&5
2997echo "${ECHO_T}$CPP" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002998ac_preproc_ok=false
2999for ac_c_preproc_warn_flag in '' yes
3000do
3001 # Use a header file that comes with gcc, so configuring glibc
3002 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003003 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3004 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003005 # On the NeXT, cc -E runs the code through the compiler's parser,
3006 # not just through cpp. "Syntax error" is here to catch this case.
3007 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003008/* confdefs.h. */
3009_ACEOF
3010cat confdefs.h >>conftest.$ac_ext
3011cat >>conftest.$ac_ext <<_ACEOF
3012/* end confdefs.h. */
3013#ifdef __STDC__
3014# include <limits.h>
3015#else
3016# include <assert.h>
3017#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003018 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003019_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003020if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3021 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003022 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003023 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003024 rm -f conftest.er1
3025 cat conftest.err >&5
3026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003027 (exit $ac_status); } >/dev/null; then
3028 if test -s conftest.err; then
3029 ac_cpp_err=$ac_c_preproc_warn_flag
3030 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3031 else
3032 ac_cpp_err=
3033 fi
3034else
3035 ac_cpp_err=yes
3036fi
3037if test -z "$ac_cpp_err"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003038 :
3039else
3040 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003041sed 's/^/| /' conftest.$ac_ext >&5
3042
Martin v. Löwis11437992002-04-12 09:54:03 +00003043 # Broken: fails on valid input.
3044continue
3045fi
3046rm -f conftest.err conftest.$ac_ext
3047
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003048 # OK, works on sane cases. Now check whether non-existent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003049 # can be detected and how.
3050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003051/* confdefs.h. */
3052_ACEOF
3053cat confdefs.h >>conftest.$ac_ext
3054cat >>conftest.$ac_ext <<_ACEOF
3055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003056#include <ac_nonexistent.h>
3057_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003058if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3059 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003060 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003061 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003062 rm -f conftest.er1
3063 cat conftest.err >&5
3064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003065 (exit $ac_status); } >/dev/null; then
3066 if test -s conftest.err; then
3067 ac_cpp_err=$ac_c_preproc_warn_flag
3068 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3069 else
3070 ac_cpp_err=
3071 fi
3072else
3073 ac_cpp_err=yes
3074fi
3075if test -z "$ac_cpp_err"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003076 # Broken: success on invalid input.
3077continue
3078else
3079 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003080sed 's/^/| /' conftest.$ac_ext >&5
3081
Martin v. Löwis11437992002-04-12 09:54:03 +00003082 # Passes both tests.
3083ac_preproc_ok=:
3084break
3085fi
3086rm -f conftest.err conftest.$ac_ext
3087
3088done
3089# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3090rm -f conftest.err conftest.$ac_ext
3091if $ac_preproc_ok; then
3092 :
3093else
Skip Montanaro6dead952003-09-25 14:50:04 +00003094 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3095See \`config.log' for more details." >&5
3096echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3097See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003098 { (exit 1); exit 1; }; }
3099fi
3100
3101ac_ext=c
3102ac_cpp='$CPP $CPPFLAGS'
3103ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3104ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3105ac_compiler_gnu=$ac_cv_c_compiler_gnu
3106
3107
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003108echo "$as_me:$LINENO: checking for egrep" >&5
3109echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3110if test "${ac_cv_prog_egrep+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003111 echo $ECHO_N "(cached) $ECHO_C" >&6
3112else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003113 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3114 then ac_cv_prog_egrep='grep -E'
3115 else ac_cv_prog_egrep='egrep'
Skip Montanaro6dead952003-09-25 14:50:04 +00003116 fi
3117fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003118echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3119echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3120 EGREP=$ac_cv_prog_egrep
Skip Montanaro6dead952003-09-25 14:50:04 +00003121
3122
Martin v. Löwis11437992002-04-12 09:54:03 +00003123
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003124echo "$as_me:$LINENO: checking for AIX" >&5
3125echo $ECHO_N "checking for AIX... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003126cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003127/* confdefs.h. */
3128_ACEOF
3129cat confdefs.h >>conftest.$ac_ext
3130cat >>conftest.$ac_ext <<_ACEOF
3131/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003132#ifdef _AIX
3133 yes
3134#endif
3135
Martin v. Löwis11437992002-04-12 09:54:03 +00003136_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003137if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003138 $EGREP "yes" >/dev/null 2>&1; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003139 echo "$as_me:$LINENO: result: yes" >&5
3140echo "${ECHO_T}yes" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003141cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003142#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003143_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003144
3145else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003146 echo "$as_me:$LINENO: result: no" >&5
3147echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003148fi
3149rm -f conftest*
3150
Michael W. Hudson54241132001-12-07 15:38:26 +00003151
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003152
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003153# Check for unsupported systems
3154case $ac_sys_system/$ac_sys_release in
Guido van Rossumcd16bf62007-06-13 18:07:49 +00003155atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003156 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3157 echo See README for details.
3158 exit 1;;
3159esac
3160
Michael W. Hudson54241132001-12-07 15:38:26 +00003161
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003162echo "$as_me:$LINENO: checking for --with-suffix" >&5
3163echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003164
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003165# Check whether --with-suffix or --without-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003166if test "${with_suffix+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003167 withval="$with_suffix"
3168
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003169 case $withval in
3170 no) EXEEXT=;;
3171 yes) EXEEXT=.exe;;
3172 *) EXEEXT=$withval;;
3173 esac
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003174fi;
3175echo "$as_me:$LINENO: result: $EXEEXT" >&5
3176echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003177
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003178# Test whether we're running on a non-case-sensitive system, in which
3179# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003180
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003181echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3182echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003183if test ! -d CaseSensitiveTestDir; then
3184mkdir CaseSensitiveTestDir
3185fi
3186
3187if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003188then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003189 echo "$as_me:$LINENO: result: yes" >&5
3190echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003191 BUILDEXEEXT=.exe
3192else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003193 echo "$as_me:$LINENO: result: no" >&5
3194echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003195 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003196fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003197rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003198
Guido van Rossumdd997f71998-10-07 19:58:26 +00003199case $MACHDEP in
3200bsdos*)
3201 case $CC in
3202 gcc) CC="$CC -D_HAVE_BSDI";;
3203 esac;;
3204esac
3205
Guido van Rossum24b1e751997-08-21 02:29:16 +00003206case $ac_sys_system in
3207hp*|HP*)
3208 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003209 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003210 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003211Monterey*)
3212 case $CC in
3213 cc) CC="$CC -Wl,-Bexport";;
3214 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003215SunOS*)
3216 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003217
3218cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003219#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003220_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003221
3222 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003223esac
3224
Michael W. Hudson54241132001-12-07 15:38:26 +00003225
3226
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003227echo "$as_me:$LINENO: checking LIBRARY" >&5
3228echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003229if test -z "$LIBRARY"
3230then
3231 LIBRARY='libpython$(VERSION).a'
3232fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003233echo "$as_me:$LINENO: result: $LIBRARY" >&5
3234echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003235
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003236# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003237# name of the library into which to insert object files). BLDLIBRARY is also
3238# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3239# is blank as the main program is not linked directly against LDLIBRARY.
3240# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3241# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3242# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3243# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003244#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003245# RUNSHARED is used to run shared python without installed libraries
3246#
3247# INSTSONAME is the name of the shared library that will be use to install
3248# on the system - some systems like version suffix, others don't
3249
3250
Michael W. Hudson54241132001-12-07 15:38:26 +00003251
3252
3253
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003254
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003255LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003256BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003257INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003258DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003259LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003260RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003261
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003262# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003263# If CXX is set, and if it is needed to link a main function that was
3264# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3265# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003266# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003267# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003268
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003269echo "$as_me:$LINENO: checking LINKCC" >&5
3270echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003271if test -z "$LINKCC"
3272then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003273 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003274 case $ac_sys_system in
3275 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003276 exp_extra="\"\""
3277 if test $ac_sys_release -ge 5 -o \
3278 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3279 exp_extra="."
3280 fi
3281 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003282 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003283 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003284 esac
3285fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003286echo "$as_me:$LINENO: result: $LINKCC" >&5
3287echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003288
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003289echo "$as_me:$LINENO: checking for --enable-shared" >&5
3290echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
3291# Check whether --enable-shared or --disable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003292if test "${enable_shared+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003293 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003294
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003295fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003296
3297if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003298then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003299 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003300 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003301 enable_shared="yes";;
3302 *)
3303 enable_shared="no";;
3304 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003305fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003306echo "$as_me:$LINENO: result: $enable_shared" >&5
3307echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003308
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003309echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3310echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6
3311# Check whether --enable-profiling or --disable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003312if test "${enable_profiling+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003313 enableval="$enable_profiling"
3314 ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003315 CC="$CC -pg"
3316 if test "$cross_compiling" = yes; then
3317 ac_enable_profiling="no"
3318else
3319 cat >conftest.$ac_ext <<_ACEOF
3320/* confdefs.h. */
3321_ACEOF
3322cat confdefs.h >>conftest.$ac_ext
3323cat >>conftest.$ac_ext <<_ACEOF
3324/* end confdefs.h. */
3325int main() { return 0; }
3326_ACEOF
3327rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003328if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3329 (eval $ac_link) 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003330 ac_status=$?
3331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3332 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3334 (eval $ac_try) 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003335 ac_status=$?
3336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3337 (exit $ac_status); }; }; then
3338 ac_enable_profiling="yes"
3339else
3340 echo "$as_me: program exited with status $ac_status" >&5
3341echo "$as_me: failed program was:" >&5
3342sed 's/^/| /' conftest.$ac_ext >&5
3343
3344( exit $ac_status )
3345ac_enable_profiling="no"
3346fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003347rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003348fi
3349 CC="$ac_save_cc"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003350fi;
3351echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3352echo "${ECHO_T}$ac_enable_profiling" >&6
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003353
3354case "$ac_enable_profiling" in
3355 "yes")
3356 BASECFLAGS="-pg $BASECFLAGS"
3357 LDFLAGS="-pg $LDFLAGS"
3358 ;;
3359esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003360
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003361echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3362echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003363
Guido van Rossumb8552162001-09-05 14:58:11 +00003364# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3365# library that we build, but we do not want to link against it (we
3366# will find it with a -framework option). For this reason there is an
3367# extra variable BLDLIBRARY against which Python and the extension
3368# modules are linked, BLDLIBRARY. This is normally the same as
3369# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003370if test "$enable_framework"
3371then
3372 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003373 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003374 BLDLIBRARY=''
3375else
3376 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003377fi
Jack Jansene578a632001-08-15 01:27:14 +00003378
Martin v. Löwis1142de32002-03-29 16:28:31 +00003379# Other platforms follow
3380if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003381
3382cat >>confdefs.h <<\_ACEOF
3383#define Py_ENABLE_SHARED 1
3384_ACEOF
3385
Martin v. Löwis1142de32002-03-29 16:28:31 +00003386 case $ac_sys_system in
Martin v. Löwis1142de32002-03-29 16:28:31 +00003387 CYGWIN*)
3388 LDLIBRARY='libpython$(VERSION).dll.a'
3389 DLLLIBRARY='libpython$(VERSION).dll'
3390 ;;
3391 SunOS*)
3392 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003393 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003394 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003395 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003396 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00003397 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003398 LDLIBRARY='libpython$(VERSION).so'
3399 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003400 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00003401 case $ac_sys_system in
3402 FreeBSD*)
3403 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
3404 ;;
3405 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003406 INSTSONAME="$LDLIBRARY".$SOVERSION
3407 ;;
3408 hp*|HP*)
Thomas Wouters477c8d52006-05-27 19:21:47 +00003409 case `uname -m` in
3410 ia64)
3411 LDLIBRARY='libpython$(VERSION).so'
3412 ;;
3413 *)
3414 LDLIBRARY='libpython$(VERSION).sl'
3415 ;;
3416 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003417 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003418 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003419 ;;
3420 OSF*)
3421 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00003422 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003423 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003424 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003425 atheos*)
3426 LDLIBRARY='libpython$(VERSION).so'
3427 BLDLIBRARY='-L. -lpython$(VERSION)'
3428 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3429 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003430 esac
Jason Tishler30765592003-09-04 11:04:06 +00003431else # shared is disabled
3432 case $ac_sys_system in
3433 CYGWIN*)
3434 BLDLIBRARY='$(LIBRARY)'
3435 LDLIBRARY='libpython$(VERSION).dll.a'
3436 ;;
3437 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003438fi
3439
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003440echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3441echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003442
Martin v. Löwis11437992002-04-12 09:54:03 +00003443if test -n "$ac_tool_prefix"; then
3444 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3445set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003446echo "$as_me:$LINENO: checking for $ac_word" >&5
3447echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003448if test "${ac_cv_prog_RANLIB+set}" = set; then
3449 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003450else
3451 if test -n "$RANLIB"; then
3452 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3453else
Martin v. Löwis11437992002-04-12 09:54:03 +00003454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3455for as_dir in $PATH
3456do
3457 IFS=$as_save_IFS
3458 test -z "$as_dir" && as_dir=.
3459 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003460 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003461 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3462 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3463 break 2
3464 fi
3465done
3466done
3467
Guido van Rossum627b2d71993-12-24 10:39:16 +00003468fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003469fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003470RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003471if test -n "$RANLIB"; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003472 echo "$as_me:$LINENO: result: $RANLIB" >&5
3473echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003474else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003475 echo "$as_me:$LINENO: result: no" >&5
3476echo "${ECHO_T}no" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003477fi
3478
3479fi
3480if test -z "$ac_cv_prog_RANLIB"; then
3481 ac_ct_RANLIB=$RANLIB
3482 # Extract the first word of "ranlib", so it can be a program name with args.
3483set dummy ranlib; ac_word=$2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003484echo "$as_me:$LINENO: checking for $ac_word" >&5
3485echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003486if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3487 echo $ECHO_N "(cached) $ECHO_C" >&6
3488else
3489 if test -n "$ac_ct_RANLIB"; then
3490 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3491else
3492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3493for as_dir in $PATH
3494do
3495 IFS=$as_save_IFS
3496 test -z "$as_dir" && as_dir=.
3497 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003498 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003499 ac_cv_prog_ac_ct_RANLIB="ranlib"
3500 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3501 break 2
3502 fi
3503done
3504done
3505
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003506 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
Martin v. Löwis11437992002-04-12 09:54:03 +00003507fi
3508fi
3509ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3510if test -n "$ac_ct_RANLIB"; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003511 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3512echo "${ECHO_T}$ac_ct_RANLIB" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003513else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003514 echo "$as_me:$LINENO: result: no" >&5
3515echo "${ECHO_T}no" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003516fi
3517
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003518 RANLIB=$ac_ct_RANLIB
Martin v. Löwis11437992002-04-12 09:54:03 +00003519else
3520 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003521fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003522
3523
Guido van Rossum7f43da71994-08-01 12:15:30 +00003524for ac_prog in ar aal
3525do
Martin v. Löwis11437992002-04-12 09:54:03 +00003526 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003527set dummy $ac_prog; ac_word=$2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003528echo "$as_me:$LINENO: checking for $ac_word" >&5
3529echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003530if test "${ac_cv_prog_AR+set}" = set; then
3531 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003532else
3533 if test -n "$AR"; then
3534 ac_cv_prog_AR="$AR" # Let the user override the test.
3535else
Martin v. Löwis11437992002-04-12 09:54:03 +00003536as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3537for as_dir in $PATH
3538do
3539 IFS=$as_save_IFS
3540 test -z "$as_dir" && as_dir=.
3541 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003542 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003543 ac_cv_prog_AR="$ac_prog"
3544 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3545 break 2
3546 fi
3547done
3548done
3549
Guido van Rossum7f43da71994-08-01 12:15:30 +00003550fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003551fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003552AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003553if test -n "$AR"; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003554 echo "$as_me:$LINENO: result: $AR" >&5
3555echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003556else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003557 echo "$as_me:$LINENO: result: no" >&5
3558echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003559fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003560
Martin v. Löwis11437992002-04-12 09:54:03 +00003561 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003562done
3563test -n "$AR" || AR="ar"
3564
Michael W. Hudson54241132001-12-07 15:38:26 +00003565
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003566
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003567# Extract the first word of "svnversion", so it can be a program name with args.
3568set dummy svnversion; ac_word=$2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003569echo "$as_me:$LINENO: checking for $ac_word" >&5
3570echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003571if test "${ac_cv_prog_SVNVERSION+set}" = set; then
3572 echo $ECHO_N "(cached) $ECHO_C" >&6
3573else
3574 if test -n "$SVNVERSION"; then
3575 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
3576else
3577as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3578for as_dir in $PATH
3579do
3580 IFS=$as_save_IFS
3581 test -z "$as_dir" && as_dir=.
3582 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003583 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003584 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003585 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3586 break 2
3587 fi
3588done
3589done
3590
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003591 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003592fi
3593fi
3594SVNVERSION=$ac_cv_prog_SVNVERSION
3595if test -n "$SVNVERSION"; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003596 echo "$as_me:$LINENO: result: $SVNVERSION" >&5
3597echo "${ECHO_T}$SVNVERSION" >&6
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003598else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003599 echo "$as_me:$LINENO: result: no" >&5
3600echo "${ECHO_T}no" >&6
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003601fi
3602
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003603if test $SVNVERSION = found
3604then
3605 SVNVERSION="svnversion \$(srcdir)"
3606else
3607 SVNVERSION="echo exported"
3608fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003609
Neil Schemenauera42c8272001-03-31 00:01:55 +00003610case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003611bsdos*|hp*|HP*)
3612 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003613 if test -z "$INSTALL"
3614 then
3615 INSTALL="${srcdir}/install-sh -c"
3616 fi
3617esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003618ac_aux_dir=
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003619for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3620 if test -f $ac_dir/install-sh; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003621 ac_aux_dir=$ac_dir
3622 ac_install_sh="$ac_aux_dir/install-sh -c"
3623 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003624 elif test -f $ac_dir/install.sh; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003625 ac_aux_dir=$ac_dir
3626 ac_install_sh="$ac_aux_dir/install.sh -c"
3627 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003628 elif test -f $ac_dir/shtool; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003629 ac_aux_dir=$ac_dir
3630 ac_install_sh="$ac_aux_dir/shtool install -c"
3631 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003632 fi
3633done
3634if test -z "$ac_aux_dir"; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003635 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3636echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003637 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003638fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003639ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3640ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3641ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003642
3643# Find a good install program. We prefer a C program (faster),
3644# so one script is as good as another. But avoid the broken or
3645# incompatible versions:
3646# SysV /etc/install, /usr/sbin/install
3647# SunOS /usr/etc/install
3648# IRIX /sbin/install
3649# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003650# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003651# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3652# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3653# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00003654# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003655# ./install, which can be erroneously created by make from ./install.sh.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003656echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3657echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003658if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003659if test "${ac_cv_path_install+set}" = set; then
3660 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003661else
Martin v. Löwis11437992002-04-12 09:54:03 +00003662 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3663for as_dir in $PATH
3664do
3665 IFS=$as_save_IFS
3666 test -z "$as_dir" && as_dir=.
3667 # Account for people who put trailing slashes in PATH elements.
3668case $as_dir/ in
3669 ./ | .// | /cC/* | \
3670 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00003671 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00003672 /usr/ucb/* ) ;;
3673 *)
3674 # OSF1 and SCO ODT 3.0 have their own names for install.
3675 # Don't use installbsd from OSF since it installs stuff as root
3676 # by default.
3677 for ac_prog in ginstall scoinst install; do
3678 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003679 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00003680 if test $ac_prog = install &&
3681 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3682 # AIX install. It has an incompatible calling convention.
3683 :
3684 elif test $ac_prog = install &&
3685 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3686 # program-specific install script used by HP pwplus--don't use.
3687 :
3688 else
3689 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3690 break 3
3691 fi
3692 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003693 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003694 done
3695 ;;
3696esac
3697done
3698
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003699
3700fi
3701 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003702 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003703 else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003704 # As a last resort, use the slow shell script. We don't cache a
3705 # path for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003706 # break other packages using the cache if that directory is
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003707 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003708 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003709 fi
3710fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003711echo "$as_me:$LINENO: result: $INSTALL" >&5
3712echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003713
3714# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3715# It thinks the first close brace ends the variable substitution.
3716test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3717
Martin v. Löwis11437992002-04-12 09:54:03 +00003718test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003719
3720test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3721
Michael W. Hudson54241132001-12-07 15:38:26 +00003722
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003723# Not every filesystem supports hard links
3724
3725if test -z "$LN" ; then
3726 case $ac_sys_system in
Guido van Rossumaef734b2001-01-10 21:09:12 +00003727 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003728 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003729 *) LN=ln;;
3730 esac
3731fi
3732
Fred Drake109d9862001-07-11 06:27:56 +00003733# Check for --with-pydebug
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003734echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3735echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003736
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003737# Check whether --with-pydebug or --without-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00003738if test "${with_pydebug+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003739 withval="$with_pydebug"
3740
Fred Drake109d9862001-07-11 06:27:56 +00003741if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003742then
3743
3744cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003745#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003746_ACEOF
3747
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003748 echo "$as_me:$LINENO: result: yes" >&5
3749echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003750 Py_DEBUG='true'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003751else echo "$as_me:$LINENO: result: no" >&5
3752echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003753fi
3754else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003755 echo "$as_me:$LINENO: result: no" >&5
3756echo "${ECHO_T}no" >&6
3757fi;
Fred Drake109d9862001-07-11 06:27:56 +00003758
Skip Montanarodecc6a42003-01-01 20:07:49 +00003759# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3760# merged with this chunk of code?
3761
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003762# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003763# ------------------------
3764# (The following bit of code is complicated enough - please keep things
3765# indented properly. Just pretend you're editing Python code. ;-)
3766
3767# There are two parallel sets of case statements below, one that checks to
3768# see if OPT was set and one that does BASECFLAGS setting based upon
3769# compiler and platform. BASECFLAGS tweaks need to be made even if the
3770# user set OPT.
3771
3772# tweak OPT based on compiler and platform, only if the user didn't set
3773# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003774
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003775if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003776then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003777 case $GCC in
3778 yes)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003779 if test "$CC" != 'g++' ; then
3780 STRICT_PROTO="-Wstrict-prototypes"
3781 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003782 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003783 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003784 if test "$Py_DEBUG" = 'true' ; then
3785 # Optimization messes up debuggers, so turn it off for
3786 # debug builds.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003787 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00003788 else
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003789 OPT="-g -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003790 fi
3791 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003792 *)
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003793 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003794 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003795 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003796 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003797 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3798 ;;
3799 esac
Fred Drake109d9862001-07-11 06:27:56 +00003800 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003801
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003802 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003803 OPT="-O"
3804 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003805 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003806
3807 # The current (beta) Monterey compiler dies with optimizations
3808 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003809 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003810 Monterey*)
3811 OPT=""
3812 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003813 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003814
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003815fi
3816
Skip Montanarodecc6a42003-01-01 20:07:49 +00003817
3818# tweak BASECFLAGS based on compiler and platform
3819case $GCC in
3820yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003821 # Python violates C99 rules, by casting between incompatible
3822 # pointer types. GCC may generate bad code as a result of that,
3823 # so use -fno-strict-aliasing if supported.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003824 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3825echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003826 ac_save_cc="$CC"
3827 CC="$CC -fno-strict-aliasing"
3828 if test "$cross_compiling" = yes; then
3829 ac_cv_no_strict_aliasing_ok=no
3830else
3831 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003832/* confdefs.h. */
3833_ACEOF
3834cat confdefs.h >>conftest.$ac_ext
3835cat >>conftest.$ac_ext <<_ACEOF
3836/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003837int main() { return 0; }
3838_ACEOF
3839rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003840if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3841 (eval $ac_link) 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003842 ac_status=$?
3843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3844 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3846 (eval $ac_try) 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003847 ac_status=$?
3848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3849 (exit $ac_status); }; }; then
3850 ac_cv_no_strict_aliasing_ok=yes
3851else
3852 echo "$as_me: program exited with status $ac_status" >&5
3853echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003854sed 's/^/| /' conftest.$ac_ext >&5
3855
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003856( exit $ac_status )
3857ac_cv_no_strict_aliasing_ok=no
3858fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003859rm -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 +00003860fi
3861 CC="$ac_save_cc"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003862 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3863echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003864 if test $ac_cv_no_strict_aliasing_ok = yes
3865 then
3866 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3867 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003868 case $ac_sys_system in
3869 SCO_SV*)
3870 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3871 ;;
3872 # is there any other compiler on Darwin besides gcc?
3873 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003874 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Thomas Wouters477c8d52006-05-27 19:21:47 +00003875 if test "${enable_universalsdk}"; then
3876 BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
3877 fi
3878
Skip Montanarodecc6a42003-01-01 20:07:49 +00003879 ;;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003880 OSF*)
3881 BASECFLAGS="$BASECFLAGS -mieee"
3882 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003883 esac
3884 ;;
3885
3886*)
3887 case $ac_sys_system in
3888 OpenUNIX*|UnixWare*)
3889 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3890 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003891 OSF*)
3892 BASECFLAGS="$BASECFLAGS -ieee -std"
3893 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003894 SCO_SV*)
3895 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3896 ;;
3897 esac
3898 ;;
3899esac
3900
Fred Drakee1ceaa02001-12-04 20:55:47 +00003901if test "$Py_DEBUG" = 'true'; then
3902 :
3903else
3904 OPT="-DNDEBUG $OPT"
3905fi
3906
Guido van Rossum563e7081996-09-10 18:20:48 +00003907if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003908then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003909 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003910fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003911
Neal Norwitz020c46a2006-01-07 21:39:28 +00003912# disable check for icc since it seems to pass, but generates a warning
3913if test "$CC" = icc
3914then
3915 ac_cv_opt_olimit_ok=no
3916fi
3917
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003918echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3919echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003920if test "${ac_cv_opt_olimit_ok+set}" = set; then
3921 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003922else
3923 ac_save_cc="$CC"
3924CC="$CC -OPT:Olimit=0"
3925if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003926 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003927else
Martin v. Löwis11437992002-04-12 09:54:03 +00003928 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003929/* confdefs.h. */
3930_ACEOF
3931cat confdefs.h >>conftest.$ac_ext
3932cat >>conftest.$ac_ext <<_ACEOF
3933/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003934int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003935_ACEOF
3936rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003937if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3938 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003939 ac_status=$?
3940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3941 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3943 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003944 ac_status=$?
3945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3946 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003947 ac_cv_opt_olimit_ok=yes
3948else
Martin v. Löwis11437992002-04-12 09:54:03 +00003949 echo "$as_me: program exited with status $ac_status" >&5
3950echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003951sed 's/^/| /' conftest.$ac_ext >&5
3952
Martin v. Löwis11437992002-04-12 09:54:03 +00003953( exit $ac_status )
3954ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003955fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003956rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003957fi
Guido van Rossum91922671997-10-09 20:24:13 +00003958CC="$ac_save_cc"
3959fi
3960
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003961echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3962echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003963if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003964 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003965 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3966 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3967 # environment?
3968 Darwin*)
3969 ;;
3970 *)
3971 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3972 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003973 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003974else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003975 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3976echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003977 if test "${ac_cv_olimit_ok+set}" = set; then
3978 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003979else
3980 ac_save_cc="$CC"
3981 CC="$CC -Olimit 1500"
3982 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003983 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003984else
Martin v. Löwis11437992002-04-12 09:54:03 +00003985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003986/* confdefs.h. */
3987_ACEOF
3988cat confdefs.h >>conftest.$ac_ext
3989cat >>conftest.$ac_ext <<_ACEOF
3990/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003991int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003992_ACEOF
3993rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003994if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3995 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003996 ac_status=$?
3997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3998 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003999 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4000 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004001 ac_status=$?
4002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4003 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004004 ac_cv_olimit_ok=yes
4005else
Martin v. Löwis11437992002-04-12 09:54:03 +00004006 echo "$as_me: program exited with status $ac_status" >&5
4007echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004008sed 's/^/| /' conftest.$ac_ext >&5
4009
Martin v. Löwis11437992002-04-12 09:54:03 +00004010( exit $ac_status )
4011ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004012fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004013rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004014fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004015 CC="$ac_save_cc"
4016fi
4017
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004018 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4019echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004020 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004021 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004022 fi
4023fi
4024
Thomas Wouters89f507f2006-12-13 04:49:30 +00004025# Check whether GCC supports PyArg_ParseTuple format
4026if test "$GCC" = "yes"
4027then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004028 echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4029echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +00004030 save_CFLAGS=$CFLAGS
4031 CFLAGS="$CFLAGS -Werror"
4032 cat >conftest.$ac_ext <<_ACEOF
4033/* confdefs.h. */
4034_ACEOF
4035cat confdefs.h >>conftest.$ac_ext
4036cat >>conftest.$ac_ext <<_ACEOF
4037/* end confdefs.h. */
4038
4039 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4040
4041int
4042main ()
4043{
4044
4045 ;
4046 return 0;
4047}
4048_ACEOF
4049rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004050if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4051 (eval $ac_compile) 2>conftest.er1
Thomas Wouters89f507f2006-12-13 04:49:30 +00004052 ac_status=$?
4053 grep -v '^ *+' conftest.er1 >conftest.err
4054 rm -f conftest.er1
4055 cat conftest.err >&5
4056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004057 (exit $ac_status); } &&
4058 { ac_try='test -z "$ac_c_werror_flag"
4059 || test ! -s conftest.err'
4060 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4061 (eval $ac_try) 2>&5
4062 ac_status=$?
4063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4064 (exit $ac_status); }; } &&
4065 { ac_try='test -s conftest.$ac_objext'
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
Thomas Wouters89f507f2006-12-13 04:49:30 +00004071
4072cat >>confdefs.h <<\_ACEOF
4073#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4074_ACEOF
4075
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004076 echo "$as_me:$LINENO: result: yes" >&5
4077echo "${ECHO_T}yes" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +00004078else
4079 echo "$as_me: failed program was:" >&5
4080sed 's/^/| /' conftest.$ac_ext >&5
4081
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004082echo "$as_me:$LINENO: result: no" >&5
4083echo "${ECHO_T}no" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +00004084
4085fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004086rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +00004087 CFLAGS=$save_CFLAGS
4088fi
4089
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004090# On some compilers, pthreads are available without further options
4091# (e.g. MacOS X). On some of these systems, the compiler will not
4092# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4093# So we have to see first whether pthreads are available without
4094# options before we can check whether -Kpthread improves anything.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004095echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4096echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004097if test "${ac_cv_pthread_is_default+set}" = set; then
4098 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004099else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004100 if test "$cross_compiling" = yes; then
4101 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004102else
Martin v. Löwis11437992002-04-12 09:54:03 +00004103 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004104/* confdefs.h. */
4105_ACEOF
4106cat confdefs.h >>conftest.$ac_ext
4107cat >>conftest.$ac_ext <<_ACEOF
4108/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004109
Martin v. Löwis130fb172001-07-19 11:00:41 +00004110#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004111
4112void* routine(void* p){return NULL;}
4113
4114int main(){
4115 pthread_t p;
4116 if(pthread_create(&p,NULL,routine,NULL)!=0)
4117 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004118 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004119 return 0;
4120}
4121
Martin v. Löwis11437992002-04-12 09:54:03 +00004122_ACEOF
4123rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004124if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4125 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004126 ac_status=$?
4127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4128 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4130 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004131 ac_status=$?
4132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4133 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004134
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004135 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004136 ac_cv_kthread=no
4137 ac_cv_pthread=no
4138
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004139else
Martin v. Löwis11437992002-04-12 09:54:03 +00004140 echo "$as_me: program exited with status $ac_status" >&5
4141echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004142sed 's/^/| /' conftest.$ac_ext >&5
4143
Martin v. Löwis11437992002-04-12 09:54:03 +00004144( exit $ac_status )
4145ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004146fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004147rm -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 +00004148fi
4149
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004150fi
4151
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004152echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4153echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004154
Michael W. Hudson54241132001-12-07 15:38:26 +00004155
Martin v. Löwis11437992002-04-12 09:54:03 +00004156if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004157then
4158 ac_cv_kpthread=no
4159else
4160# -Kpthread, if available, provides the right #defines
4161# and linker options to make pthread_create available
4162# Some compilers won't report that they do not support -Kpthread,
4163# so we need to run a program to see whether it really made the
4164# function available.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004165echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4166echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004167if test "${ac_cv_kpthread+set}" = set; then
4168 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004169else
4170 ac_save_cc="$CC"
4171CC="$CC -Kpthread"
4172if test "$cross_compiling" = yes; then
4173 ac_cv_kpthread=no
4174else
Martin v. Löwis11437992002-04-12 09:54:03 +00004175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004176/* confdefs.h. */
4177_ACEOF
4178cat confdefs.h >>conftest.$ac_ext
4179cat >>conftest.$ac_ext <<_ACEOF
4180/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004181
4182#include <pthread.h>
4183
4184void* routine(void* p){return NULL;}
4185
4186int main(){
4187 pthread_t p;
4188 if(pthread_create(&p,NULL,routine,NULL)!=0)
4189 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004190 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004191 return 0;
4192}
4193
Martin v. Löwis11437992002-04-12 09:54:03 +00004194_ACEOF
4195rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004196if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4197 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004198 ac_status=$?
4199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4200 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4202 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004203 ac_status=$?
4204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4205 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004206 ac_cv_kpthread=yes
4207else
Martin v. Löwis11437992002-04-12 09:54:03 +00004208 echo "$as_me: program exited with status $ac_status" >&5
4209echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004210sed 's/^/| /' conftest.$ac_ext >&5
4211
Martin v. Löwis11437992002-04-12 09:54:03 +00004212( exit $ac_status )
4213ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004214fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004215rm -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 +00004216fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004217CC="$ac_save_cc"
4218fi
4219
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004220echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4221echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004222fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004223
Skip Montanarod8d39a02003-07-10 20:44:10 +00004224if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004225then
4226# -Kthread, if available, provides the right #defines
4227# and linker options to make pthread_create available
4228# Some compilers won't report that they do not support -Kthread,
4229# so we need to run a program to see whether it really made the
4230# function available.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004231echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4232echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004233if test "${ac_cv_kthread+set}" = set; then
4234 echo $ECHO_N "(cached) $ECHO_C" >&6
4235else
4236 ac_save_cc="$CC"
4237CC="$CC -Kthread"
4238if test "$cross_compiling" = yes; then
4239 ac_cv_kthread=no
4240else
4241 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004242/* confdefs.h. */
4243_ACEOF
4244cat confdefs.h >>conftest.$ac_ext
4245cat >>conftest.$ac_ext <<_ACEOF
4246/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004247
4248#include <pthread.h>
4249
4250void* routine(void* p){return NULL;}
4251
4252int main(){
4253 pthread_t p;
4254 if(pthread_create(&p,NULL,routine,NULL)!=0)
4255 return 1;
4256 (void)pthread_detach(p);
4257 return 0;
4258}
4259
4260_ACEOF
4261rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004262if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4263 (eval $ac_link) 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004264 ac_status=$?
4265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4266 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4268 (eval $ac_try) 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004269 ac_status=$?
4270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4271 (exit $ac_status); }; }; then
4272 ac_cv_kthread=yes
4273else
4274 echo "$as_me: program exited with status $ac_status" >&5
4275echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004276sed 's/^/| /' conftest.$ac_ext >&5
4277
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004278( exit $ac_status )
4279ac_cv_kthread=no
4280fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004281rm -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 +00004282fi
4283CC="$ac_save_cc"
4284fi
4285
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004286echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4287echo "${ECHO_T}$ac_cv_kthread" >&6
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004288fi
4289
Skip Montanarod8d39a02003-07-10 20:44:10 +00004290if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004291then
4292# -pthread, if available, provides the right #defines
4293# and linker options to make pthread_create available
4294# Some compilers won't report that they do not support -pthread,
4295# so we need to run a program to see whether it really made the
4296# function available.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004297echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4298echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004299if test "${ac_cv_thread+set}" = set; then
4300 echo $ECHO_N "(cached) $ECHO_C" >&6
4301else
4302 ac_save_cc="$CC"
4303CC="$CC -pthread"
4304if test "$cross_compiling" = yes; then
4305 ac_cv_pthread=no
4306else
4307 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004308/* confdefs.h. */
4309_ACEOF
4310cat confdefs.h >>conftest.$ac_ext
4311cat >>conftest.$ac_ext <<_ACEOF
4312/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004313
4314#include <pthread.h>
4315
4316void* routine(void* p){return NULL;}
4317
4318int main(){
4319 pthread_t p;
4320 if(pthread_create(&p,NULL,routine,NULL)!=0)
4321 return 1;
4322 (void)pthread_detach(p);
4323 return 0;
4324}
4325
4326_ACEOF
4327rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004328if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4329 (eval $ac_link) 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004330 ac_status=$?
4331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4332 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4334 (eval $ac_try) 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004335 ac_status=$?
4336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4337 (exit $ac_status); }; }; then
4338 ac_cv_pthread=yes
4339else
4340 echo "$as_me: program exited with status $ac_status" >&5
4341echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004342sed 's/^/| /' conftest.$ac_ext >&5
4343
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004344( exit $ac_status )
4345ac_cv_pthread=no
4346fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004347rm -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 +00004348fi
4349CC="$ac_save_cc"
4350fi
4351
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004352echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4353echo "${ECHO_T}$ac_cv_pthread" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004354fi
4355
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004356# If we have set a CC compiler flag for thread support then
4357# check if it works for CXX, too.
4358ac_cv_cxx_thread=no
4359if test ! -z "$CXX"
4360then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004361echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4362echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004363ac_save_cxx="$CXX"
4364
4365if test "$ac_cv_kpthread" = "yes"
4366then
4367 CXX="$CXX -Kpthread"
4368 ac_cv_cxx_thread=yes
4369elif test "$ac_cv_kthread" = "yes"
4370then
4371 CXX="$CXX -Kthread"
4372 ac_cv_cxx_thread=yes
4373elif test "$ac_cv_pthread" = "yes"
4374then
4375 CXX="$CXX -pthread"
4376 ac_cv_cxx_thread=yes
4377fi
4378
4379if test $ac_cv_cxx_thread = yes
4380then
4381 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4382 $CXX -c conftest.$ac_ext 2>&5
4383 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4384 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4385 then
4386 ac_cv_cxx_thread=yes
4387 else
4388 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004389 fi
4390 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004391fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004392echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4393echo "${ECHO_T}$ac_cv_cxx_thread" >&6
Brett Cannonc601e0f2004-11-07 01:24:12 +00004394fi
4395CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004396
Michael W. Hudson54241132001-12-07 15:38:26 +00004397
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004398# checks for header files
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004399echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4400echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004401if test "${ac_cv_header_stdc+set}" = set; then
4402 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004403else
Martin v. Löwis11437992002-04-12 09:54:03 +00004404 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004405/* confdefs.h. */
4406_ACEOF
4407cat confdefs.h >>conftest.$ac_ext
4408cat >>conftest.$ac_ext <<_ACEOF
4409/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004410#include <stdlib.h>
4411#include <stdarg.h>
4412#include <string.h>
4413#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004414
Skip Montanaro6dead952003-09-25 14:50:04 +00004415int
4416main ()
4417{
4418
4419 ;
4420 return 0;
4421}
Martin v. Löwis11437992002-04-12 09:54:03 +00004422_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004423rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004424if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4425 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004426 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004427 grep -v '^ *+' conftest.er1 >conftest.err
4428 rm -f conftest.er1
4429 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004431 (exit $ac_status); } &&
4432 { ac_try='test -z "$ac_c_werror_flag"
4433 || test ! -s conftest.err'
4434 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4435 (eval $ac_try) 2>&5
4436 ac_status=$?
4437 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4438 (exit $ac_status); }; } &&
4439 { ac_try='test -s conftest.$ac_objext'
4440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4441 (eval $ac_try) 2>&5
4442 ac_status=$?
4443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4444 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004445 ac_cv_header_stdc=yes
4446else
Martin v. Löwis11437992002-04-12 09:54:03 +00004447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004448sed 's/^/| /' conftest.$ac_ext >&5
4449
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004450ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004451fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004452rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004453
4454if test $ac_cv_header_stdc = yes; then
4455 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004457/* confdefs.h. */
4458_ACEOF
4459cat confdefs.h >>conftest.$ac_ext
4460cat >>conftest.$ac_ext <<_ACEOF
4461/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004462#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004463
4464_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004465if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004466 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004467 :
4468else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004469 ac_cv_header_stdc=no
4470fi
4471rm -f conftest*
4472
4473fi
4474
4475if test $ac_cv_header_stdc = yes; then
4476 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004477 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004478/* confdefs.h. */
4479_ACEOF
4480cat confdefs.h >>conftest.$ac_ext
4481cat >>conftest.$ac_ext <<_ACEOF
4482/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004483#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004484
4485_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004486if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004487 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004488 :
4489else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004490 ac_cv_header_stdc=no
4491fi
4492rm -f conftest*
4493
4494fi
4495
4496if test $ac_cv_header_stdc = yes; then
4497 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004498 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004499 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004500else
Martin v. Löwis11437992002-04-12 09:54:03 +00004501 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004502/* confdefs.h. */
4503_ACEOF
4504cat confdefs.h >>conftest.$ac_ext
4505cat >>conftest.$ac_ext <<_ACEOF
4506/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004507#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004508#if ((' ' & 0x0FF) == 0x020)
4509# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4510# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4511#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004512# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004513 (('a' <= (c) && (c) <= 'i') \
4514 || ('j' <= (c) && (c) <= 'r') \
4515 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00004516# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4517#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004518
Martin v. Löwis11437992002-04-12 09:54:03 +00004519#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4520int
4521main ()
4522{
4523 int i;
4524 for (i = 0; i < 256; i++)
4525 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00004526 || toupper (i) != TOUPPER (i))
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004527 exit(2);
4528 exit (0);
Martin v. Löwis11437992002-04-12 09:54:03 +00004529}
4530_ACEOF
4531rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004532if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4533 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004534 ac_status=$?
4535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4536 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4538 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004539 ac_status=$?
4540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4541 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004542 :
4543else
Martin v. Löwis11437992002-04-12 09:54:03 +00004544 echo "$as_me: program exited with status $ac_status" >&5
4545echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004546sed 's/^/| /' conftest.$ac_ext >&5
4547
Martin v. Löwis11437992002-04-12 09:54:03 +00004548( exit $ac_status )
4549ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004550fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004551rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004552fi
4553fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004554fi
4555echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4556echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004557if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004558
4559cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004560#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004561_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004562
4563fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004564
Skip Montanarob9820a32004-01-17 00:16:12 +00004565# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004576 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00004577do
4578as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004579echo "$as_me:$LINENO: checking for $ac_header" >&5
4580echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4581if eval "test \"\${$as_ac_Header+set}\" = set"; then
Skip Montanarob9820a32004-01-17 00:16:12 +00004582 echo $ECHO_N "(cached) $ECHO_C" >&6
4583else
4584 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00004585/* confdefs.h. */
4586_ACEOF
4587cat confdefs.h >>conftest.$ac_ext
4588cat >>conftest.$ac_ext <<_ACEOF
4589/* end confdefs.h. */
4590$ac_includes_default
4591
4592#include <$ac_header>
4593_ACEOF
4594rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004595if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4596 (eval $ac_compile) 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00004597 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004598 grep -v '^ *+' conftest.er1 >conftest.err
4599 rm -f conftest.er1
4600 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00004601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004602 (exit $ac_status); } &&
4603 { ac_try='test -z "$ac_c_werror_flag"
4604 || test ! -s conftest.err'
4605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4606 (eval $ac_try) 2>&5
4607 ac_status=$?
4608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4609 (exit $ac_status); }; } &&
4610 { ac_try='test -s conftest.$ac_objext'
4611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4612 (eval $ac_try) 2>&5
4613 ac_status=$?
4614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4615 (exit $ac_status); }; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00004616 eval "$as_ac_Header=yes"
4617else
4618 echo "$as_me: failed program was:" >&5
4619sed 's/^/| /' conftest.$ac_ext >&5
4620
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004621eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00004622fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004623rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00004624fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004625echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4626echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Skip Montanarob9820a32004-01-17 00:16:12 +00004627if test `eval echo '${'$as_ac_Header'}'` = yes; then
4628 cat >>confdefs.h <<_ACEOF
4629#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4630_ACEOF
4631
4632fi
4633
4634done
4635
4636
Martin v. Löwis11437992002-04-12 09:54:03 +00004637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
Anthony Baxter8a560de2004-10-13 15:30:56 +00004673
Martin v. Löwisc3001752005-01-23 09:27:24 +00004674
Martin v. Löwis11017b12006-01-14 18:12:57 +00004675
Thomas Wouters477c8d52006-05-27 19:21:47 +00004676
Thomas Wouters0e3f5912006-08-11 14:57:12 +00004677
4678
4679
4680
4681
4682
4683
4684
Thomas Wouters89f507f2006-12-13 04:49:30 +00004685
Thomas Wouters0e3f5912006-08-11 14:57:12 +00004686for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
4687fcntl.h grp.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00004688io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
4689shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004690unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00004691sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
4692sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00004693sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
4694sys/time.h \
4695sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004696sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4697bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004698do
Martin v. Löwis11437992002-04-12 09:54:03 +00004699as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004700if eval "test \"\${$as_ac_Header+set}\" = set"; then
4701 echo "$as_me:$LINENO: checking for $ac_header" >&5
4702echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4703if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004704 echo $ECHO_N "(cached) $ECHO_C" >&6
4705fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004706echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4707echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004708else
Martin v. Löwis11437992002-04-12 09:54:03 +00004709 # Is the header compilable?
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004710echo "$as_me:$LINENO: checking $ac_header usability" >&5
4711echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004712cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004713/* confdefs.h. */
4714_ACEOF
4715cat confdefs.h >>conftest.$ac_ext
4716cat >>conftest.$ac_ext <<_ACEOF
4717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004718$ac_includes_default
4719#include <$ac_header>
4720_ACEOF
4721rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004722if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4723 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004724 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004725 grep -v '^ *+' conftest.er1 >conftest.err
4726 rm -f conftest.er1
4727 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004729 (exit $ac_status); } &&
4730 { ac_try='test -z "$ac_c_werror_flag"
4731 || test ! -s conftest.err'
4732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4733 (eval $ac_try) 2>&5
4734 ac_status=$?
4735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4736 (exit $ac_status); }; } &&
4737 { ac_try='test -s conftest.$ac_objext'
4738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4739 (eval $ac_try) 2>&5
4740 ac_status=$?
4741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4742 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004743 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004744else
Martin v. Löwis11437992002-04-12 09:54:03 +00004745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004746sed 's/^/| /' conftest.$ac_ext >&5
4747
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004748ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004749fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004750rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4751echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4752echo "${ECHO_T}$ac_header_compiler" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004753
4754# Is the header present?
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004755echo "$as_me:$LINENO: checking $ac_header presence" >&5
4756echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004757cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004758/* confdefs.h. */
4759_ACEOF
4760cat confdefs.h >>conftest.$ac_ext
4761cat >>conftest.$ac_ext <<_ACEOF
4762/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004763#include <$ac_header>
4764_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004765if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4766 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004767 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004768 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004769 rm -f conftest.er1
4770 cat conftest.err >&5
4771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004772 (exit $ac_status); } >/dev/null; then
4773 if test -s conftest.err; then
4774 ac_cpp_err=$ac_c_preproc_warn_flag
4775 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4776 else
4777 ac_cpp_err=
4778 fi
4779else
4780 ac_cpp_err=yes
4781fi
4782if test -z "$ac_cpp_err"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004783 ac_header_preproc=yes
4784else
4785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004786sed 's/^/| /' conftest.$ac_ext >&5
4787
Martin v. Löwis11437992002-04-12 09:54:03 +00004788 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004789fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004790rm -f conftest.err conftest.$ac_ext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004791echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4792echo "${ECHO_T}$ac_header_preproc" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004793
4794# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004795case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4796 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00004797 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4798echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004799 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4800echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4801 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004802 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00004803 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004804 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4805echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004806 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4807echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4808 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4809echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4810 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4811echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004812 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4813echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004814 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4815echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004816 (
4817 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00004818## ------------------------------------------------ ##
4819## Report this to http://www.python.org/python-bugs ##
4820## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00004821_ASBOX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004822 ) |
4823 sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00004824 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004825esac
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004826echo "$as_me:$LINENO: checking for $ac_header" >&5
4827echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4828if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004829 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004830else
Skip Montanarof0d5f792004-08-15 14:08:23 +00004831 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004832fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004833echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4834echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004835
4836fi
4837if test `eval echo '${'$as_ac_Header'}'` = yes; then
4838 cat >>confdefs.h <<_ACEOF
4839#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4840_ACEOF
4841
4842fi
4843
Guido van Rossum627b2d71993-12-24 10:39:16 +00004844done
4845
Martin v. Löwis11437992002-04-12 09:54:03 +00004846
4847
4848
4849
4850
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004851ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004852for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4853 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004854echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4855echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4856if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004857 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004858else
Martin v. Löwis11437992002-04-12 09:54:03 +00004859 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004860/* confdefs.h. */
4861_ACEOF
4862cat confdefs.h >>conftest.$ac_ext
4863cat >>conftest.$ac_ext <<_ACEOF
4864/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004865#include <sys/types.h>
4866#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004867
Martin v. Löwis11437992002-04-12 09:54:03 +00004868int
4869main ()
4870{
4871if ((DIR *) 0)
4872return 0;
4873 ;
4874 return 0;
4875}
4876_ACEOF
4877rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004878if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4879 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004881 grep -v '^ *+' conftest.er1 >conftest.err
4882 rm -f conftest.er1
4883 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004885 (exit $ac_status); } &&
4886 { ac_try='test -z "$ac_c_werror_flag"
4887 || test ! -s conftest.err'
4888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4889 (eval $ac_try) 2>&5
4890 ac_status=$?
4891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4892 (exit $ac_status); }; } &&
4893 { ac_try='test -s conftest.$ac_objext'
4894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4895 (eval $ac_try) 2>&5
4896 ac_status=$?
4897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4898 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004899 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004900else
Martin v. Löwis11437992002-04-12 09:54:03 +00004901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004902sed 's/^/| /' conftest.$ac_ext >&5
4903
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004904eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004905fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004906rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004907fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004908echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4909echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004910if test `eval echo '${'$as_ac_Header'}'` = yes; then
4911 cat >>confdefs.h <<_ACEOF
4912#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4913_ACEOF
4914
4915ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004916fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004917
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004918done
4919# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4920if test $ac_header_dirent = dirent.h; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004921 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4922echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004923if test "${ac_cv_search_opendir+set}" = set; then
4924 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004925else
Martin v. Löwis11437992002-04-12 09:54:03 +00004926 ac_func_search_save_LIBS=$LIBS
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004927ac_cv_search_opendir=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004928cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004929/* confdefs.h. */
4930_ACEOF
4931cat confdefs.h >>conftest.$ac_ext
4932cat >>conftest.$ac_ext <<_ACEOF
4933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004934
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004935/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004936#ifdef __cplusplus
4937extern "C"
4938#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004939/* We use char because int might match the return type of a gcc2
4940 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004941char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004942int
4943main ()
4944{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004945opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004946 ;
4947 return 0;
4948}
4949_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004950rm -f conftest.$ac_objext conftest$ac_exeext
4951if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4952 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004953 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004954 grep -v '^ *+' conftest.er1 >conftest.err
4955 rm -f conftest.er1
4956 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004958 (exit $ac_status); } &&
4959 { ac_try='test -z "$ac_c_werror_flag"
4960 || test ! -s conftest.err'
4961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4962 (eval $ac_try) 2>&5
4963 ac_status=$?
4964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4965 (exit $ac_status); }; } &&
4966 { ac_try='test -s conftest$ac_exeext'
4967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4968 (eval $ac_try) 2>&5
4969 ac_status=$?
4970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4971 (exit $ac_status); }; }; then
4972 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004973else
Martin v. Löwis11437992002-04-12 09:54:03 +00004974 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004975sed 's/^/| /' conftest.$ac_ext >&5
4976
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004977fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004978rm -f conftest.err conftest.$ac_objext \
4979 conftest$ac_exeext conftest.$ac_ext
4980if test "$ac_cv_search_opendir" = no; then
4981 for ac_lib in dir; do
4982 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4983 cat >conftest.$ac_ext <<_ACEOF
4984/* confdefs.h. */
4985_ACEOF
4986cat confdefs.h >>conftest.$ac_ext
4987cat >>conftest.$ac_ext <<_ACEOF
4988/* end confdefs.h. */
Thomas Wouters477c8d52006-05-27 19:21:47 +00004989
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00004990/* Override any gcc2 internal prototype to avoid an error. */
4991#ifdef __cplusplus
4992extern "C"
4993#endif
4994/* We use char because int might match the return type of a gcc2
4995 builtin and then its argument prototype would still apply. */
4996char opendir ();
4997int
4998main ()
4999{
5000opendir ();
5001 ;
5002 return 0;
5003}
5004_ACEOF
5005rm -f conftest.$ac_objext conftest$ac_exeext
5006if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5007 (eval $ac_link) 2>conftest.er1
5008 ac_status=$?
5009 grep -v '^ *+' conftest.er1 >conftest.err
5010 rm -f conftest.er1
5011 cat conftest.err >&5
5012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5013 (exit $ac_status); } &&
5014 { ac_try='test -z "$ac_c_werror_flag"
5015 || test ! -s conftest.err'
5016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5017 (eval $ac_try) 2>&5
5018 ac_status=$?
5019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5020 (exit $ac_status); }; } &&
5021 { ac_try='test -s conftest$ac_exeext'
5022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5023 (eval $ac_try) 2>&5
5024 ac_status=$?
5025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5026 (exit $ac_status); }; }; then
5027 ac_cv_search_opendir="-l$ac_lib"
5028break
Thomas Wouters477c8d52006-05-27 19:21:47 +00005029else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005030 echo "$as_me: failed program was:" >&5
5031sed 's/^/| /' conftest.$ac_ext >&5
5032
Thomas Wouters477c8d52006-05-27 19:21:47 +00005033fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005034rm -f conftest.err conftest.$ac_objext \
5035 conftest$ac_exeext conftest.$ac_ext
5036 done
5037fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005038LIBS=$ac_func_search_save_LIBS
5039fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005040echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5041echo "${ECHO_T}$ac_cv_search_opendir" >&6
5042if test "$ac_cv_search_opendir" != no; then
5043 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005044
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005045fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005046
Michael W. Hudson54241132001-12-07 15:38:26 +00005047else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005048 echo "$as_me:$LINENO: checking for library containing opendir" >&5
5049echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005050if test "${ac_cv_search_opendir+set}" = set; then
5051 echo $ECHO_N "(cached) $ECHO_C" >&6
5052else
5053 ac_func_search_save_LIBS=$LIBS
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005054ac_cv_search_opendir=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005055cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005056/* confdefs.h. */
5057_ACEOF
5058cat confdefs.h >>conftest.$ac_ext
5059cat >>conftest.$ac_ext <<_ACEOF
5060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005061
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005062/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005063#ifdef __cplusplus
5064extern "C"
5065#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005066/* We use char because int might match the return type of a gcc2
5067 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005068char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005069int
5070main ()
5071{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005072opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005073 ;
5074 return 0;
5075}
5076_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005077rm -f conftest.$ac_objext conftest$ac_exeext
5078if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5079 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005081 grep -v '^ *+' conftest.er1 >conftest.err
5082 rm -f conftest.er1
5083 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005085 (exit $ac_status); } &&
5086 { ac_try='test -z "$ac_c_werror_flag"
5087 || test ! -s conftest.err'
5088 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5089 (eval $ac_try) 2>&5
5090 ac_status=$?
5091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5092 (exit $ac_status); }; } &&
5093 { ac_try='test -s conftest$ac_exeext'
5094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5095 (eval $ac_try) 2>&5
5096 ac_status=$?
5097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5098 (exit $ac_status); }; }; then
5099 ac_cv_search_opendir="none required"
Martin v. Löwis11437992002-04-12 09:54:03 +00005100else
5101 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005102sed 's/^/| /' conftest.$ac_ext >&5
5103
Martin v. Löwis11437992002-04-12 09:54:03 +00005104fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005105rm -f conftest.err conftest.$ac_objext \
5106 conftest$ac_exeext conftest.$ac_ext
5107if test "$ac_cv_search_opendir" = no; then
5108 for ac_lib in x; do
5109 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5110 cat >conftest.$ac_ext <<_ACEOF
5111/* confdefs.h. */
5112_ACEOF
5113cat confdefs.h >>conftest.$ac_ext
5114cat >>conftest.$ac_ext <<_ACEOF
5115/* end confdefs.h. */
Thomas Wouters477c8d52006-05-27 19:21:47 +00005116
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005117/* Override any gcc2 internal prototype to avoid an error. */
5118#ifdef __cplusplus
5119extern "C"
5120#endif
5121/* We use char because int might match the return type of a gcc2
5122 builtin and then its argument prototype would still apply. */
5123char opendir ();
5124int
5125main ()
5126{
5127opendir ();
5128 ;
5129 return 0;
5130}
5131_ACEOF
5132rm -f conftest.$ac_objext conftest$ac_exeext
5133if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5134 (eval $ac_link) 2>conftest.er1
5135 ac_status=$?
5136 grep -v '^ *+' conftest.er1 >conftest.err
5137 rm -f conftest.er1
5138 cat conftest.err >&5
5139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5140 (exit $ac_status); } &&
5141 { ac_try='test -z "$ac_c_werror_flag"
5142 || test ! -s conftest.err'
5143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5144 (eval $ac_try) 2>&5
5145 ac_status=$?
5146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5147 (exit $ac_status); }; } &&
5148 { ac_try='test -s conftest$ac_exeext'
5149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5150 (eval $ac_try) 2>&5
5151 ac_status=$?
5152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5153 (exit $ac_status); }; }; then
5154 ac_cv_search_opendir="-l$ac_lib"
5155break
Thomas Wouters477c8d52006-05-27 19:21:47 +00005156else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005157 echo "$as_me: failed program was:" >&5
5158sed 's/^/| /' conftest.$ac_ext >&5
5159
Thomas Wouters477c8d52006-05-27 19:21:47 +00005160fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005161rm -f conftest.err conftest.$ac_objext \
5162 conftest$ac_exeext conftest.$ac_ext
5163 done
5164fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005165LIBS=$ac_func_search_save_LIBS
5166fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005167echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5168echo "${ECHO_T}$ac_cv_search_opendir" >&6
5169if test "$ac_cv_search_opendir" != no; then
5170 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005171
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005172fi
5173
5174fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005175
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005176echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5177echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005178if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5179 echo $ECHO_N "(cached) $ECHO_C" >&6
5180else
5181 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005182/* confdefs.h. */
5183_ACEOF
5184cat confdefs.h >>conftest.$ac_ext
5185cat >>conftest.$ac_ext <<_ACEOF
5186/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005187#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005188int
5189main ()
5190{
5191return makedev(0, 0);
5192 ;
5193 return 0;
5194}
5195_ACEOF
5196rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005197if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5198 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005200 grep -v '^ *+' conftest.er1 >conftest.err
5201 rm -f conftest.er1
5202 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005204 (exit $ac_status); } &&
5205 { ac_try='test -z "$ac_c_werror_flag"
5206 || test ! -s conftest.err'
5207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5208 (eval $ac_try) 2>&5
5209 ac_status=$?
5210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5211 (exit $ac_status); }; } &&
5212 { ac_try='test -s conftest$ac_exeext'
5213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5214 (eval $ac_try) 2>&5
5215 ac_status=$?
5216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5217 (exit $ac_status); }; }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005218 ac_cv_header_sys_types_h_makedev=yes
5219else
5220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005221sed 's/^/| /' conftest.$ac_ext >&5
5222
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005223ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005224fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005225rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005226 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005227
5228fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005229echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5230echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005231
5232if test $ac_cv_header_sys_types_h_makedev = no; then
5233if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005234 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5235echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005236if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5237 echo $ECHO_N "(cached) $ECHO_C" >&6
5238fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005239echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5240echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005241else
5242 # Is the header compilable?
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005243echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5244echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005245cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005246/* confdefs.h. */
5247_ACEOF
5248cat confdefs.h >>conftest.$ac_ext
5249cat >>conftest.$ac_ext <<_ACEOF
5250/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005251$ac_includes_default
5252#include <sys/mkdev.h>
5253_ACEOF
5254rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005255if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5256 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005257 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005258 grep -v '^ *+' conftest.er1 >conftest.err
5259 rm -f conftest.er1
5260 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005262 (exit $ac_status); } &&
5263 { ac_try='test -z "$ac_c_werror_flag"
5264 || test ! -s conftest.err'
5265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5266 (eval $ac_try) 2>&5
5267 ac_status=$?
5268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5269 (exit $ac_status); }; } &&
5270 { ac_try='test -s conftest.$ac_objext'
5271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5272 (eval $ac_try) 2>&5
5273 ac_status=$?
5274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5275 (exit $ac_status); }; }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005276 ac_header_compiler=yes
5277else
5278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005279sed 's/^/| /' conftest.$ac_ext >&5
5280
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005281ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005282fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005283rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5284echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5285echo "${ECHO_T}$ac_header_compiler" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005286
5287# Is the header present?
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005288echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5289echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005290cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005291/* confdefs.h. */
5292_ACEOF
5293cat confdefs.h >>conftest.$ac_ext
5294cat >>conftest.$ac_ext <<_ACEOF
5295/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005296#include <sys/mkdev.h>
5297_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005298if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5299 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005300 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005301 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005302 rm -f conftest.er1
5303 cat conftest.err >&5
5304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005305 (exit $ac_status); } >/dev/null; then
5306 if test -s conftest.err; then
5307 ac_cpp_err=$ac_c_preproc_warn_flag
5308 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5309 else
5310 ac_cpp_err=
5311 fi
5312else
5313 ac_cpp_err=yes
5314fi
5315if test -z "$ac_cpp_err"; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005316 ac_header_preproc=yes
5317else
5318 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005319sed 's/^/| /' conftest.$ac_ext >&5
5320
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005321 ac_header_preproc=no
5322fi
5323rm -f conftest.err conftest.$ac_ext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005324echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5325echo "${ECHO_T}$ac_header_preproc" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005326
5327# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005328case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5329 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005330 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5331echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005332 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5333echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5334 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005335 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005336 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005337 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5338echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005339 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5340echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5341 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5342echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5343 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5344echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005345 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5346echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005347 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5348echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005349 (
5350 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005351## ------------------------------------------------ ##
5352## Report this to http://www.python.org/python-bugs ##
5353## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005354_ASBOX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005355 ) |
5356 sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005357 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005358esac
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005359echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5360echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005361if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5362 echo $ECHO_N "(cached) $ECHO_C" >&6
5363else
5364 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5365fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005366echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5367echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005368
5369fi
5370if test $ac_cv_header_sys_mkdev_h = yes; then
5371
5372cat >>confdefs.h <<\_ACEOF
5373#define MAJOR_IN_MKDEV 1
5374_ACEOF
5375
5376fi
5377
5378
5379
5380 if test $ac_cv_header_sys_mkdev_h = no; then
5381 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005382 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5383echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005384if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5385 echo $ECHO_N "(cached) $ECHO_C" >&6
5386fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005387echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5388echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005389else
5390 # Is the header compilable?
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005391echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5392echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005393cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005394/* confdefs.h. */
5395_ACEOF
5396cat confdefs.h >>conftest.$ac_ext
5397cat >>conftest.$ac_ext <<_ACEOF
5398/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005399$ac_includes_default
5400#include <sys/sysmacros.h>
5401_ACEOF
5402rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005403if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5404 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005405 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005406 grep -v '^ *+' conftest.er1 >conftest.err
5407 rm -f conftest.er1
5408 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005410 (exit $ac_status); } &&
5411 { ac_try='test -z "$ac_c_werror_flag"
5412 || test ! -s conftest.err'
5413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5414 (eval $ac_try) 2>&5
5415 ac_status=$?
5416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5417 (exit $ac_status); }; } &&
5418 { ac_try='test -s conftest.$ac_objext'
5419 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5420 (eval $ac_try) 2>&5
5421 ac_status=$?
5422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5423 (exit $ac_status); }; }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005424 ac_header_compiler=yes
5425else
5426 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005427sed 's/^/| /' conftest.$ac_ext >&5
5428
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005429ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005430fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005431rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5432echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5433echo "${ECHO_T}$ac_header_compiler" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005434
5435# Is the header present?
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005436echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5437echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005438cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005439/* confdefs.h. */
5440_ACEOF
5441cat confdefs.h >>conftest.$ac_ext
5442cat >>conftest.$ac_ext <<_ACEOF
5443/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005444#include <sys/sysmacros.h>
5445_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005446if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5447 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005448 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005449 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005450 rm -f conftest.er1
5451 cat conftest.err >&5
5452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005453 (exit $ac_status); } >/dev/null; then
5454 if test -s conftest.err; then
5455 ac_cpp_err=$ac_c_preproc_warn_flag
5456 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5457 else
5458 ac_cpp_err=
5459 fi
5460else
5461 ac_cpp_err=yes
5462fi
5463if test -z "$ac_cpp_err"; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005464 ac_header_preproc=yes
5465else
5466 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005467sed 's/^/| /' conftest.$ac_ext >&5
5468
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005469 ac_header_preproc=no
5470fi
5471rm -f conftest.err conftest.$ac_ext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005472echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5473echo "${ECHO_T}$ac_header_preproc" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005474
5475# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005476case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5477 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005478 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5479echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005480 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
5481echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
5482 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005483 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005484 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005485 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5486echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005487 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5488echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5489 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
5490echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
5491 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
5492echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005493 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
5494echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005495 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
5496echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005497 (
5498 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005499## ------------------------------------------------ ##
5500## Report this to http://www.python.org/python-bugs ##
5501## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005502_ASBOX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005503 ) |
5504 sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005505 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005506esac
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005507echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5508echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005509if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5510 echo $ECHO_N "(cached) $ECHO_C" >&6
5511else
5512 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5513fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005514echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5515echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005516
5517fi
5518if test $ac_cv_header_sys_sysmacros_h = yes; then
5519
5520cat >>confdefs.h <<\_ACEOF
5521#define MAJOR_IN_SYSMACROS 1
5522_ACEOF
5523
5524fi
5525
5526
5527 fi
5528fi
5529
Michael W. Hudson54241132001-12-07 15:38:26 +00005530
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005531# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005532
5533for ac_header in term.h
5534do
5535as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005536echo "$as_me:$LINENO: checking for $ac_header" >&5
5537echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5538if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005539 echo $ECHO_N "(cached) $ECHO_C" >&6
5540else
5541 cat >conftest.$ac_ext <<_ACEOF
5542/* confdefs.h. */
5543_ACEOF
5544cat confdefs.h >>conftest.$ac_ext
5545cat >>conftest.$ac_ext <<_ACEOF
5546/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005547
Martin v. Löwis5d52e782004-09-18 10:07:03 +00005548#ifdef HAVE_CURSES_H
5549#include <curses.h>
5550#endif
5551
5552
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005553#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005554_ACEOF
5555rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005556if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5557 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005558 ac_status=$?
5559 grep -v '^ *+' conftest.er1 >conftest.err
5560 rm -f conftest.er1
5561 cat conftest.err >&5
5562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005563 (exit $ac_status); } &&
5564 { ac_try='test -z "$ac_c_werror_flag"
5565 || test ! -s conftest.err'
5566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5567 (eval $ac_try) 2>&5
5568 ac_status=$?
5569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5570 (exit $ac_status); }; } &&
5571 { ac_try='test -s conftest.$ac_objext'
5572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5573 (eval $ac_try) 2>&5
5574 ac_status=$?
5575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5576 (exit $ac_status); }; }; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005577 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005578else
5579 echo "$as_me: failed program was:" >&5
5580sed 's/^/| /' conftest.$ac_ext >&5
5581
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005582eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005583fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005584rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005585fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005586echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5587echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005588if test `eval echo '${'$as_ac_Header'}'` = yes; then
5589 cat >>confdefs.h <<_ACEOF
5590#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5591_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005592
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00005593fi
5594
5595done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005596
5597
Martin v. Löwis11017b12006-01-14 18:12:57 +00005598# On Linux, netlink.h requires asm/types.h
5599
5600for ac_header in linux/netlink.h
5601do
5602as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005603echo "$as_me:$LINENO: checking for $ac_header" >&5
5604echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5605if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00005606 echo $ECHO_N "(cached) $ECHO_C" >&6
5607else
5608 cat >conftest.$ac_ext <<_ACEOF
5609/* confdefs.h. */
5610_ACEOF
5611cat confdefs.h >>conftest.$ac_ext
5612cat >>conftest.$ac_ext <<_ACEOF
5613/* end confdefs.h. */
5614
5615#ifdef HAVE_ASM_TYPES_H
5616#include <asm/types.h>
5617#endif
5618#ifdef HAVE_SYS_SOCKET_H
5619#include <sys/socket.h>
5620#endif
5621
5622
5623#include <$ac_header>
5624_ACEOF
5625rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005626if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5627 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00005628 ac_status=$?
5629 grep -v '^ *+' conftest.er1 >conftest.err
5630 rm -f conftest.er1
5631 cat conftest.err >&5
5632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005633 (exit $ac_status); } &&
5634 { ac_try='test -z "$ac_c_werror_flag"
5635 || test ! -s conftest.err'
5636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5637 (eval $ac_try) 2>&5
5638 ac_status=$?
5639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5640 (exit $ac_status); }; } &&
5641 { ac_try='test -s conftest.$ac_objext'
5642 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5643 (eval $ac_try) 2>&5
5644 ac_status=$?
5645 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5646 (exit $ac_status); }; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00005647 eval "$as_ac_Header=yes"
5648else
5649 echo "$as_me: failed program was:" >&5
5650sed 's/^/| /' conftest.$ac_ext >&5
5651
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005652eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00005653fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005654rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00005655fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005656echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5657echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00005658if test `eval echo '${'$as_ac_Header'}'` = yes; then
5659 cat >>confdefs.h <<_ACEOF
5660#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5661_ACEOF
5662
5663fi
5664
5665done
5666
5667
Guido van Rossum627b2d71993-12-24 10:39:16 +00005668# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005669was_it_defined=no
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005670echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5671echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005672cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005673/* confdefs.h. */
5674_ACEOF
5675cat confdefs.h >>conftest.$ac_ext
5676cat >>conftest.$ac_ext <<_ACEOF
5677/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005678#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005679
5680_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005681if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005682 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005683 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005684else
Martin v. Löwis11437992002-04-12 09:54:03 +00005685
5686
5687cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005688#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005689_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005690
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005691
Guido van Rossum627b2d71993-12-24 10:39:16 +00005692fi
5693rm -f conftest*
5694
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005695echo "$as_me:$LINENO: result: $was_it_defined" >&5
5696echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005697
Neal Norwitz11690112002-07-30 01:08:28 +00005698# Check whether using makedev requires defining _OSF_SOURCE
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005699echo "$as_me:$LINENO: checking for makedev" >&5
5700echo $ECHO_N "checking for makedev... $ECHO_C" >&6
Neal Norwitz11690112002-07-30 01:08:28 +00005701cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005702/* confdefs.h. */
5703_ACEOF
5704cat confdefs.h >>conftest.$ac_ext
5705cat >>conftest.$ac_ext <<_ACEOF
5706/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005707#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005708int
5709main ()
5710{
5711 makedev(0, 0)
5712 ;
5713 return 0;
5714}
5715_ACEOF
5716rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005717if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5718 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005720 grep -v '^ *+' conftest.er1 >conftest.err
5721 rm -f conftest.er1
5722 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005724 (exit $ac_status); } &&
5725 { ac_try='test -z "$ac_c_werror_flag"
5726 || test ! -s conftest.err'
5727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5728 (eval $ac_try) 2>&5
5729 ac_status=$?
5730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5731 (exit $ac_status); }; } &&
5732 { ac_try='test -s conftest$ac_exeext'
5733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5734 (eval $ac_try) 2>&5
5735 ac_status=$?
5736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5737 (exit $ac_status); }; }; then
Neal Norwitz11690112002-07-30 01:08:28 +00005738 ac_cv_has_makedev=yes
5739else
5740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005741sed 's/^/| /' conftest.$ac_ext >&5
5742
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005743ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00005744fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005745rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005746 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005747if test "$ac_cv_has_makedev" = "no"; then
5748 # we didn't link, try if _OSF_SOURCE will allow us to link
5749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005750/* confdefs.h. */
5751_ACEOF
5752cat confdefs.h >>conftest.$ac_ext
5753cat >>conftest.$ac_ext <<_ACEOF
5754/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005755
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005756#define _OSF_SOURCE 1
5757#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005758
Neal Norwitz11690112002-07-30 01:08:28 +00005759int
5760main ()
5761{
5762 makedev(0, 0)
5763 ;
5764 return 0;
5765}
5766_ACEOF
5767rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005768if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5769 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005771 grep -v '^ *+' conftest.er1 >conftest.err
5772 rm -f conftest.er1
5773 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005775 (exit $ac_status); } &&
5776 { ac_try='test -z "$ac_c_werror_flag"
5777 || test ! -s conftest.err'
5778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5779 (eval $ac_try) 2>&5
5780 ac_status=$?
5781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5782 (exit $ac_status); }; } &&
5783 { ac_try='test -s conftest$ac_exeext'
5784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5785 (eval $ac_try) 2>&5
5786 ac_status=$?
5787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5788 (exit $ac_status); }; }; then
Neal Norwitz11690112002-07-30 01:08:28 +00005789 ac_cv_has_makedev=yes
5790else
5791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005792sed 's/^/| /' conftest.$ac_ext >&5
5793
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005794ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00005795fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005796rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005797 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005798 if test "$ac_cv_has_makedev" = "yes"; then
5799
5800cat >>confdefs.h <<\_ACEOF
5801#define _OSF_SOURCE 1
5802_ACEOF
5803
5804 fi
5805fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005806echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5807echo "${ECHO_T}$ac_cv_has_makedev" >&6
Neal Norwitz11690112002-07-30 01:08:28 +00005808if test "$ac_cv_has_makedev" = "yes"; then
5809
5810cat >>confdefs.h <<\_ACEOF
5811#define HAVE_MAKEDEV 1
5812_ACEOF
5813
5814fi
5815
Martin v. Löwis399a6892002-10-04 10:22:02 +00005816# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5817# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5818# defined, but the compiler does not support pragma redefine_extname,
5819# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5820# structures (such as rlimit64) without declaring them. As a
5821# work-around, disable LFS on such configurations
5822
5823use_lfs=yes
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005824echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5825echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
Martin v. Löwis399a6892002-10-04 10:22:02 +00005826cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005827/* confdefs.h. */
5828_ACEOF
5829cat confdefs.h >>conftest.$ac_ext
5830cat >>conftest.$ac_ext <<_ACEOF
5831/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005832
5833#define _LARGEFILE_SOURCE 1
5834#define _FILE_OFFSET_BITS 64
5835#include <sys/resource.h>
5836
Martin v. Löwis399a6892002-10-04 10:22:02 +00005837int
5838main ()
5839{
5840struct rlimit foo;
5841 ;
5842 return 0;
5843}
5844_ACEOF
5845rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5847 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00005848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005849 grep -v '^ *+' conftest.er1 >conftest.err
5850 rm -f conftest.er1
5851 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00005852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005853 (exit $ac_status); } &&
5854 { ac_try='test -z "$ac_c_werror_flag"
5855 || test ! -s conftest.err'
5856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5857 (eval $ac_try) 2>&5
5858 ac_status=$?
5859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5860 (exit $ac_status); }; } &&
5861 { ac_try='test -s conftest.$ac_objext'
5862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5863 (eval $ac_try) 2>&5
5864 ac_status=$?
5865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5866 (exit $ac_status); }; }; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00005867 sol_lfs_bug=no
5868else
5869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005870sed 's/^/| /' conftest.$ac_ext >&5
5871
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005872sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00005873fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005874rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5875echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5876echo "${ECHO_T}$sol_lfs_bug" >&6
Martin v. Löwis399a6892002-10-04 10:22:02 +00005877if test "$sol_lfs_bug" = "yes"; then
5878 use_lfs=no
5879fi
5880
5881if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005882# Two defines needed to enable largefile support on various platforms
5883# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005884
Martin v. Löwis11437992002-04-12 09:54:03 +00005885cat >>confdefs.h <<\_ACEOF
5886#define _LARGEFILE_SOURCE 1
5887_ACEOF
5888
5889
5890cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005891#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005892_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005893
Martin v. Löwis399a6892002-10-04 10:22:02 +00005894fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005895
Guido van Rossum84e7b241996-08-19 21:59:00 +00005896# Add some code to confdefs.h so that the test for off_t works on SCO
5897cat >> confdefs.h <<\EOF
5898#if defined(SCO_DS)
5899#undef _OFF_T
5900#endif
5901EOF
5902
Guido van Rossumef2255b2000-03-10 22:30:29 +00005903# Type availability checks
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005904echo "$as_me:$LINENO: checking for mode_t" >&5
5905echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005906if test "${ac_cv_type_mode_t+set}" = set; then
5907 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005908else
Martin v. Löwis11437992002-04-12 09:54:03 +00005909 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005910/* confdefs.h. */
5911_ACEOF
5912cat confdefs.h >>conftest.$ac_ext
5913cat >>conftest.$ac_ext <<_ACEOF
5914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005915$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005916int
5917main ()
5918{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005919if ((mode_t *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00005920 return 0;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005921if (sizeof (mode_t))
Martin v. Löwis11437992002-04-12 09:54:03 +00005922 return 0;
5923 ;
5924 return 0;
5925}
5926_ACEOF
5927rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005928if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5929 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005930 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005931 grep -v '^ *+' conftest.er1 >conftest.err
5932 rm -f conftest.er1
5933 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005935 (exit $ac_status); } &&
5936 { ac_try='test -z "$ac_c_werror_flag"
5937 || test ! -s conftest.err'
5938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5939 (eval $ac_try) 2>&5
5940 ac_status=$?
5941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5942 (exit $ac_status); }; } &&
5943 { ac_try='test -s conftest.$ac_objext'
5944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5945 (eval $ac_try) 2>&5
5946 ac_status=$?
5947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5948 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005949 ac_cv_type_mode_t=yes
5950else
Martin v. Löwis11437992002-04-12 09:54:03 +00005951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005952sed 's/^/| /' conftest.$ac_ext >&5
5953
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005954ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005955fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005956rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005957fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005958echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5959echo "${ECHO_T}$ac_cv_type_mode_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005960if test $ac_cv_type_mode_t = yes; then
5961 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005962else
Martin v. Löwis11437992002-04-12 09:54:03 +00005963
5964cat >>confdefs.h <<_ACEOF
5965#define mode_t int
5966_ACEOF
5967
5968fi
5969
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005970echo "$as_me:$LINENO: checking for off_t" >&5
5971echo $ECHO_N "checking for off_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005972if test "${ac_cv_type_off_t+set}" = set; then
5973 echo $ECHO_N "(cached) $ECHO_C" >&6
5974else
5975 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005976/* confdefs.h. */
5977_ACEOF
5978cat confdefs.h >>conftest.$ac_ext
5979cat >>conftest.$ac_ext <<_ACEOF
5980/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005981$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005982int
5983main ()
5984{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005985if ((off_t *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00005986 return 0;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005987if (sizeof (off_t))
Martin v. Löwis11437992002-04-12 09:54:03 +00005988 return 0;
5989 ;
5990 return 0;
5991}
5992_ACEOF
5993rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00005994if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5995 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005996 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005997 grep -v '^ *+' conftest.er1 >conftest.err
5998 rm -f conftest.er1
5999 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006001 (exit $ac_status); } &&
6002 { ac_try='test -z "$ac_c_werror_flag"
6003 || test ! -s conftest.err'
6004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6005 (eval $ac_try) 2>&5
6006 ac_status=$?
6007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6008 (exit $ac_status); }; } &&
6009 { ac_try='test -s conftest.$ac_objext'
6010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6011 (eval $ac_try) 2>&5
6012 ac_status=$?
6013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6014 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006015 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006016else
Martin v. Löwis11437992002-04-12 09:54:03 +00006017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006018sed 's/^/| /' conftest.$ac_ext >&5
6019
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006020ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006021fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006022rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006023fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006024echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6025echo "${ECHO_T}$ac_cv_type_off_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006026if test $ac_cv_type_off_t = yes; then
6027 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006028else
Martin v. Löwis11437992002-04-12 09:54:03 +00006029
6030cat >>confdefs.h <<_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006031#define off_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006032_ACEOF
6033
6034fi
6035
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006036echo "$as_me:$LINENO: checking for pid_t" >&5
6037echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006038if test "${ac_cv_type_pid_t+set}" = set; then
6039 echo $ECHO_N "(cached) $ECHO_C" >&6
6040else
6041 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006042/* confdefs.h. */
6043_ACEOF
6044cat confdefs.h >>conftest.$ac_ext
6045cat >>conftest.$ac_ext <<_ACEOF
6046/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006047$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006048int
6049main ()
6050{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006051if ((pid_t *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006052 return 0;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006053if (sizeof (pid_t))
Martin v. Löwis11437992002-04-12 09:54:03 +00006054 return 0;
6055 ;
6056 return 0;
6057}
6058_ACEOF
6059rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006060if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6061 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006062 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006063 grep -v '^ *+' conftest.er1 >conftest.err
6064 rm -f conftest.er1
6065 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006067 (exit $ac_status); } &&
6068 { ac_try='test -z "$ac_c_werror_flag"
6069 || test ! -s conftest.err'
6070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6071 (eval $ac_try) 2>&5
6072 ac_status=$?
6073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6074 (exit $ac_status); }; } &&
6075 { ac_try='test -s conftest.$ac_objext'
6076 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6077 (eval $ac_try) 2>&5
6078 ac_status=$?
6079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6080 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006081 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006082else
Martin v. Löwis11437992002-04-12 09:54:03 +00006083 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006084sed 's/^/| /' conftest.$ac_ext >&5
6085
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006086ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006087fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006088rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006089fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006090echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6091echo "${ECHO_T}$ac_cv_type_pid_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006092if test $ac_cv_type_pid_t = yes; then
6093 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006094else
Martin v. Löwis11437992002-04-12 09:54:03 +00006095
6096cat >>confdefs.h <<_ACEOF
6097#define pid_t int
6098_ACEOF
6099
6100fi
6101
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006102echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6103echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006104if test "${ac_cv_type_signal+set}" = set; then
6105 echo $ECHO_N "(cached) $ECHO_C" >&6
6106else
6107 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006108/* confdefs.h. */
6109_ACEOF
6110cat confdefs.h >>conftest.$ac_ext
6111cat >>conftest.$ac_ext <<_ACEOF
6112/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006113#include <sys/types.h>
6114#include <signal.h>
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006115#ifdef signal
6116# undef signal
6117#endif
6118#ifdef __cplusplus
6119extern "C" void (*signal (int, void (*)(int)))(int);
6120#else
6121void (*signal ()) ();
6122#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006123
Martin v. Löwis11437992002-04-12 09:54:03 +00006124int
6125main ()
6126{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006127int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00006128 ;
6129 return 0;
6130}
6131_ACEOF
6132rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006133if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6134 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006136 grep -v '^ *+' conftest.er1 >conftest.err
6137 rm -f conftest.er1
6138 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006140 (exit $ac_status); } &&
6141 { ac_try='test -z "$ac_c_werror_flag"
6142 || test ! -s conftest.err'
6143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6144 (eval $ac_try) 2>&5
6145 ac_status=$?
6146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6147 (exit $ac_status); }; } &&
6148 { ac_try='test -s conftest.$ac_objext'
6149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6150 (eval $ac_try) 2>&5
6151 ac_status=$?
6152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6153 (exit $ac_status); }; }; then
6154 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006155else
Martin v. Löwis11437992002-04-12 09:54:03 +00006156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006157sed 's/^/| /' conftest.$ac_ext >&5
6158
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006159ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006160fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006161rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006162fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006163echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6164echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006165
Martin v. Löwis11437992002-04-12 09:54:03 +00006166cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006167#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006168_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006169
Michael W. Hudson54241132001-12-07 15:38:26 +00006170
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006171echo "$as_me:$LINENO: checking for size_t" >&5
6172echo $ECHO_N "checking for size_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006173if test "${ac_cv_type_size_t+set}" = set; then
6174 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006175else
Martin v. Löwis11437992002-04-12 09:54:03 +00006176 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006177/* confdefs.h. */
6178_ACEOF
6179cat confdefs.h >>conftest.$ac_ext
6180cat >>conftest.$ac_ext <<_ACEOF
6181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006182$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006183int
6184main ()
6185{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006186if ((size_t *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006187 return 0;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006188if (sizeof (size_t))
Martin v. Löwis11437992002-04-12 09:54:03 +00006189 return 0;
6190 ;
6191 return 0;
6192}
6193_ACEOF
6194rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006195if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6196 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006197 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006198 grep -v '^ *+' conftest.er1 >conftest.err
6199 rm -f conftest.er1
6200 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006202 (exit $ac_status); } &&
6203 { ac_try='test -z "$ac_c_werror_flag"
6204 || test ! -s conftest.err'
6205 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6206 (eval $ac_try) 2>&5
6207 ac_status=$?
6208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6209 (exit $ac_status); }; } &&
6210 { ac_try='test -s conftest.$ac_objext'
6211 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6212 (eval $ac_try) 2>&5
6213 ac_status=$?
6214 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6215 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006216 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006217else
Martin v. Löwis11437992002-04-12 09:54:03 +00006218 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006219sed 's/^/| /' conftest.$ac_ext >&5
6220
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006221ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006222fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006223rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006224fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006225echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6226echo "${ECHO_T}$ac_cv_type_size_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006227if test $ac_cv_type_size_t = yes; then
6228 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006229else
Martin v. Löwis11437992002-04-12 09:54:03 +00006230
6231cat >>confdefs.h <<_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006232#define size_t unsigned
Martin v. Löwis11437992002-04-12 09:54:03 +00006233_ACEOF
6234
6235fi
6236
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006237echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6238echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006239if test "${ac_cv_type_uid_t+set}" = set; then
6240 echo $ECHO_N "(cached) $ECHO_C" >&6
6241else
6242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006243/* confdefs.h. */
6244_ACEOF
6245cat confdefs.h >>conftest.$ac_ext
6246cat >>conftest.$ac_ext <<_ACEOF
6247/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006248#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006249
6250_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006251if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006252 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006253 ac_cv_type_uid_t=yes
6254else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006255 ac_cv_type_uid_t=no
6256fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006257rm -f conftest*
6258
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006259fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006260echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6261echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006262if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006263
Martin v. Löwis11437992002-04-12 09:54:03 +00006264cat >>confdefs.h <<\_ACEOF
6265#define uid_t int
6266_ACEOF
6267
6268
6269cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006270#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006271_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006272
6273fi
6274
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006275echo "$as_me:$LINENO: checking for ssize_t" >&5
6276echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006277if test "${ac_cv_type_ssize_t+set}" = set; then
6278 echo $ECHO_N "(cached) $ECHO_C" >&6
6279else
6280 cat >conftest.$ac_ext <<_ACEOF
6281/* confdefs.h. */
6282_ACEOF
6283cat confdefs.h >>conftest.$ac_ext
6284cat >>conftest.$ac_ext <<_ACEOF
6285/* end confdefs.h. */
6286$ac_includes_default
6287int
6288main ()
6289{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006290if ((ssize_t *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00006291 return 0;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006292if (sizeof (ssize_t))
Martin v. Löwis18e16552006-02-15 17:27:45 +00006293 return 0;
6294 ;
6295 return 0;
6296}
6297_ACEOF
6298rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006299if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6300 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00006301 ac_status=$?
6302 grep -v '^ *+' conftest.er1 >conftest.err
6303 rm -f conftest.er1
6304 cat conftest.err >&5
6305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006306 (exit $ac_status); } &&
6307 { ac_try='test -z "$ac_c_werror_flag"
6308 || test ! -s conftest.err'
6309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6310 (eval $ac_try) 2>&5
6311 ac_status=$?
6312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6313 (exit $ac_status); }; } &&
6314 { ac_try='test -s conftest.$ac_objext'
6315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6316 (eval $ac_try) 2>&5
6317 ac_status=$?
6318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6319 (exit $ac_status); }; }; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00006320 ac_cv_type_ssize_t=yes
6321else
6322 echo "$as_me: failed program was:" >&5
6323sed 's/^/| /' conftest.$ac_ext >&5
6324
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006325ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00006326fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006327rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00006328fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006329echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6330echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006331if test $ac_cv_type_ssize_t = yes; then
6332
6333cat >>confdefs.h <<\_ACEOF
6334#define HAVE_SSIZE_T 1
6335_ACEOF
6336
6337fi
6338
Jack Jansendd19cf82001-12-06 22:36:17 +00006339
Michael W. Hudson54241132001-12-07 15:38:26 +00006340# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006341# ANSI C requires sizeof(char) == 1, so no need to check it
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006342echo "$as_me:$LINENO: checking for int" >&5
6343echo $ECHO_N "checking for int... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006344if test "${ac_cv_type_int+set}" = set; then
6345 echo $ECHO_N "(cached) $ECHO_C" >&6
6346else
6347 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006348/* confdefs.h. */
6349_ACEOF
6350cat confdefs.h >>conftest.$ac_ext
6351cat >>conftest.$ac_ext <<_ACEOF
6352/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006353$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006354int
6355main ()
6356{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006357if ((int *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006358 return 0;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006359if (sizeof (int))
Martin v. Löwis11437992002-04-12 09:54:03 +00006360 return 0;
6361 ;
6362 return 0;
6363}
6364_ACEOF
6365rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006366if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6367 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006368 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006369 grep -v '^ *+' conftest.er1 >conftest.err
6370 rm -f conftest.er1
6371 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006373 (exit $ac_status); } &&
6374 { ac_try='test -z "$ac_c_werror_flag"
6375 || test ! -s conftest.err'
6376 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6377 (eval $ac_try) 2>&5
6378 ac_status=$?
6379 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6380 (exit $ac_status); }; } &&
6381 { ac_try='test -s conftest.$ac_objext'
6382 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6383 (eval $ac_try) 2>&5
6384 ac_status=$?
6385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6386 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006387 ac_cv_type_int=yes
6388else
6389 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006390sed 's/^/| /' conftest.$ac_ext >&5
6391
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006392ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006393fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006394rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006395fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006396echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6397echo "${ECHO_T}$ac_cv_type_int" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006398
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006399echo "$as_me:$LINENO: checking size of int" >&5
6400echo $ECHO_N "checking size of int... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006401if test "${ac_cv_sizeof_int+set}" = set; then
6402 echo $ECHO_N "(cached) $ECHO_C" >&6
6403else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006404 if test "$ac_cv_type_int" = yes; then
6405 # The cast to unsigned long works around a bug in the HP C Compiler
6406 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6407 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6408 # This bug is HP SR number 8606223364.
Martin v. Löwis11437992002-04-12 09:54:03 +00006409 if test "$cross_compiling" = yes; then
6410 # Depending upon the size, compute the lo and hi bounds.
6411cat >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{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006421static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00006422test_array [0] = 0
6423
6424 ;
6425 return 0;
6426}
6427_ACEOF
6428rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006429if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6430 (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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006436 (exit $ac_status); } &&
6437 { ac_try='test -z "$ac_c_werror_flag"
6438 || test ! -s conftest.err'
6439 { (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'
6445 { (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
Martin v. Löwis11437992002-04-12 09:54:03 +00006450 ac_lo=0 ac_mid=0
6451 while :; do
6452 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006453/* confdefs.h. */
6454_ACEOF
6455cat confdefs.h >>conftest.$ac_ext
6456cat >>conftest.$ac_ext <<_ACEOF
6457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006458$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006459int
6460main ()
6461{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006462static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00006463test_array [0] = 0
6464
6465 ;
6466 return 0;
6467}
6468_ACEOF
6469rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006470if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6471 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006472 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006473 grep -v '^ *+' conftest.er1 >conftest.err
6474 rm -f conftest.er1
6475 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006477 (exit $ac_status); } &&
6478 { ac_try='test -z "$ac_c_werror_flag"
6479 || test ! -s conftest.err'
6480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6481 (eval $ac_try) 2>&5
6482 ac_status=$?
6483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6484 (exit $ac_status); }; } &&
6485 { ac_try='test -s conftest.$ac_objext'
6486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6487 (eval $ac_try) 2>&5
6488 ac_status=$?
6489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6490 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006491 ac_hi=$ac_mid; break
6492else
6493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006494sed 's/^/| /' conftest.$ac_ext >&5
6495
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006496ac_lo=`expr $ac_mid + 1`
6497 if test $ac_lo -le $ac_mid; then
6498 ac_lo= ac_hi=
6499 break
6500 fi
6501 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006502fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006503rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006504 done
6505else
6506 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006507sed 's/^/| /' conftest.$ac_ext >&5
6508
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006509cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006510/* confdefs.h. */
6511_ACEOF
6512cat confdefs.h >>conftest.$ac_ext
6513cat >>conftest.$ac_ext <<_ACEOF
6514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006515$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006516int
6517main ()
6518{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006519static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00006520test_array [0] = 0
6521
6522 ;
6523 return 0;
6524}
6525_ACEOF
6526rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006527if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6528 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006530 grep -v '^ *+' conftest.er1 >conftest.err
6531 rm -f conftest.er1
6532 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006534 (exit $ac_status); } &&
6535 { ac_try='test -z "$ac_c_werror_flag"
6536 || test ! -s conftest.err'
6537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6538 (eval $ac_try) 2>&5
6539 ac_status=$?
6540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6541 (exit $ac_status); }; } &&
6542 { ac_try='test -s conftest.$ac_objext'
6543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6544 (eval $ac_try) 2>&5
6545 ac_status=$?
6546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6547 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006548 ac_hi=-1 ac_mid=-1
6549 while :; do
6550 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006551/* confdefs.h. */
6552_ACEOF
6553cat confdefs.h >>conftest.$ac_ext
6554cat >>conftest.$ac_ext <<_ACEOF
6555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006556$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006557int
6558main ()
6559{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006560static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00006561test_array [0] = 0
6562
6563 ;
6564 return 0;
6565}
6566_ACEOF
6567rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6569 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006570 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006571 grep -v '^ *+' conftest.er1 >conftest.err
6572 rm -f conftest.er1
6573 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006575 (exit $ac_status); } &&
6576 { ac_try='test -z "$ac_c_werror_flag"
6577 || test ! -s conftest.err'
6578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6579 (eval $ac_try) 2>&5
6580 ac_status=$?
6581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6582 (exit $ac_status); }; } &&
6583 { ac_try='test -s conftest.$ac_objext'
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
Martin v. Löwis11437992002-04-12 09:54:03 +00006589 ac_lo=$ac_mid; break
6590else
6591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006592sed 's/^/| /' conftest.$ac_ext >&5
6593
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006594ac_hi=`expr '(' $ac_mid ')' - 1`
6595 if test $ac_mid -le $ac_hi; then
6596 ac_lo= ac_hi=
6597 break
6598 fi
6599 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006600fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006601rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006602 done
6603else
6604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006605sed 's/^/| /' conftest.$ac_ext >&5
6606
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006607ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00006608fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006609rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006610fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006611rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006612# Binary search between lo and hi bounds.
6613while test "x$ac_lo" != "x$ac_hi"; do
6614 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6615 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006616/* confdefs.h. */
6617_ACEOF
6618cat confdefs.h >>conftest.$ac_ext
6619cat >>conftest.$ac_ext <<_ACEOF
6620/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006621$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006622int
6623main ()
6624{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006625static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00006626test_array [0] = 0
6627
6628 ;
6629 return 0;
6630}
6631_ACEOF
6632rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006633if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6634 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006636 grep -v '^ *+' conftest.er1 >conftest.err
6637 rm -f conftest.er1
6638 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006640 (exit $ac_status); } &&
6641 { ac_try='test -z "$ac_c_werror_flag"
6642 || test ! -s conftest.err'
6643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6644 (eval $ac_try) 2>&5
6645 ac_status=$?
6646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6647 (exit $ac_status); }; } &&
6648 { ac_try='test -s conftest.$ac_objext'
6649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6650 (eval $ac_try) 2>&5
6651 ac_status=$?
6652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6653 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006654 ac_hi=$ac_mid
6655else
6656 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006657sed 's/^/| /' conftest.$ac_ext >&5
6658
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006659ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006660fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006661rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006662done
6663case $ac_lo in
6664?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006665'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00006666See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006667echo "$as_me: error: cannot compute sizeof (int), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00006668See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006669 { (exit 1); exit 1; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00006670esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006671else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006672 if test "$cross_compiling" = yes; then
6673 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6674See \`config.log' for more details." >&5
6675echo "$as_me: error: cannot run test program while cross compiling
6676See \`config.log' for more details." >&2;}
6677 { (exit 1); exit 1; }; }
6678else
Martin v. Löwis11437992002-04-12 09:54:03 +00006679 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006680/* confdefs.h. */
6681_ACEOF
6682cat confdefs.h >>conftest.$ac_ext
6683cat >>conftest.$ac_ext <<_ACEOF
6684/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006685$ac_includes_default
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006686long longval () { return (long) (sizeof (int)); }
6687unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006688#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006689#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006690int
6691main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006692{
Martin v. Löwis11437992002-04-12 09:54:03 +00006693
6694 FILE *f = fopen ("conftest.val", "w");
6695 if (! f)
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006696 exit (1);
6697 if (((long) (sizeof (int))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006698 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006699 long i = longval ();
6700 if (i != ((long) (sizeof (int))))
6701 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00006702 fprintf (f, "%ld\n", i);
6703 }
6704 else
6705 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006706 unsigned long i = ulongval ();
6707 if (i != ((long) (sizeof (int))))
6708 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00006709 fprintf (f, "%lu\n", i);
6710 }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006711 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis11437992002-04-12 09:54:03 +00006712
6713 ;
6714 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006715}
Martin v. Löwis11437992002-04-12 09:54:03 +00006716_ACEOF
6717rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006718if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6719 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006720 ac_status=$?
6721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6722 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6724 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006725 ac_status=$?
6726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6727 (exit $ac_status); }; }; then
6728 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006729else
Martin v. Löwis11437992002-04-12 09:54:03 +00006730 echo "$as_me: program exited with status $ac_status" >&5
6731echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006732sed 's/^/| /' conftest.$ac_ext >&5
6733
Martin v. Löwis11437992002-04-12 09:54:03 +00006734( exit $ac_status )
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006735{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00006736See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006737echo "$as_me: error: cannot compute sizeof (int), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00006738See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006739 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006740fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006741rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6742fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006743fi
6744rm -f conftest.val
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006745else
6746 ac_cv_sizeof_int=0
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006747fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006748fi
6749echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6750echo "${ECHO_T}$ac_cv_sizeof_int" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006751cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006752#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006753_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006754
6755
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006756echo "$as_me:$LINENO: checking for long" >&5
6757echo $ECHO_N "checking for long... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006758if test "${ac_cv_type_long+set}" = set; then
6759 echo $ECHO_N "(cached) $ECHO_C" >&6
6760else
6761 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006762/* confdefs.h. */
6763_ACEOF
6764cat confdefs.h >>conftest.$ac_ext
6765cat >>conftest.$ac_ext <<_ACEOF
6766/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006767$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006768int
6769main ()
6770{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006771if ((long *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006772 return 0;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006773if (sizeof (long))
Martin v. Löwis11437992002-04-12 09:54:03 +00006774 return 0;
6775 ;
6776 return 0;
6777}
6778_ACEOF
6779rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6781 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006783 grep -v '^ *+' conftest.er1 >conftest.err
6784 rm -f conftest.er1
6785 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006787 (exit $ac_status); } &&
6788 { ac_try='test -z "$ac_c_werror_flag"
6789 || test ! -s conftest.err'
6790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6791 (eval $ac_try) 2>&5
6792 ac_status=$?
6793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6794 (exit $ac_status); }; } &&
6795 { ac_try='test -s conftest.$ac_objext'
6796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6797 (eval $ac_try) 2>&5
6798 ac_status=$?
6799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6800 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006801 ac_cv_type_long=yes
6802else
6803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006804sed 's/^/| /' conftest.$ac_ext >&5
6805
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006806ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006807fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006808rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006809fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006810echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6811echo "${ECHO_T}$ac_cv_type_long" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006812
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006813echo "$as_me:$LINENO: checking size of long" >&5
6814echo $ECHO_N "checking size of long... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006815if test "${ac_cv_sizeof_long+set}" = set; then
6816 echo $ECHO_N "(cached) $ECHO_C" >&6
6817else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006818 if test "$ac_cv_type_long" = yes; then
6819 # The cast to unsigned long works around a bug in the HP C Compiler
6820 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6821 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6822 # This bug is HP SR number 8606223364.
Martin v. Löwis11437992002-04-12 09:54:03 +00006823 if test "$cross_compiling" = yes; then
6824 # Depending upon the size, compute the lo and hi bounds.
6825cat >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{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006835static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00006836test_array [0] = 0
6837
6838 ;
6839 return 0;
6840}
6841_ACEOF
6842rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006843if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6844 (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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006850 (exit $ac_status); } &&
6851 { ac_try='test -z "$ac_c_werror_flag"
6852 || test ! -s conftest.err'
6853 { (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'
6859 { (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
Martin v. Löwis11437992002-04-12 09:54:03 +00006864 ac_lo=0 ac_mid=0
6865 while :; do
6866 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006867/* confdefs.h. */
6868_ACEOF
6869cat confdefs.h >>conftest.$ac_ext
6870cat >>conftest.$ac_ext <<_ACEOF
6871/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006872$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006873int
6874main ()
6875{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006876static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00006877test_array [0] = 0
6878
6879 ;
6880 return 0;
6881}
6882_ACEOF
6883rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006884if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6885 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006886 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006887 grep -v '^ *+' conftest.er1 >conftest.err
6888 rm -f conftest.er1
6889 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006891 (exit $ac_status); } &&
6892 { ac_try='test -z "$ac_c_werror_flag"
6893 || test ! -s conftest.err'
6894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6895 (eval $ac_try) 2>&5
6896 ac_status=$?
6897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6898 (exit $ac_status); }; } &&
6899 { ac_try='test -s conftest.$ac_objext'
6900 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6901 (eval $ac_try) 2>&5
6902 ac_status=$?
6903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6904 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006905 ac_hi=$ac_mid; break
6906else
6907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006908sed 's/^/| /' conftest.$ac_ext >&5
6909
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006910ac_lo=`expr $ac_mid + 1`
6911 if test $ac_lo -le $ac_mid; then
6912 ac_lo= ac_hi=
6913 break
6914 fi
6915 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006916fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006917rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006918 done
6919else
6920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006921sed 's/^/| /' conftest.$ac_ext >&5
6922
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006923cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006924/* confdefs.h. */
6925_ACEOF
6926cat confdefs.h >>conftest.$ac_ext
6927cat >>conftest.$ac_ext <<_ACEOF
6928/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006929$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006930int
6931main ()
6932{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006933static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00006934test_array [0] = 0
6935
6936 ;
6937 return 0;
6938}
6939_ACEOF
6940rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006941if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6942 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006944 grep -v '^ *+' conftest.er1 >conftest.err
6945 rm -f conftest.er1
6946 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006948 (exit $ac_status); } &&
6949 { ac_try='test -z "$ac_c_werror_flag"
6950 || test ! -s conftest.err'
6951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6952 (eval $ac_try) 2>&5
6953 ac_status=$?
6954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6955 (exit $ac_status); }; } &&
6956 { ac_try='test -s conftest.$ac_objext'
6957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6958 (eval $ac_try) 2>&5
6959 ac_status=$?
6960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6961 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006962 ac_hi=-1 ac_mid=-1
6963 while :; do
6964 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006965/* confdefs.h. */
6966_ACEOF
6967cat confdefs.h >>conftest.$ac_ext
6968cat >>conftest.$ac_ext <<_ACEOF
6969/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006970$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006971int
6972main ()
6973{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006974static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00006975test_array [0] = 0
6976
6977 ;
6978 return 0;
6979}
6980_ACEOF
6981rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006982if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6983 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006984 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006985 grep -v '^ *+' conftest.er1 >conftest.err
6986 rm -f conftest.er1
6987 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006989 (exit $ac_status); } &&
6990 { ac_try='test -z "$ac_c_werror_flag"
6991 || test ! -s conftest.err'
6992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6993 (eval $ac_try) 2>&5
6994 ac_status=$?
6995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6996 (exit $ac_status); }; } &&
6997 { ac_try='test -s conftest.$ac_objext'
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
Martin v. Löwis11437992002-04-12 09:54:03 +00007003 ac_lo=$ac_mid; break
7004else
7005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007006sed 's/^/| /' conftest.$ac_ext >&5
7007
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007008ac_hi=`expr '(' $ac_mid ')' - 1`
7009 if test $ac_mid -le $ac_hi; then
7010 ac_lo= ac_hi=
7011 break
7012 fi
7013 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007014fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007015rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007016 done
7017else
7018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007019sed 's/^/| /' conftest.$ac_ext >&5
7020
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007021ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007022fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007023rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007024fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007025rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007026# Binary search between lo and hi bounds.
7027while test "x$ac_lo" != "x$ac_hi"; do
7028 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7029 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007030/* confdefs.h. */
7031_ACEOF
7032cat confdefs.h >>conftest.$ac_ext
7033cat >>conftest.$ac_ext <<_ACEOF
7034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007035$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007036int
7037main ()
7038{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007039static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007040test_array [0] = 0
7041
7042 ;
7043 return 0;
7044}
7045_ACEOF
7046rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7048 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007050 grep -v '^ *+' conftest.er1 >conftest.err
7051 rm -f conftest.er1
7052 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007054 (exit $ac_status); } &&
7055 { ac_try='test -z "$ac_c_werror_flag"
7056 || test ! -s conftest.err'
7057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7058 (eval $ac_try) 2>&5
7059 ac_status=$?
7060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7061 (exit $ac_status); }; } &&
7062 { ac_try='test -s conftest.$ac_objext'
7063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7064 (eval $ac_try) 2>&5
7065 ac_status=$?
7066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7067 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007068 ac_hi=$ac_mid
7069else
7070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007071sed 's/^/| /' conftest.$ac_ext >&5
7072
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007073ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007074fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007075rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007076done
7077case $ac_lo in
7078?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007079'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007080See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007081echo "$as_me: error: cannot compute sizeof (long), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007082See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007083 { (exit 1); exit 1; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007084esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007085else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007086 if test "$cross_compiling" = yes; then
7087 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7088See \`config.log' for more details." >&5
7089echo "$as_me: error: cannot run test program while cross compiling
7090See \`config.log' for more details." >&2;}
7091 { (exit 1); exit 1; }; }
7092else
Martin v. Löwis11437992002-04-12 09:54:03 +00007093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007094/* confdefs.h. */
7095_ACEOF
7096cat confdefs.h >>conftest.$ac_ext
7097cat >>conftest.$ac_ext <<_ACEOF
7098/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007099$ac_includes_default
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007100long longval () { return (long) (sizeof (long)); }
7101unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007102#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007103#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007104int
7105main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007106{
Martin v. Löwis11437992002-04-12 09:54:03 +00007107
7108 FILE *f = fopen ("conftest.val", "w");
7109 if (! f)
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007110 exit (1);
7111 if (((long) (sizeof (long))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007112 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007113 long i = longval ();
7114 if (i != ((long) (sizeof (long))))
7115 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00007116 fprintf (f, "%ld\n", i);
7117 }
7118 else
7119 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007120 unsigned long i = ulongval ();
7121 if (i != ((long) (sizeof (long))))
7122 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00007123 fprintf (f, "%lu\n", i);
7124 }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007125 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis11437992002-04-12 09:54:03 +00007126
7127 ;
7128 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007129}
Martin v. Löwis11437992002-04-12 09:54:03 +00007130_ACEOF
7131rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7133 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007134 ac_status=$?
7135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7136 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7138 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007139 ac_status=$?
7140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7141 (exit $ac_status); }; }; then
7142 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007143else
Martin v. Löwis11437992002-04-12 09:54:03 +00007144 echo "$as_me: program exited with status $ac_status" >&5
7145echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007146sed 's/^/| /' conftest.$ac_ext >&5
7147
Martin v. Löwis11437992002-04-12 09:54:03 +00007148( exit $ac_status )
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007149{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007150See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007151echo "$as_me: error: cannot compute sizeof (long), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007152See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007153 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007154fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007155rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7156fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007157fi
7158rm -f conftest.val
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007159else
7160 ac_cv_sizeof_long=0
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007161fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007162fi
7163echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7164echo "${ECHO_T}$ac_cv_sizeof_long" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007165cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007166#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007167_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007168
7169
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007170echo "$as_me:$LINENO: checking for void *" >&5
7171echo $ECHO_N "checking for void *... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007172if test "${ac_cv_type_void_p+set}" = set; then
7173 echo $ECHO_N "(cached) $ECHO_C" >&6
7174else
7175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007176/* confdefs.h. */
7177_ACEOF
7178cat confdefs.h >>conftest.$ac_ext
7179cat >>conftest.$ac_ext <<_ACEOF
7180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007181$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007182int
7183main ()
7184{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007185if ((void * *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007186 return 0;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007187if (sizeof (void *))
Martin v. Löwis11437992002-04-12 09:54:03 +00007188 return 0;
7189 ;
7190 return 0;
7191}
7192_ACEOF
7193rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007194if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7195 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007197 grep -v '^ *+' conftest.er1 >conftest.err
7198 rm -f conftest.er1
7199 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007201 (exit $ac_status); } &&
7202 { ac_try='test -z "$ac_c_werror_flag"
7203 || test ! -s conftest.err'
7204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7205 (eval $ac_try) 2>&5
7206 ac_status=$?
7207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7208 (exit $ac_status); }; } &&
7209 { ac_try='test -s conftest.$ac_objext'
7210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7211 (eval $ac_try) 2>&5
7212 ac_status=$?
7213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7214 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007215 ac_cv_type_void_p=yes
7216else
7217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007218sed 's/^/| /' conftest.$ac_ext >&5
7219
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007220ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007221fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007222rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007223fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007224echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7225echo "${ECHO_T}$ac_cv_type_void_p" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007226
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007227echo "$as_me:$LINENO: checking size of void *" >&5
7228echo $ECHO_N "checking size of void *... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007229if test "${ac_cv_sizeof_void_p+set}" = set; then
7230 echo $ECHO_N "(cached) $ECHO_C" >&6
7231else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007232 if test "$ac_cv_type_void_p" = yes; then
7233 # The cast to unsigned long works around a bug in the HP C Compiler
7234 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7235 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7236 # This bug is HP SR number 8606223364.
Martin v. Löwis11437992002-04-12 09:54:03 +00007237 if test "$cross_compiling" = yes; then
7238 # Depending upon the size, compute the lo and hi bounds.
7239cat >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{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007249static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007250test_array [0] = 0
7251
7252 ;
7253 return 0;
7254}
7255_ACEOF
7256rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007257if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7258 (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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007264 (exit $ac_status); } &&
7265 { ac_try='test -z "$ac_c_werror_flag"
7266 || test ! -s conftest.err'
7267 { (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'
7273 { (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
Martin v. Löwis11437992002-04-12 09:54:03 +00007278 ac_lo=0 ac_mid=0
7279 while :; do
7280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007281/* confdefs.h. */
7282_ACEOF
7283cat confdefs.h >>conftest.$ac_ext
7284cat >>conftest.$ac_ext <<_ACEOF
7285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007286$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007287int
7288main ()
7289{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007290static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007291test_array [0] = 0
7292
7293 ;
7294 return 0;
7295}
7296_ACEOF
7297rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007298if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7299 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007301 grep -v '^ *+' conftest.er1 >conftest.err
7302 rm -f conftest.er1
7303 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007305 (exit $ac_status); } &&
7306 { ac_try='test -z "$ac_c_werror_flag"
7307 || test ! -s conftest.err'
7308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7309 (eval $ac_try) 2>&5
7310 ac_status=$?
7311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7312 (exit $ac_status); }; } &&
7313 { ac_try='test -s conftest.$ac_objext'
7314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7315 (eval $ac_try) 2>&5
7316 ac_status=$?
7317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7318 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007319 ac_hi=$ac_mid; break
7320else
7321 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007322sed 's/^/| /' conftest.$ac_ext >&5
7323
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007324ac_lo=`expr $ac_mid + 1`
7325 if test $ac_lo -le $ac_mid; then
7326 ac_lo= ac_hi=
7327 break
7328 fi
7329 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007330fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007331rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007332 done
7333else
7334 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007335sed 's/^/| /' conftest.$ac_ext >&5
7336
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007337cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007338/* confdefs.h. */
7339_ACEOF
7340cat confdefs.h >>conftest.$ac_ext
7341cat >>conftest.$ac_ext <<_ACEOF
7342/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007343$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007344int
7345main ()
7346{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007347static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007348test_array [0] = 0
7349
7350 ;
7351 return 0;
7352}
7353_ACEOF
7354rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007355if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7356 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007358 grep -v '^ *+' conftest.er1 >conftest.err
7359 rm -f conftest.er1
7360 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007362 (exit $ac_status); } &&
7363 { ac_try='test -z "$ac_c_werror_flag"
7364 || test ! -s conftest.err'
7365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7366 (eval $ac_try) 2>&5
7367 ac_status=$?
7368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7369 (exit $ac_status); }; } &&
7370 { ac_try='test -s conftest.$ac_objext'
7371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7372 (eval $ac_try) 2>&5
7373 ac_status=$?
7374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7375 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007376 ac_hi=-1 ac_mid=-1
7377 while :; do
7378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007379/* confdefs.h. */
7380_ACEOF
7381cat confdefs.h >>conftest.$ac_ext
7382cat >>conftest.$ac_ext <<_ACEOF
7383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007384$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007385int
7386main ()
7387{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007388static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007389test_array [0] = 0
7390
7391 ;
7392 return 0;
7393}
7394_ACEOF
7395rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007396if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7397 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007398 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007399 grep -v '^ *+' conftest.er1 >conftest.err
7400 rm -f conftest.er1
7401 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007403 (exit $ac_status); } &&
7404 { ac_try='test -z "$ac_c_werror_flag"
7405 || test ! -s conftest.err'
7406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7407 (eval $ac_try) 2>&5
7408 ac_status=$?
7409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7410 (exit $ac_status); }; } &&
7411 { ac_try='test -s conftest.$ac_objext'
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
Martin v. Löwis11437992002-04-12 09:54:03 +00007417 ac_lo=$ac_mid; break
7418else
7419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007420sed 's/^/| /' conftest.$ac_ext >&5
7421
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007422ac_hi=`expr '(' $ac_mid ')' - 1`
7423 if test $ac_mid -le $ac_hi; then
7424 ac_lo= ac_hi=
7425 break
7426 fi
7427 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007428fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007429rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007430 done
7431else
7432 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007433sed 's/^/| /' conftest.$ac_ext >&5
7434
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007435ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007436fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007437rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007438fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007439rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007440# Binary search between lo and hi bounds.
7441while test "x$ac_lo" != "x$ac_hi"; do
7442 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7443 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007444/* confdefs.h. */
7445_ACEOF
7446cat confdefs.h >>conftest.$ac_ext
7447cat >>conftest.$ac_ext <<_ACEOF
7448/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007449$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007450int
7451main ()
7452{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007453static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007454test_array [0] = 0
7455
7456 ;
7457 return 0;
7458}
7459_ACEOF
7460rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007461if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7462 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007463 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007464 grep -v '^ *+' conftest.er1 >conftest.err
7465 rm -f conftest.er1
7466 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007468 (exit $ac_status); } &&
7469 { ac_try='test -z "$ac_c_werror_flag"
7470 || test ! -s conftest.err'
7471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7472 (eval $ac_try) 2>&5
7473 ac_status=$?
7474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7475 (exit $ac_status); }; } &&
7476 { ac_try='test -s conftest.$ac_objext'
7477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7478 (eval $ac_try) 2>&5
7479 ac_status=$?
7480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7481 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007482 ac_hi=$ac_mid
7483else
7484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007485sed 's/^/| /' conftest.$ac_ext >&5
7486
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007487ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007488fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007489rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007490done
7491case $ac_lo in
7492?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007493'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007494See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007495echo "$as_me: error: cannot compute sizeof (void *), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007496See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007497 { (exit 1); exit 1; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007498esac
Guido van Rossumad678af1998-10-02 14:42:15 +00007499else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007500 if test "$cross_compiling" = yes; then
7501 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7502See \`config.log' for more details." >&5
7503echo "$as_me: error: cannot run test program while cross compiling
7504See \`config.log' for more details." >&2;}
7505 { (exit 1); exit 1; }; }
7506else
Martin v. Löwis11437992002-04-12 09:54:03 +00007507 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007508/* confdefs.h. */
7509_ACEOF
7510cat confdefs.h >>conftest.$ac_ext
7511cat >>conftest.$ac_ext <<_ACEOF
7512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007513$ac_includes_default
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007514long longval () { return (long) (sizeof (void *)); }
7515unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007516#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007517#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007518int
7519main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00007520{
Martin v. Löwis11437992002-04-12 09:54:03 +00007521
7522 FILE *f = fopen ("conftest.val", "w");
7523 if (! f)
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007524 exit (1);
7525 if (((long) (sizeof (void *))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007526 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007527 long i = longval ();
7528 if (i != ((long) (sizeof (void *))))
7529 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00007530 fprintf (f, "%ld\n", i);
7531 }
7532 else
7533 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007534 unsigned long i = ulongval ();
7535 if (i != ((long) (sizeof (void *))))
7536 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00007537 fprintf (f, "%lu\n", i);
7538 }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007539 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis11437992002-04-12 09:54:03 +00007540
7541 ;
7542 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00007543}
Martin v. Löwis11437992002-04-12 09:54:03 +00007544_ACEOF
7545rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007546if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7547 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007548 ac_status=$?
7549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7550 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7552 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007553 ac_status=$?
7554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7555 (exit $ac_status); }; }; then
7556 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00007557else
Martin v. Löwis11437992002-04-12 09:54:03 +00007558 echo "$as_me: program exited with status $ac_status" >&5
7559echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007560sed 's/^/| /' conftest.$ac_ext >&5
7561
Martin v. Löwis11437992002-04-12 09:54:03 +00007562( exit $ac_status )
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007563{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007564See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007565echo "$as_me: error: cannot compute sizeof (void *), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007566See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007567 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007568fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007569rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7570fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007571fi
7572rm -f conftest.val
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007573else
7574 ac_cv_sizeof_void_p=0
Guido van Rossumad678af1998-10-02 14:42:15 +00007575fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007576fi
7577echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
7578echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007579cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007580#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007581_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007582
7583
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007584echo "$as_me:$LINENO: checking for short" >&5
7585echo $ECHO_N "checking for short... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007586if test "${ac_cv_type_short+set}" = set; then
7587 echo $ECHO_N "(cached) $ECHO_C" >&6
7588else
7589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007590/* confdefs.h. */
7591_ACEOF
7592cat confdefs.h >>conftest.$ac_ext
7593cat >>conftest.$ac_ext <<_ACEOF
7594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007595$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007596int
7597main ()
7598{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007599if ((short *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007600 return 0;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007601if (sizeof (short))
Martin v. Löwis11437992002-04-12 09:54:03 +00007602 return 0;
7603 ;
7604 return 0;
7605}
7606_ACEOF
7607rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007608if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7609 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007610 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007611 grep -v '^ *+' conftest.er1 >conftest.err
7612 rm -f conftest.er1
7613 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007615 (exit $ac_status); } &&
7616 { ac_try='test -z "$ac_c_werror_flag"
7617 || test ! -s conftest.err'
7618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7619 (eval $ac_try) 2>&5
7620 ac_status=$?
7621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7622 (exit $ac_status); }; } &&
7623 { ac_try='test -s conftest.$ac_objext'
7624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7625 (eval $ac_try) 2>&5
7626 ac_status=$?
7627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7628 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007629 ac_cv_type_short=yes
7630else
7631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007632sed 's/^/| /' conftest.$ac_ext >&5
7633
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007634ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007635fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007636rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007637fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007638echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7639echo "${ECHO_T}$ac_cv_type_short" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007640
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007641echo "$as_me:$LINENO: checking size of short" >&5
7642echo $ECHO_N "checking size of short... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007643if test "${ac_cv_sizeof_short+set}" = set; then
7644 echo $ECHO_N "(cached) $ECHO_C" >&6
7645else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007646 if test "$ac_cv_type_short" = yes; then
7647 # The cast to unsigned long works around a bug in the HP C Compiler
7648 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7649 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7650 # This bug is HP SR number 8606223364.
Martin v. Löwis11437992002-04-12 09:54:03 +00007651 if test "$cross_compiling" = yes; then
7652 # Depending upon the size, compute the lo and hi bounds.
7653cat >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{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007663static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007664test_array [0] = 0
7665
7666 ;
7667 return 0;
7668}
7669_ACEOF
7670rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007671if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7672 (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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007678 (exit $ac_status); } &&
7679 { ac_try='test -z "$ac_c_werror_flag"
7680 || test ! -s conftest.err'
7681 { (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'
7687 { (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
Martin v. Löwis11437992002-04-12 09:54:03 +00007692 ac_lo=0 ac_mid=0
7693 while :; do
7694 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007695/* confdefs.h. */
7696_ACEOF
7697cat confdefs.h >>conftest.$ac_ext
7698cat >>conftest.$ac_ext <<_ACEOF
7699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007700$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007701int
7702main ()
7703{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007704static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007705test_array [0] = 0
7706
7707 ;
7708 return 0;
7709}
7710_ACEOF
7711rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7713 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007714 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007715 grep -v '^ *+' conftest.er1 >conftest.err
7716 rm -f conftest.er1
7717 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007719 (exit $ac_status); } &&
7720 { ac_try='test -z "$ac_c_werror_flag"
7721 || test ! -s conftest.err'
7722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7723 (eval $ac_try) 2>&5
7724 ac_status=$?
7725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7726 (exit $ac_status); }; } &&
7727 { ac_try='test -s conftest.$ac_objext'
7728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7729 (eval $ac_try) 2>&5
7730 ac_status=$?
7731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7732 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007733 ac_hi=$ac_mid; break
7734else
7735 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007736sed 's/^/| /' conftest.$ac_ext >&5
7737
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007738ac_lo=`expr $ac_mid + 1`
7739 if test $ac_lo -le $ac_mid; then
7740 ac_lo= ac_hi=
7741 break
7742 fi
7743 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007744fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007745rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007746 done
7747else
7748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007749sed 's/^/| /' conftest.$ac_ext >&5
7750
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007751cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007752/* confdefs.h. */
7753_ACEOF
7754cat confdefs.h >>conftest.$ac_ext
7755cat >>conftest.$ac_ext <<_ACEOF
7756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007757$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007758int
7759main ()
7760{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007761static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007762test_array [0] = 0
7763
7764 ;
7765 return 0;
7766}
7767_ACEOF
7768rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007769if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7770 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007772 grep -v '^ *+' conftest.er1 >conftest.err
7773 rm -f conftest.er1
7774 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007776 (exit $ac_status); } &&
7777 { ac_try='test -z "$ac_c_werror_flag"
7778 || test ! -s conftest.err'
7779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7780 (eval $ac_try) 2>&5
7781 ac_status=$?
7782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7783 (exit $ac_status); }; } &&
7784 { ac_try='test -s conftest.$ac_objext'
7785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7786 (eval $ac_try) 2>&5
7787 ac_status=$?
7788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7789 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007790 ac_hi=-1 ac_mid=-1
7791 while :; do
7792 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007793/* confdefs.h. */
7794_ACEOF
7795cat confdefs.h >>conftest.$ac_ext
7796cat >>conftest.$ac_ext <<_ACEOF
7797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007798$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007799int
7800main ()
7801{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007802static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007803test_array [0] = 0
7804
7805 ;
7806 return 0;
7807}
7808_ACEOF
7809rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007810if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7811 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007813 grep -v '^ *+' conftest.er1 >conftest.err
7814 rm -f conftest.er1
7815 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007817 (exit $ac_status); } &&
7818 { ac_try='test -z "$ac_c_werror_flag"
7819 || test ! -s conftest.err'
7820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7821 (eval $ac_try) 2>&5
7822 ac_status=$?
7823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7824 (exit $ac_status); }; } &&
7825 { ac_try='test -s conftest.$ac_objext'
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
Martin v. Löwis11437992002-04-12 09:54:03 +00007831 ac_lo=$ac_mid; break
7832else
7833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007834sed 's/^/| /' conftest.$ac_ext >&5
7835
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007836ac_hi=`expr '(' $ac_mid ')' - 1`
7837 if test $ac_mid -le $ac_hi; then
7838 ac_lo= ac_hi=
7839 break
7840 fi
7841 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007842fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007843rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007844 done
7845else
7846 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007847sed 's/^/| /' conftest.$ac_ext >&5
7848
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007849ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007850fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007851rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007852fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007853rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007854# Binary search between lo and hi bounds.
7855while test "x$ac_lo" != "x$ac_hi"; do
7856 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7857 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007858/* confdefs.h. */
7859_ACEOF
7860cat confdefs.h >>conftest.$ac_ext
7861cat >>conftest.$ac_ext <<_ACEOF
7862/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007863$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007864int
7865main ()
7866{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007867static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007868test_array [0] = 0
7869
7870 ;
7871 return 0;
7872}
7873_ACEOF
7874rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007875if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7876 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007878 grep -v '^ *+' conftest.er1 >conftest.err
7879 rm -f conftest.er1
7880 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007882 (exit $ac_status); } &&
7883 { ac_try='test -z "$ac_c_werror_flag"
7884 || test ! -s conftest.err'
7885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7886 (eval $ac_try) 2>&5
7887 ac_status=$?
7888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7889 (exit $ac_status); }; } &&
7890 { ac_try='test -s conftest.$ac_objext'
7891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7892 (eval $ac_try) 2>&5
7893 ac_status=$?
7894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7895 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007896 ac_hi=$ac_mid
7897else
7898 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007899sed 's/^/| /' conftest.$ac_ext >&5
7900
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007901ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007902fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007903rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007904done
7905case $ac_lo in
7906?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007907'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007908See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007909echo "$as_me: error: cannot compute sizeof (short), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007910See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007911 { (exit 1); exit 1; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007912esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007913else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007914 if test "$cross_compiling" = yes; then
7915 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7916See \`config.log' for more details." >&5
7917echo "$as_me: error: cannot run test program while cross compiling
7918See \`config.log' for more details." >&2;}
7919 { (exit 1); exit 1; }; }
7920else
Martin v. Löwis11437992002-04-12 09:54:03 +00007921 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007922/* confdefs.h. */
7923_ACEOF
7924cat confdefs.h >>conftest.$ac_ext
7925cat >>conftest.$ac_ext <<_ACEOF
7926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007927$ac_includes_default
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007928long longval () { return (long) (sizeof (short)); }
7929unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007930#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007931#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007932int
7933main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007934{
Martin v. Löwis11437992002-04-12 09:54:03 +00007935
7936 FILE *f = fopen ("conftest.val", "w");
7937 if (! f)
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007938 exit (1);
7939 if (((long) (sizeof (short))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007940 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007941 long i = longval ();
7942 if (i != ((long) (sizeof (short))))
7943 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00007944 fprintf (f, "%ld\n", i);
7945 }
7946 else
7947 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007948 unsigned long i = ulongval ();
7949 if (i != ((long) (sizeof (short))))
7950 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00007951 fprintf (f, "%lu\n", i);
7952 }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007953 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis11437992002-04-12 09:54:03 +00007954
7955 ;
7956 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007957}
Martin v. Löwis11437992002-04-12 09:54:03 +00007958_ACEOF
7959rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007960if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7961 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007962 ac_status=$?
7963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7964 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7966 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007967 ac_status=$?
7968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7969 (exit $ac_status); }; }; then
7970 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007971else
Martin v. Löwis11437992002-04-12 09:54:03 +00007972 echo "$as_me: program exited with status $ac_status" >&5
7973echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007974sed 's/^/| /' conftest.$ac_ext >&5
7975
Martin v. Löwis11437992002-04-12 09:54:03 +00007976( exit $ac_status )
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007977{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007978See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007979echo "$as_me: error: cannot compute sizeof (short), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007980See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007981 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007982fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007983rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7984fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007985fi
7986rm -f conftest.val
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007987else
7988 ac_cv_sizeof_short=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00007989fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007990fi
7991echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7992echo "${ECHO_T}$ac_cv_sizeof_short" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007993cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007994#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007995_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007996
7997
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00007998echo "$as_me:$LINENO: checking for float" >&5
7999echo $ECHO_N "checking for float... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008000if test "${ac_cv_type_float+set}" = set; then
8001 echo $ECHO_N "(cached) $ECHO_C" >&6
8002else
8003 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008004/* confdefs.h. */
8005_ACEOF
8006cat confdefs.h >>conftest.$ac_ext
8007cat >>conftest.$ac_ext <<_ACEOF
8008/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008009$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008010int
8011main ()
8012{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008013if ((float *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008014 return 0;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008015if (sizeof (float))
Martin v. Löwis11437992002-04-12 09:54:03 +00008016 return 0;
8017 ;
8018 return 0;
8019}
8020_ACEOF
8021rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008022if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8023 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008024 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008025 grep -v '^ *+' conftest.er1 >conftest.err
8026 rm -f conftest.er1
8027 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008029 (exit $ac_status); } &&
8030 { ac_try='test -z "$ac_c_werror_flag"
8031 || test ! -s conftest.err'
8032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8033 (eval $ac_try) 2>&5
8034 ac_status=$?
8035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8036 (exit $ac_status); }; } &&
8037 { ac_try='test -s conftest.$ac_objext'
8038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8039 (eval $ac_try) 2>&5
8040 ac_status=$?
8041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8042 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008043 ac_cv_type_float=yes
8044else
8045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008046sed 's/^/| /' conftest.$ac_ext >&5
8047
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008048ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008049fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008050rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008051fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008052echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8053echo "${ECHO_T}$ac_cv_type_float" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008054
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008055echo "$as_me:$LINENO: checking size of float" >&5
8056echo $ECHO_N "checking size of float... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008057if test "${ac_cv_sizeof_float+set}" = set; then
8058 echo $ECHO_N "(cached) $ECHO_C" >&6
8059else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008060 if test "$ac_cv_type_float" = yes; then
8061 # The cast to unsigned long works around a bug in the HP C Compiler
8062 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8063 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8064 # This bug is HP SR number 8606223364.
Martin v. Löwis11437992002-04-12 09:54:03 +00008065 if test "$cross_compiling" = yes; then
8066 # Depending upon the size, compute the lo and hi bounds.
8067cat >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{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008077static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008078test_array [0] = 0
8079
8080 ;
8081 return 0;
8082}
8083_ACEOF
8084rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008085if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8086 (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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008092 (exit $ac_status); } &&
8093 { ac_try='test -z "$ac_c_werror_flag"
8094 || test ! -s conftest.err'
8095 { (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'
8101 { (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
Martin v. Löwis11437992002-04-12 09:54:03 +00008106 ac_lo=0 ac_mid=0
8107 while :; do
8108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008109/* confdefs.h. */
8110_ACEOF
8111cat confdefs.h >>conftest.$ac_ext
8112cat >>conftest.$ac_ext <<_ACEOF
8113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008114$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008115int
8116main ()
8117{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008118static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008119test_array [0] = 0
8120
8121 ;
8122 return 0;
8123}
8124_ACEOF
8125rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008126if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8127 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008128 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008129 grep -v '^ *+' conftest.er1 >conftest.err
8130 rm -f conftest.er1
8131 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008133 (exit $ac_status); } &&
8134 { ac_try='test -z "$ac_c_werror_flag"
8135 || test ! -s conftest.err'
8136 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8137 (eval $ac_try) 2>&5
8138 ac_status=$?
8139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8140 (exit $ac_status); }; } &&
8141 { ac_try='test -s conftest.$ac_objext'
8142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8143 (eval $ac_try) 2>&5
8144 ac_status=$?
8145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8146 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008147 ac_hi=$ac_mid; break
8148else
8149 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008150sed 's/^/| /' conftest.$ac_ext >&5
8151
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008152ac_lo=`expr $ac_mid + 1`
8153 if test $ac_lo -le $ac_mid; then
8154 ac_lo= ac_hi=
8155 break
8156 fi
8157 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008158fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008159rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008160 done
8161else
8162 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008163sed 's/^/| /' conftest.$ac_ext >&5
8164
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008165cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008166/* confdefs.h. */
8167_ACEOF
8168cat confdefs.h >>conftest.$ac_ext
8169cat >>conftest.$ac_ext <<_ACEOF
8170/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008171$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008172int
8173main ()
8174{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008175static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008176test_array [0] = 0
8177
8178 ;
8179 return 0;
8180}
8181_ACEOF
8182rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008183if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8184 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008186 grep -v '^ *+' conftest.er1 >conftest.err
8187 rm -f conftest.er1
8188 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008190 (exit $ac_status); } &&
8191 { ac_try='test -z "$ac_c_werror_flag"
8192 || test ! -s conftest.err'
8193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8194 (eval $ac_try) 2>&5
8195 ac_status=$?
8196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8197 (exit $ac_status); }; } &&
8198 { ac_try='test -s conftest.$ac_objext'
8199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8200 (eval $ac_try) 2>&5
8201 ac_status=$?
8202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8203 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008204 ac_hi=-1 ac_mid=-1
8205 while :; do
8206 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008207/* confdefs.h. */
8208_ACEOF
8209cat confdefs.h >>conftest.$ac_ext
8210cat >>conftest.$ac_ext <<_ACEOF
8211/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008212$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008213int
8214main ()
8215{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008216static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008217test_array [0] = 0
8218
8219 ;
8220 return 0;
8221}
8222_ACEOF
8223rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008224if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8225 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008227 grep -v '^ *+' conftest.er1 >conftest.err
8228 rm -f conftest.er1
8229 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008231 (exit $ac_status); } &&
8232 { ac_try='test -z "$ac_c_werror_flag"
8233 || test ! -s conftest.err'
8234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8235 (eval $ac_try) 2>&5
8236 ac_status=$?
8237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8238 (exit $ac_status); }; } &&
8239 { ac_try='test -s conftest.$ac_objext'
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
Martin v. Löwis11437992002-04-12 09:54:03 +00008245 ac_lo=$ac_mid; break
8246else
8247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008248sed 's/^/| /' conftest.$ac_ext >&5
8249
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008250ac_hi=`expr '(' $ac_mid ')' - 1`
8251 if test $ac_mid -le $ac_hi; then
8252 ac_lo= ac_hi=
8253 break
8254 fi
8255 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008256fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008257rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008258 done
8259else
8260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008261sed 's/^/| /' conftest.$ac_ext >&5
8262
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008263ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008264fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008265rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008266fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008267rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008268# Binary search between lo and hi bounds.
8269while test "x$ac_lo" != "x$ac_hi"; do
8270 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8271 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008272/* confdefs.h. */
8273_ACEOF
8274cat confdefs.h >>conftest.$ac_ext
8275cat >>conftest.$ac_ext <<_ACEOF
8276/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008277$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008278int
8279main ()
8280{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008281static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008282test_array [0] = 0
8283
8284 ;
8285 return 0;
8286}
8287_ACEOF
8288rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008289if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8290 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008291 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008292 grep -v '^ *+' conftest.er1 >conftest.err
8293 rm -f conftest.er1
8294 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008296 (exit $ac_status); } &&
8297 { ac_try='test -z "$ac_c_werror_flag"
8298 || test ! -s conftest.err'
8299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8300 (eval $ac_try) 2>&5
8301 ac_status=$?
8302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8303 (exit $ac_status); }; } &&
8304 { ac_try='test -s conftest.$ac_objext'
8305 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8306 (eval $ac_try) 2>&5
8307 ac_status=$?
8308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8309 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008310 ac_hi=$ac_mid
8311else
8312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008313sed 's/^/| /' conftest.$ac_ext >&5
8314
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008315ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008316fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008317rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008318done
8319case $ac_lo in
8320?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008321'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00008322See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008323echo "$as_me: error: cannot compute sizeof (float), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00008324See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008325 { (exit 1); exit 1; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008326esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008327else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008328 if test "$cross_compiling" = yes; then
8329 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8330See \`config.log' for more details." >&5
8331echo "$as_me: error: cannot run test program while cross compiling
8332See \`config.log' for more details." >&2;}
8333 { (exit 1); exit 1; }; }
8334else
Martin v. Löwis11437992002-04-12 09:54:03 +00008335 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008336/* confdefs.h. */
8337_ACEOF
8338cat confdefs.h >>conftest.$ac_ext
8339cat >>conftest.$ac_ext <<_ACEOF
8340/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008341$ac_includes_default
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008342long longval () { return (long) (sizeof (float)); }
8343unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008344#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008345#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008346int
8347main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008348{
Martin v. Löwis11437992002-04-12 09:54:03 +00008349
8350 FILE *f = fopen ("conftest.val", "w");
8351 if (! f)
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008352 exit (1);
8353 if (((long) (sizeof (float))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008354 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008355 long i = longval ();
8356 if (i != ((long) (sizeof (float))))
8357 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00008358 fprintf (f, "%ld\n", i);
8359 }
8360 else
8361 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008362 unsigned long i = ulongval ();
8363 if (i != ((long) (sizeof (float))))
8364 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00008365 fprintf (f, "%lu\n", i);
8366 }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008367 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis11437992002-04-12 09:54:03 +00008368
8369 ;
8370 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008371}
Martin v. Löwis11437992002-04-12 09:54:03 +00008372_ACEOF
8373rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008374if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8375 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008376 ac_status=$?
8377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8378 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8380 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008381 ac_status=$?
8382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8383 (exit $ac_status); }; }; then
8384 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008385else
Martin v. Löwis11437992002-04-12 09:54:03 +00008386 echo "$as_me: program exited with status $ac_status" >&5
8387echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008388sed 's/^/| /' conftest.$ac_ext >&5
8389
Martin v. Löwis11437992002-04-12 09:54:03 +00008390( exit $ac_status )
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008391{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00008392See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008393echo "$as_me: error: cannot compute sizeof (float), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00008394See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008395 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008396fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008397rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8398fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008399fi
8400rm -f conftest.val
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008401else
8402 ac_cv_sizeof_float=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00008403fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008404fi
8405echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8406echo "${ECHO_T}$ac_cv_sizeof_float" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008407cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008408#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008409_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008410
8411
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008412echo "$as_me:$LINENO: checking for double" >&5
8413echo $ECHO_N "checking for double... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008414if test "${ac_cv_type_double+set}" = set; then
8415 echo $ECHO_N "(cached) $ECHO_C" >&6
8416else
8417 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008418/* confdefs.h. */
8419_ACEOF
8420cat confdefs.h >>conftest.$ac_ext
8421cat >>conftest.$ac_ext <<_ACEOF
8422/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008423$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008424int
8425main ()
8426{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008427if ((double *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008428 return 0;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008429if (sizeof (double))
Martin v. Löwis11437992002-04-12 09:54:03 +00008430 return 0;
8431 ;
8432 return 0;
8433}
8434_ACEOF
8435rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008436if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8437 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008439 grep -v '^ *+' conftest.er1 >conftest.err
8440 rm -f conftest.er1
8441 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008443 (exit $ac_status); } &&
8444 { ac_try='test -z "$ac_c_werror_flag"
8445 || test ! -s conftest.err'
8446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8447 (eval $ac_try) 2>&5
8448 ac_status=$?
8449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8450 (exit $ac_status); }; } &&
8451 { ac_try='test -s conftest.$ac_objext'
8452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8453 (eval $ac_try) 2>&5
8454 ac_status=$?
8455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8456 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008457 ac_cv_type_double=yes
8458else
8459 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008460sed 's/^/| /' conftest.$ac_ext >&5
8461
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008462ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008463fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008464rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008465fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008466echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8467echo "${ECHO_T}$ac_cv_type_double" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008468
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008469echo "$as_me:$LINENO: checking size of double" >&5
8470echo $ECHO_N "checking size of double... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008471if test "${ac_cv_sizeof_double+set}" = set; then
8472 echo $ECHO_N "(cached) $ECHO_C" >&6
8473else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008474 if test "$ac_cv_type_double" = yes; then
8475 # The cast to unsigned long works around a bug in the HP C Compiler
8476 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8477 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8478 # This bug is HP SR number 8606223364.
Martin v. Löwis11437992002-04-12 09:54:03 +00008479 if test "$cross_compiling" = yes; then
8480 # Depending upon the size, compute the lo and hi bounds.
8481cat >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{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008491static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008492test_array [0] = 0
8493
8494 ;
8495 return 0;
8496}
8497_ACEOF
8498rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008499if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8500 (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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008506 (exit $ac_status); } &&
8507 { ac_try='test -z "$ac_c_werror_flag"
8508 || test ! -s conftest.err'
8509 { (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'
8515 { (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
Martin v. Löwis11437992002-04-12 09:54:03 +00008520 ac_lo=0 ac_mid=0
8521 while :; do
8522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008523/* confdefs.h. */
8524_ACEOF
8525cat confdefs.h >>conftest.$ac_ext
8526cat >>conftest.$ac_ext <<_ACEOF
8527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008528$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008529int
8530main ()
8531{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008532static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008533test_array [0] = 0
8534
8535 ;
8536 return 0;
8537}
8538_ACEOF
8539rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008540if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8541 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008542 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008543 grep -v '^ *+' conftest.er1 >conftest.err
8544 rm -f conftest.er1
8545 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008547 (exit $ac_status); } &&
8548 { ac_try='test -z "$ac_c_werror_flag"
8549 || test ! -s conftest.err'
8550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8551 (eval $ac_try) 2>&5
8552 ac_status=$?
8553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8554 (exit $ac_status); }; } &&
8555 { ac_try='test -s conftest.$ac_objext'
8556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8557 (eval $ac_try) 2>&5
8558 ac_status=$?
8559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8560 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008561 ac_hi=$ac_mid; break
8562else
8563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008564sed 's/^/| /' conftest.$ac_ext >&5
8565
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008566ac_lo=`expr $ac_mid + 1`
8567 if test $ac_lo -le $ac_mid; then
8568 ac_lo= ac_hi=
8569 break
8570 fi
8571 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008572fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008573rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008574 done
8575else
8576 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008577sed 's/^/| /' conftest.$ac_ext >&5
8578
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008579cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008580/* confdefs.h. */
8581_ACEOF
8582cat confdefs.h >>conftest.$ac_ext
8583cat >>conftest.$ac_ext <<_ACEOF
8584/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008585$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008586int
8587main ()
8588{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008589static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008590test_array [0] = 0
8591
8592 ;
8593 return 0;
8594}
8595_ACEOF
8596rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008597if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8598 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008599 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008600 grep -v '^ *+' conftest.er1 >conftest.err
8601 rm -f conftest.er1
8602 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008604 (exit $ac_status); } &&
8605 { ac_try='test -z "$ac_c_werror_flag"
8606 || test ! -s conftest.err'
8607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8608 (eval $ac_try) 2>&5
8609 ac_status=$?
8610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8611 (exit $ac_status); }; } &&
8612 { ac_try='test -s conftest.$ac_objext'
8613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8614 (eval $ac_try) 2>&5
8615 ac_status=$?
8616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8617 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008618 ac_hi=-1 ac_mid=-1
8619 while :; do
8620 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008621/* confdefs.h. */
8622_ACEOF
8623cat confdefs.h >>conftest.$ac_ext
8624cat >>conftest.$ac_ext <<_ACEOF
8625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008626$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008627int
8628main ()
8629{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008630static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008631test_array [0] = 0
8632
8633 ;
8634 return 0;
8635}
8636_ACEOF
8637rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008638if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8639 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008640 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008641 grep -v '^ *+' conftest.er1 >conftest.err
8642 rm -f conftest.er1
8643 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008645 (exit $ac_status); } &&
8646 { ac_try='test -z "$ac_c_werror_flag"
8647 || test ! -s conftest.err'
8648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8649 (eval $ac_try) 2>&5
8650 ac_status=$?
8651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8652 (exit $ac_status); }; } &&
8653 { ac_try='test -s conftest.$ac_objext'
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
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 ac_lo=$ac_mid; break
8660else
8661 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008662sed 's/^/| /' conftest.$ac_ext >&5
8663
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008664ac_hi=`expr '(' $ac_mid ')' - 1`
8665 if test $ac_mid -le $ac_hi; then
8666 ac_lo= ac_hi=
8667 break
8668 fi
8669 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008670fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008671rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008672 done
8673else
8674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008675sed 's/^/| /' conftest.$ac_ext >&5
8676
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008677ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008678fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008679rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008680fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008681rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008682# Binary search between lo and hi bounds.
8683while test "x$ac_lo" != "x$ac_hi"; do
8684 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8685 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008686/* confdefs.h. */
8687_ACEOF
8688cat confdefs.h >>conftest.$ac_ext
8689cat >>conftest.$ac_ext <<_ACEOF
8690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008691$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008692int
8693main ()
8694{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008695static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008696test_array [0] = 0
8697
8698 ;
8699 return 0;
8700}
8701_ACEOF
8702rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8704 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008706 grep -v '^ *+' conftest.er1 >conftest.err
8707 rm -f conftest.er1
8708 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008710 (exit $ac_status); } &&
8711 { ac_try='test -z "$ac_c_werror_flag"
8712 || test ! -s conftest.err'
8713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8714 (eval $ac_try) 2>&5
8715 ac_status=$?
8716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8717 (exit $ac_status); }; } &&
8718 { ac_try='test -s conftest.$ac_objext'
8719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8720 (eval $ac_try) 2>&5
8721 ac_status=$?
8722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8723 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008724 ac_hi=$ac_mid
8725else
8726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008727sed 's/^/| /' conftest.$ac_ext >&5
8728
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008729ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008730fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008731rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008732done
8733case $ac_lo in
8734?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008735'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00008736See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008737echo "$as_me: error: cannot compute sizeof (double), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00008738See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008739 { (exit 1); exit 1; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008740esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008741else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008742 if test "$cross_compiling" = yes; then
8743 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8744See \`config.log' for more details." >&5
8745echo "$as_me: error: cannot run test program while cross compiling
8746See \`config.log' for more details." >&2;}
8747 { (exit 1); exit 1; }; }
8748else
Martin v. Löwis11437992002-04-12 09:54:03 +00008749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008750/* confdefs.h. */
8751_ACEOF
8752cat confdefs.h >>conftest.$ac_ext
8753cat >>conftest.$ac_ext <<_ACEOF
8754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008755$ac_includes_default
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008756long longval () { return (long) (sizeof (double)); }
8757unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008758#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008759#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008760int
8761main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008762{
Martin v. Löwis11437992002-04-12 09:54:03 +00008763
8764 FILE *f = fopen ("conftest.val", "w");
8765 if (! f)
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008766 exit (1);
8767 if (((long) (sizeof (double))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008768 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008769 long i = longval ();
8770 if (i != ((long) (sizeof (double))))
8771 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00008772 fprintf (f, "%ld\n", i);
8773 }
8774 else
8775 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008776 unsigned long i = ulongval ();
8777 if (i != ((long) (sizeof (double))))
8778 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00008779 fprintf (f, "%lu\n", i);
8780 }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008781 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis11437992002-04-12 09:54:03 +00008782
8783 ;
8784 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008785}
Martin v. Löwis11437992002-04-12 09:54:03 +00008786_ACEOF
8787rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008788if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8789 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008790 ac_status=$?
8791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8792 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008793 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8794 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008795 ac_status=$?
8796 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8797 (exit $ac_status); }; }; then
8798 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008799else
Martin v. Löwis11437992002-04-12 09:54:03 +00008800 echo "$as_me: program exited with status $ac_status" >&5
8801echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008802sed 's/^/| /' conftest.$ac_ext >&5
8803
Martin v. Löwis11437992002-04-12 09:54:03 +00008804( exit $ac_status )
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008805{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00008806See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008807echo "$as_me: error: cannot compute sizeof (double), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00008808See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008809 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008810fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008811rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8812fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008813fi
8814rm -f conftest.val
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008815else
8816 ac_cv_sizeof_double=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00008817fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008818fi
8819echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8820echo "${ECHO_T}$ac_cv_sizeof_double" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008821cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008822#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008823_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008824
8825
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008826echo "$as_me:$LINENO: checking for fpos_t" >&5
8827echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008828if test "${ac_cv_type_fpos_t+set}" = set; then
8829 echo $ECHO_N "(cached) $ECHO_C" >&6
8830else
8831 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008832/* confdefs.h. */
8833_ACEOF
8834cat confdefs.h >>conftest.$ac_ext
8835cat >>conftest.$ac_ext <<_ACEOF
8836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008837$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008838int
8839main ()
8840{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008841if ((fpos_t *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008842 return 0;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008843if (sizeof (fpos_t))
Martin v. Löwis11437992002-04-12 09:54:03 +00008844 return 0;
8845 ;
8846 return 0;
8847}
8848_ACEOF
8849rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8851 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008852 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008853 grep -v '^ *+' conftest.er1 >conftest.err
8854 rm -f conftest.er1
8855 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008857 (exit $ac_status); } &&
8858 { ac_try='test -z "$ac_c_werror_flag"
8859 || test ! -s conftest.err'
8860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8861 (eval $ac_try) 2>&5
8862 ac_status=$?
8863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8864 (exit $ac_status); }; } &&
8865 { ac_try='test -s conftest.$ac_objext'
8866 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8867 (eval $ac_try) 2>&5
8868 ac_status=$?
8869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8870 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008871 ac_cv_type_fpos_t=yes
8872else
8873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008874sed 's/^/| /' conftest.$ac_ext >&5
8875
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008876ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008877fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008878rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008879fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008880echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8881echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008882
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008883echo "$as_me:$LINENO: checking size of fpos_t" >&5
8884echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008885if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8886 echo $ECHO_N "(cached) $ECHO_C" >&6
8887else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008888 if test "$ac_cv_type_fpos_t" = yes; then
8889 # The cast to unsigned long works around a bug in the HP C Compiler
8890 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8891 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8892 # This bug is HP SR number 8606223364.
Martin v. Löwis11437992002-04-12 09:54:03 +00008893 if test "$cross_compiling" = yes; then
8894 # Depending upon the size, compute the lo and hi bounds.
8895cat >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{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008905static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008906test_array [0] = 0
8907
8908 ;
8909 return 0;
8910}
8911_ACEOF
8912rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008913if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8914 (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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008920 (exit $ac_status); } &&
8921 { ac_try='test -z "$ac_c_werror_flag"
8922 || test ! -s conftest.err'
8923 { (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'
8929 { (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
Martin v. Löwis11437992002-04-12 09:54:03 +00008934 ac_lo=0 ac_mid=0
8935 while :; do
8936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008937/* confdefs.h. */
8938_ACEOF
8939cat confdefs.h >>conftest.$ac_ext
8940cat >>conftest.$ac_ext <<_ACEOF
8941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008942$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008943int
8944main ()
8945{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008946static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008947test_array [0] = 0
8948
8949 ;
8950 return 0;
8951}
8952_ACEOF
8953rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008954if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8955 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008957 grep -v '^ *+' conftest.er1 >conftest.err
8958 rm -f conftest.er1
8959 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008961 (exit $ac_status); } &&
8962 { ac_try='test -z "$ac_c_werror_flag"
8963 || test ! -s conftest.err'
8964 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8965 (eval $ac_try) 2>&5
8966 ac_status=$?
8967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8968 (exit $ac_status); }; } &&
8969 { ac_try='test -s conftest.$ac_objext'
8970 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8971 (eval $ac_try) 2>&5
8972 ac_status=$?
8973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8974 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008975 ac_hi=$ac_mid; break
8976else
8977 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008978sed 's/^/| /' conftest.$ac_ext >&5
8979
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008980ac_lo=`expr $ac_mid + 1`
8981 if test $ac_lo -le $ac_mid; then
8982 ac_lo= ac_hi=
8983 break
8984 fi
8985 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008986fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008987rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008988 done
8989else
8990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008991sed 's/^/| /' conftest.$ac_ext >&5
8992
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00008993cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008994/* confdefs.h. */
8995_ACEOF
8996cat confdefs.h >>conftest.$ac_ext
8997cat >>conftest.$ac_ext <<_ACEOF
8998/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008999$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009000int
9001main ()
9002{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009003static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009004test_array [0] = 0
9005
9006 ;
9007 return 0;
9008}
9009_ACEOF
9010rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009011if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9012 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009013 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009014 grep -v '^ *+' conftest.er1 >conftest.err
9015 rm -f conftest.er1
9016 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009018 (exit $ac_status); } &&
9019 { ac_try='test -z "$ac_c_werror_flag"
9020 || test ! -s conftest.err'
9021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9022 (eval $ac_try) 2>&5
9023 ac_status=$?
9024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9025 (exit $ac_status); }; } &&
9026 { ac_try='test -s conftest.$ac_objext'
9027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9028 (eval $ac_try) 2>&5
9029 ac_status=$?
9030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9031 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 ac_hi=-1 ac_mid=-1
9033 while :; do
9034 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009035/* confdefs.h. */
9036_ACEOF
9037cat confdefs.h >>conftest.$ac_ext
9038cat >>conftest.$ac_ext <<_ACEOF
9039/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009040$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009041int
9042main ()
9043{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009044static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009045test_array [0] = 0
9046
9047 ;
9048 return 0;
9049}
9050_ACEOF
9051rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009052if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9053 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009054 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009055 grep -v '^ *+' conftest.er1 >conftest.err
9056 rm -f conftest.er1
9057 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009059 (exit $ac_status); } &&
9060 { ac_try='test -z "$ac_c_werror_flag"
9061 || test ! -s conftest.err'
9062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9063 (eval $ac_try) 2>&5
9064 ac_status=$?
9065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9066 (exit $ac_status); }; } &&
9067 { ac_try='test -s conftest.$ac_objext'
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
Martin v. Löwis11437992002-04-12 09:54:03 +00009073 ac_lo=$ac_mid; break
9074else
9075 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009076sed 's/^/| /' conftest.$ac_ext >&5
9077
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009078ac_hi=`expr '(' $ac_mid ')' - 1`
9079 if test $ac_mid -le $ac_hi; then
9080 ac_lo= ac_hi=
9081 break
9082 fi
9083 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009084fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009085rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009086 done
9087else
9088 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009089sed 's/^/| /' conftest.$ac_ext >&5
9090
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009091ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009092fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009093rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009094fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009095rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009096# Binary search between lo and hi bounds.
9097while test "x$ac_lo" != "x$ac_hi"; do
9098 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9099 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009100/* confdefs.h. */
9101_ACEOF
9102cat confdefs.h >>conftest.$ac_ext
9103cat >>conftest.$ac_ext <<_ACEOF
9104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009105$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009106int
9107main ()
9108{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009109static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009110test_array [0] = 0
9111
9112 ;
9113 return 0;
9114}
9115_ACEOF
9116rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9118 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009120 grep -v '^ *+' conftest.er1 >conftest.err
9121 rm -f conftest.er1
9122 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009124 (exit $ac_status); } &&
9125 { ac_try='test -z "$ac_c_werror_flag"
9126 || test ! -s conftest.err'
9127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9128 (eval $ac_try) 2>&5
9129 ac_status=$?
9130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9131 (exit $ac_status); }; } &&
9132 { ac_try='test -s conftest.$ac_objext'
9133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9134 (eval $ac_try) 2>&5
9135 ac_status=$?
9136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9137 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009138 ac_hi=$ac_mid
9139else
9140 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009141sed 's/^/| /' conftest.$ac_ext >&5
9142
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009143ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009144fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009145rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009146done
9147case $ac_lo in
9148?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009149'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00009150See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009151echo "$as_me: error: cannot compute sizeof (fpos_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00009152See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009153 { (exit 1); exit 1; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009154esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009155else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009156 if test "$cross_compiling" = yes; then
9157 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9158See \`config.log' for more details." >&5
9159echo "$as_me: error: cannot run test program while cross compiling
9160See \`config.log' for more details." >&2;}
9161 { (exit 1); exit 1; }; }
9162else
Martin v. Löwis11437992002-04-12 09:54:03 +00009163 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009164/* confdefs.h. */
9165_ACEOF
9166cat confdefs.h >>conftest.$ac_ext
9167cat >>conftest.$ac_ext <<_ACEOF
9168/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009169$ac_includes_default
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009170long longval () { return (long) (sizeof (fpos_t)); }
9171unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009172#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009173#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009174int
9175main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009176{
Martin v. Löwis11437992002-04-12 09:54:03 +00009177
9178 FILE *f = fopen ("conftest.val", "w");
9179 if (! f)
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009180 exit (1);
9181 if (((long) (sizeof (fpos_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009182 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009183 long i = longval ();
9184 if (i != ((long) (sizeof (fpos_t))))
9185 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00009186 fprintf (f, "%ld\n", i);
9187 }
9188 else
9189 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009190 unsigned long i = ulongval ();
9191 if (i != ((long) (sizeof (fpos_t))))
9192 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00009193 fprintf (f, "%lu\n", i);
9194 }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009195 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis11437992002-04-12 09:54:03 +00009196
9197 ;
9198 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009199}
Martin v. Löwis11437992002-04-12 09:54:03 +00009200_ACEOF
9201rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009202if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9203 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009204 ac_status=$?
9205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9206 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9208 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 ac_status=$?
9210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9211 (exit $ac_status); }; }; then
9212 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009213else
Martin v. Löwis11437992002-04-12 09:54:03 +00009214 echo "$as_me: program exited with status $ac_status" >&5
9215echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009216sed 's/^/| /' conftest.$ac_ext >&5
9217
Martin v. Löwis11437992002-04-12 09:54:03 +00009218( exit $ac_status )
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009219{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00009220See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009221echo "$as_me: error: cannot compute sizeof (fpos_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00009222See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009223 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009224fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009225rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9226fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009227fi
9228rm -f conftest.val
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009229else
9230 ac_cv_sizeof_fpos_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009231fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009232fi
9233echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9234echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009235cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009236#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009237_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009238
Michael W. Hudson54241132001-12-07 15:38:26 +00009239
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009240echo "$as_me:$LINENO: checking for size_t" >&5
9241echo $ECHO_N "checking for size_t... $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00009242if test "${ac_cv_type_size_t+set}" = set; then
9243 echo $ECHO_N "(cached) $ECHO_C" >&6
9244else
9245 cat >conftest.$ac_ext <<_ACEOF
9246/* confdefs.h. */
9247_ACEOF
9248cat confdefs.h >>conftest.$ac_ext
9249cat >>conftest.$ac_ext <<_ACEOF
9250/* end confdefs.h. */
9251$ac_includes_default
9252int
9253main ()
9254{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009255if ((size_t *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009256 return 0;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009257if (sizeof (size_t))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009258 return 0;
9259 ;
9260 return 0;
9261}
9262_ACEOF
9263rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9265 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009266 ac_status=$?
9267 grep -v '^ *+' conftest.er1 >conftest.err
9268 rm -f conftest.er1
9269 cat conftest.err >&5
9270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009271 (exit $ac_status); } &&
9272 { ac_try='test -z "$ac_c_werror_flag"
9273 || test ! -s conftest.err'
9274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9275 (eval $ac_try) 2>&5
9276 ac_status=$?
9277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9278 (exit $ac_status); }; } &&
9279 { ac_try='test -s conftest.$ac_objext'
9280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9281 (eval $ac_try) 2>&5
9282 ac_status=$?
9283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9284 (exit $ac_status); }; }; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009285 ac_cv_type_size_t=yes
9286else
9287 echo "$as_me: failed program was:" >&5
9288sed 's/^/| /' conftest.$ac_ext >&5
9289
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009290ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009291fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009292rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009293fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009294echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9295echo "${ECHO_T}$ac_cv_type_size_t" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00009296
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009297echo "$as_me:$LINENO: checking size of size_t" >&5
9298echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00009299if test "${ac_cv_sizeof_size_t+set}" = set; then
9300 echo $ECHO_N "(cached) $ECHO_C" >&6
9301else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009302 if test "$ac_cv_type_size_t" = yes; then
9303 # The cast to unsigned long works around a bug in the HP C Compiler
9304 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9305 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9306 # This bug is HP SR number 8606223364.
Martin v. Löwis18e16552006-02-15 17:27:45 +00009307 if test "$cross_compiling" = yes; then
9308 # Depending upon the size, compute the lo and hi bounds.
9309cat >conftest.$ac_ext <<_ACEOF
9310/* confdefs.h. */
9311_ACEOF
9312cat confdefs.h >>conftest.$ac_ext
9313cat >>conftest.$ac_ext <<_ACEOF
9314/* end confdefs.h. */
9315$ac_includes_default
9316int
9317main ()
9318{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009319static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009320test_array [0] = 0
9321
9322 ;
9323 return 0;
9324}
9325_ACEOF
9326rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009327if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9328 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009329 ac_status=$?
9330 grep -v '^ *+' conftest.er1 >conftest.err
9331 rm -f conftest.er1
9332 cat conftest.err >&5
9333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009334 (exit $ac_status); } &&
9335 { ac_try='test -z "$ac_c_werror_flag"
9336 || test ! -s conftest.err'
9337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9338 (eval $ac_try) 2>&5
9339 ac_status=$?
9340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9341 (exit $ac_status); }; } &&
9342 { ac_try='test -s conftest.$ac_objext'
9343 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9344 (eval $ac_try) 2>&5
9345 ac_status=$?
9346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9347 (exit $ac_status); }; }; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009348 ac_lo=0 ac_mid=0
9349 while :; do
9350 cat >conftest.$ac_ext <<_ACEOF
9351/* confdefs.h. */
9352_ACEOF
9353cat confdefs.h >>conftest.$ac_ext
9354cat >>conftest.$ac_ext <<_ACEOF
9355/* end confdefs.h. */
9356$ac_includes_default
9357int
9358main ()
9359{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009360static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009361test_array [0] = 0
9362
9363 ;
9364 return 0;
9365}
9366_ACEOF
9367rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009368if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9369 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009370 ac_status=$?
9371 grep -v '^ *+' conftest.er1 >conftest.err
9372 rm -f conftest.er1
9373 cat conftest.err >&5
9374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009375 (exit $ac_status); } &&
9376 { ac_try='test -z "$ac_c_werror_flag"
9377 || test ! -s conftest.err'
9378 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9379 (eval $ac_try) 2>&5
9380 ac_status=$?
9381 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9382 (exit $ac_status); }; } &&
9383 { ac_try='test -s conftest.$ac_objext'
9384 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9385 (eval $ac_try) 2>&5
9386 ac_status=$?
9387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9388 (exit $ac_status); }; }; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009389 ac_hi=$ac_mid; break
9390else
9391 echo "$as_me: failed program was:" >&5
9392sed 's/^/| /' conftest.$ac_ext >&5
9393
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009394ac_lo=`expr $ac_mid + 1`
9395 if test $ac_lo -le $ac_mid; then
9396 ac_lo= ac_hi=
9397 break
9398 fi
9399 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009400fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009401rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009402 done
9403else
9404 echo "$as_me: failed program was:" >&5
9405sed 's/^/| /' conftest.$ac_ext >&5
9406
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009407cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00009408/* confdefs.h. */
9409_ACEOF
9410cat confdefs.h >>conftest.$ac_ext
9411cat >>conftest.$ac_ext <<_ACEOF
9412/* end confdefs.h. */
9413$ac_includes_default
9414int
9415main ()
9416{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009417static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009418test_array [0] = 0
9419
9420 ;
9421 return 0;
9422}
9423_ACEOF
9424rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009425if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9426 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009427 ac_status=$?
9428 grep -v '^ *+' conftest.er1 >conftest.err
9429 rm -f conftest.er1
9430 cat conftest.err >&5
9431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009432 (exit $ac_status); } &&
9433 { ac_try='test -z "$ac_c_werror_flag"
9434 || test ! -s conftest.err'
9435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9436 (eval $ac_try) 2>&5
9437 ac_status=$?
9438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9439 (exit $ac_status); }; } &&
9440 { ac_try='test -s conftest.$ac_objext'
9441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9442 (eval $ac_try) 2>&5
9443 ac_status=$?
9444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9445 (exit $ac_status); }; }; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009446 ac_hi=-1 ac_mid=-1
9447 while :; do
9448 cat >conftest.$ac_ext <<_ACEOF
9449/* confdefs.h. */
9450_ACEOF
9451cat confdefs.h >>conftest.$ac_ext
9452cat >>conftest.$ac_ext <<_ACEOF
9453/* end confdefs.h. */
9454$ac_includes_default
9455int
9456main ()
9457{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009458static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009459test_array [0] = 0
9460
9461 ;
9462 return 0;
9463}
9464_ACEOF
9465rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009466if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9467 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009468 ac_status=$?
9469 grep -v '^ *+' conftest.er1 >conftest.err
9470 rm -f conftest.er1
9471 cat conftest.err >&5
9472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009473 (exit $ac_status); } &&
9474 { ac_try='test -z "$ac_c_werror_flag"
9475 || test ! -s conftest.err'
9476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9477 (eval $ac_try) 2>&5
9478 ac_status=$?
9479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9480 (exit $ac_status); }; } &&
9481 { ac_try='test -s conftest.$ac_objext'
9482 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9483 (eval $ac_try) 2>&5
9484 ac_status=$?
9485 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9486 (exit $ac_status); }; }; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009487 ac_lo=$ac_mid; break
9488else
9489 echo "$as_me: failed program was:" >&5
9490sed 's/^/| /' conftest.$ac_ext >&5
9491
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009492ac_hi=`expr '(' $ac_mid ')' - 1`
9493 if test $ac_mid -le $ac_hi; then
9494 ac_lo= ac_hi=
9495 break
9496 fi
9497 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009498fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009499rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009500 done
9501else
9502 echo "$as_me: failed program was:" >&5
9503sed 's/^/| /' conftest.$ac_ext >&5
9504
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009505ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +00009506fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009507rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009508fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009509rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009510# Binary search between lo and hi bounds.
9511while test "x$ac_lo" != "x$ac_hi"; do
9512 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9513 cat >conftest.$ac_ext <<_ACEOF
9514/* confdefs.h. */
9515_ACEOF
9516cat confdefs.h >>conftest.$ac_ext
9517cat >>conftest.$ac_ext <<_ACEOF
9518/* end confdefs.h. */
9519$ac_includes_default
9520int
9521main ()
9522{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009523static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009524test_array [0] = 0
9525
9526 ;
9527 return 0;
9528}
9529_ACEOF
9530rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009531if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9532 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009533 ac_status=$?
9534 grep -v '^ *+' conftest.er1 >conftest.err
9535 rm -f conftest.er1
9536 cat conftest.err >&5
9537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009538 (exit $ac_status); } &&
9539 { ac_try='test -z "$ac_c_werror_flag"
9540 || test ! -s conftest.err'
9541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9542 (eval $ac_try) 2>&5
9543 ac_status=$?
9544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9545 (exit $ac_status); }; } &&
9546 { ac_try='test -s conftest.$ac_objext'
9547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9548 (eval $ac_try) 2>&5
9549 ac_status=$?
9550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9551 (exit $ac_status); }; }; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009552 ac_hi=$ac_mid
9553else
9554 echo "$as_me: failed program was:" >&5
9555sed 's/^/| /' conftest.$ac_ext >&5
9556
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009557ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009558fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009559rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009560done
9561case $ac_lo in
9562?*) ac_cv_sizeof_size_t=$ac_lo;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009563'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
Martin v. Löwis18e16552006-02-15 17:27:45 +00009564See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009565echo "$as_me: error: cannot compute sizeof (size_t), 77
Martin v. Löwis18e16552006-02-15 17:27:45 +00009566See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009567 { (exit 1); exit 1; }; } ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009568esac
9569else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009570 if test "$cross_compiling" = yes; then
9571 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9572See \`config.log' for more details." >&5
9573echo "$as_me: error: cannot run test program while cross compiling
9574See \`config.log' for more details." >&2;}
9575 { (exit 1); exit 1; }; }
9576else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009577 cat >conftest.$ac_ext <<_ACEOF
9578/* confdefs.h. */
9579_ACEOF
9580cat confdefs.h >>conftest.$ac_ext
9581cat >>conftest.$ac_ext <<_ACEOF
9582/* end confdefs.h. */
9583$ac_includes_default
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009584long longval () { return (long) (sizeof (size_t)); }
9585unsigned long ulongval () { return (long) (sizeof (size_t)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009586#include <stdio.h>
9587#include <stdlib.h>
9588int
9589main ()
9590{
9591
9592 FILE *f = fopen ("conftest.val", "w");
9593 if (! f)
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009594 exit (1);
9595 if (((long) (sizeof (size_t))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009596 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009597 long i = longval ();
9598 if (i != ((long) (sizeof (size_t))))
9599 exit (1);
Martin v. Löwis18e16552006-02-15 17:27:45 +00009600 fprintf (f, "%ld\n", i);
9601 }
9602 else
9603 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009604 unsigned long i = ulongval ();
9605 if (i != ((long) (sizeof (size_t))))
9606 exit (1);
Martin v. Löwis18e16552006-02-15 17:27:45 +00009607 fprintf (f, "%lu\n", i);
9608 }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009609 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis18e16552006-02-15 17:27:45 +00009610
9611 ;
9612 return 0;
9613}
9614_ACEOF
9615rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009616if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9617 (eval $ac_link) 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00009618 ac_status=$?
9619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9620 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009621 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9622 (eval $ac_try) 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00009623 ac_status=$?
9624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9625 (exit $ac_status); }; }; then
9626 ac_cv_sizeof_size_t=`cat conftest.val`
9627else
9628 echo "$as_me: program exited with status $ac_status" >&5
9629echo "$as_me: failed program was:" >&5
9630sed 's/^/| /' conftest.$ac_ext >&5
9631
9632( exit $ac_status )
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009633{ { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
Martin v. Löwis18e16552006-02-15 17:27:45 +00009634See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009635echo "$as_me: error: cannot compute sizeof (size_t), 77
Martin v. Löwis18e16552006-02-15 17:27:45 +00009636See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009637 { (exit 1); exit 1; }; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009638fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009639rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9640fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00009641fi
9642rm -f conftest.val
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009643else
9644 ac_cv_sizeof_size_t=0
Martin v. Löwis18e16552006-02-15 17:27:45 +00009645fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009646fi
9647echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
9648echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00009649cat >>confdefs.h <<_ACEOF
9650#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
9651_ACEOF
9652
9653
Michael W. Hudson54241132001-12-07 15:38:26 +00009654
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009655echo "$as_me:$LINENO: checking for long long support" >&5
9656echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009657have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009658cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009659/* confdefs.h. */
9660_ACEOF
9661cat confdefs.h >>conftest.$ac_ext
9662cat >>conftest.$ac_ext <<_ACEOF
9663/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009664
Martin v. Löwis11437992002-04-12 09:54:03 +00009665int
9666main ()
9667{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009668long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009669 ;
9670 return 0;
9671}
9672_ACEOF
9673rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9675 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009676 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009677 grep -v '^ *+' conftest.er1 >conftest.err
9678 rm -f conftest.er1
9679 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009681 (exit $ac_status); } &&
9682 { ac_try='test -z "$ac_c_werror_flag"
9683 || test ! -s conftest.err'
9684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9685 (eval $ac_try) 2>&5
9686 ac_status=$?
9687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9688 (exit $ac_status); }; } &&
9689 { ac_try='test -s conftest.$ac_objext'
9690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9691 (eval $ac_try) 2>&5
9692 ac_status=$?
9693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9694 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009695
9696
9697cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009698#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009699_ACEOF
9700
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009701 have_long_long=yes
9702
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009703else
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009705sed 's/^/| /' conftest.$ac_ext >&5
9706
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009707fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009708rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9709echo "$as_me:$LINENO: result: $have_long_long" >&5
9710echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009711if test "$have_long_long" = yes ; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009712echo "$as_me:$LINENO: checking for long long" >&5
9713echo $ECHO_N "checking for long long... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009714if test "${ac_cv_type_long_long+set}" = set; then
9715 echo $ECHO_N "(cached) $ECHO_C" >&6
9716else
9717 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009718/* confdefs.h. */
9719_ACEOF
9720cat confdefs.h >>conftest.$ac_ext
9721cat >>conftest.$ac_ext <<_ACEOF
9722/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009723$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009724int
9725main ()
9726{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009727if ((long long *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009728 return 0;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009729if (sizeof (long long))
Martin v. Löwis11437992002-04-12 09:54:03 +00009730 return 0;
9731 ;
9732 return 0;
9733}
9734_ACEOF
9735rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009736if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9737 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009739 grep -v '^ *+' conftest.er1 >conftest.err
9740 rm -f conftest.er1
9741 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009743 (exit $ac_status); } &&
9744 { ac_try='test -z "$ac_c_werror_flag"
9745 || test ! -s conftest.err'
9746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9747 (eval $ac_try) 2>&5
9748 ac_status=$?
9749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9750 (exit $ac_status); }; } &&
9751 { ac_try='test -s conftest.$ac_objext'
9752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9753 (eval $ac_try) 2>&5
9754 ac_status=$?
9755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9756 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009757 ac_cv_type_long_long=yes
9758else
9759 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009760sed 's/^/| /' conftest.$ac_ext >&5
9761
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009762ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009763fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009764rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009765fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009766echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
9767echo "${ECHO_T}$ac_cv_type_long_long" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009768
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009769echo "$as_me:$LINENO: checking size of long long" >&5
9770echo $ECHO_N "checking size of long long... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009771if test "${ac_cv_sizeof_long_long+set}" = set; then
9772 echo $ECHO_N "(cached) $ECHO_C" >&6
9773else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009774 if test "$ac_cv_type_long_long" = yes; then
9775 # The cast to unsigned long works around a bug in the HP C Compiler
9776 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9777 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9778 # This bug is HP SR number 8606223364.
Martin v. Löwis11437992002-04-12 09:54:03 +00009779 if test "$cross_compiling" = yes; then
9780 # Depending upon the size, compute the lo and hi bounds.
9781cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009782/* confdefs.h. */
9783_ACEOF
9784cat confdefs.h >>conftest.$ac_ext
9785cat >>conftest.$ac_ext <<_ACEOF
9786/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009787$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009788int
9789main ()
9790{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009791static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009792test_array [0] = 0
9793
9794 ;
9795 return 0;
9796}
9797_ACEOF
9798rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009799if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9800 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009802 grep -v '^ *+' conftest.er1 >conftest.err
9803 rm -f conftest.er1
9804 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009806 (exit $ac_status); } &&
9807 { ac_try='test -z "$ac_c_werror_flag"
9808 || test ! -s conftest.err'
9809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9810 (eval $ac_try) 2>&5
9811 ac_status=$?
9812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9813 (exit $ac_status); }; } &&
9814 { ac_try='test -s conftest.$ac_objext'
9815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9816 (eval $ac_try) 2>&5
9817 ac_status=$?
9818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9819 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009820 ac_lo=0 ac_mid=0
9821 while :; do
9822 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009823/* confdefs.h. */
9824_ACEOF
9825cat confdefs.h >>conftest.$ac_ext
9826cat >>conftest.$ac_ext <<_ACEOF
9827/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009828$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009829int
9830main ()
9831{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009832static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009833test_array [0] = 0
9834
9835 ;
9836 return 0;
9837}
9838_ACEOF
9839rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009840if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9841 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009842 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009843 grep -v '^ *+' conftest.er1 >conftest.err
9844 rm -f conftest.er1
9845 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009847 (exit $ac_status); } &&
9848 { ac_try='test -z "$ac_c_werror_flag"
9849 || test ! -s conftest.err'
9850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9851 (eval $ac_try) 2>&5
9852 ac_status=$?
9853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9854 (exit $ac_status); }; } &&
9855 { ac_try='test -s conftest.$ac_objext'
9856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9857 (eval $ac_try) 2>&5
9858 ac_status=$?
9859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9860 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009861 ac_hi=$ac_mid; break
9862else
9863 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009864sed 's/^/| /' conftest.$ac_ext >&5
9865
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009866ac_lo=`expr $ac_mid + 1`
9867 if test $ac_lo -le $ac_mid; then
9868 ac_lo= ac_hi=
9869 break
9870 fi
9871 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009872fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009873rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009874 done
9875else
9876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009877sed 's/^/| /' conftest.$ac_ext >&5
9878
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009879cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009880/* confdefs.h. */
9881_ACEOF
9882cat confdefs.h >>conftest.$ac_ext
9883cat >>conftest.$ac_ext <<_ACEOF
9884/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009885$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009886int
9887main ()
9888{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009889static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009890test_array [0] = 0
9891
9892 ;
9893 return 0;
9894}
9895_ACEOF
9896rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9898 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009900 grep -v '^ *+' conftest.er1 >conftest.err
9901 rm -f conftest.er1
9902 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009904 (exit $ac_status); } &&
9905 { ac_try='test -z "$ac_c_werror_flag"
9906 || test ! -s conftest.err'
9907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9908 (eval $ac_try) 2>&5
9909 ac_status=$?
9910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9911 (exit $ac_status); }; } &&
9912 { ac_try='test -s conftest.$ac_objext'
9913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9914 (eval $ac_try) 2>&5
9915 ac_status=$?
9916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9917 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009918 ac_hi=-1 ac_mid=-1
9919 while :; do
9920 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009921/* confdefs.h. */
9922_ACEOF
9923cat confdefs.h >>conftest.$ac_ext
9924cat >>conftest.$ac_ext <<_ACEOF
9925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009926$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009927int
9928main ()
9929{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009930static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009931test_array [0] = 0
9932
9933 ;
9934 return 0;
9935}
9936_ACEOF
9937rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9939 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009940 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009941 grep -v '^ *+' conftest.er1 >conftest.err
9942 rm -f conftest.er1
9943 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009945 (exit $ac_status); } &&
9946 { ac_try='test -z "$ac_c_werror_flag"
9947 || test ! -s conftest.err'
9948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9949 (eval $ac_try) 2>&5
9950 ac_status=$?
9951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9952 (exit $ac_status); }; } &&
9953 { ac_try='test -s conftest.$ac_objext'
9954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9955 (eval $ac_try) 2>&5
9956 ac_status=$?
9957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9958 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009959 ac_lo=$ac_mid; break
9960else
9961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009962sed 's/^/| /' conftest.$ac_ext >&5
9963
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009964ac_hi=`expr '(' $ac_mid ')' - 1`
9965 if test $ac_mid -le $ac_hi; then
9966 ac_lo= ac_hi=
9967 break
9968 fi
9969 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009970fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009971rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009972 done
9973else
9974 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009975sed 's/^/| /' conftest.$ac_ext >&5
9976
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009977ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009978fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009979rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009980fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009981rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009982# Binary search between lo and hi bounds.
9983while test "x$ac_lo" != "x$ac_hi"; do
9984 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009986/* confdefs.h. */
9987_ACEOF
9988cat confdefs.h >>conftest.$ac_ext
9989cat >>conftest.$ac_ext <<_ACEOF
9990/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009991$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009992int
9993main ()
9994{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00009995static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009996test_array [0] = 0
9997
9998 ;
9999 return 0;
10000}
10001_ACEOF
10002rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010003if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10004 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010005 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010006 grep -v '^ *+' conftest.er1 >conftest.err
10007 rm -f conftest.er1
10008 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010010 (exit $ac_status); } &&
10011 { ac_try='test -z "$ac_c_werror_flag"
10012 || test ! -s conftest.err'
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); }; } &&
10018 { ac_try='test -s conftest.$ac_objext'
10019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10020 (eval $ac_try) 2>&5
10021 ac_status=$?
10022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10023 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010024 ac_hi=$ac_mid
10025else
10026 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010027sed 's/^/| /' conftest.$ac_ext >&5
10028
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010029ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010030fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010031rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010032done
10033case $ac_lo in
10034?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010035'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000010036See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010037echo "$as_me: error: cannot compute sizeof (long long), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000010038See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010039 { (exit 1); exit 1; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010040esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010041else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010042 if test "$cross_compiling" = yes; then
10043 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
10044See \`config.log' for more details." >&5
10045echo "$as_me: error: cannot run test program while cross compiling
10046See \`config.log' for more details." >&2;}
10047 { (exit 1); exit 1; }; }
10048else
Martin v. Löwis11437992002-04-12 09:54:03 +000010049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010050/* confdefs.h. */
10051_ACEOF
10052cat confdefs.h >>conftest.$ac_ext
10053cat >>conftest.$ac_ext <<_ACEOF
10054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010055$ac_includes_default
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010056long longval () { return (long) (sizeof (long long)); }
10057unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010058#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010059#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010060int
10061main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010062{
Martin v. Löwis11437992002-04-12 09:54:03 +000010063
10064 FILE *f = fopen ("conftest.val", "w");
10065 if (! f)
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010066 exit (1);
10067 if (((long) (sizeof (long long))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010068 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010069 long i = longval ();
10070 if (i != ((long) (sizeof (long long))))
10071 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +000010072 fprintf (f, "%ld\n", i);
10073 }
10074 else
10075 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010076 unsigned long i = ulongval ();
10077 if (i != ((long) (sizeof (long long))))
10078 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +000010079 fprintf (f, "%lu\n", i);
10080 }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010081 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010082
10083 ;
10084 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010085}
Martin v. Löwis11437992002-04-12 09:54:03 +000010086_ACEOF
10087rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010088if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10089 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010090 ac_status=$?
10091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10092 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10094 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010095 ac_status=$?
10096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10097 (exit $ac_status); }; }; then
10098 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010099else
Martin v. Löwis11437992002-04-12 09:54:03 +000010100 echo "$as_me: program exited with status $ac_status" >&5
10101echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010102sed 's/^/| /' conftest.$ac_ext >&5
10103
Martin v. Löwis11437992002-04-12 09:54:03 +000010104( exit $ac_status )
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010105{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000010106See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010107echo "$as_me: error: cannot compute sizeof (long long), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000010108See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010109 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010110fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010111rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10112fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010113fi
10114rm -f conftest.val
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010115else
10116 ac_cv_sizeof_long_long=0
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010117fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010118fi
10119echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
10120echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010121cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010122#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000010123_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010124
Michael W. Hudson54241132001-12-07 15:38:26 +000010125
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010126fi
10127
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010128echo "$as_me:$LINENO: checking for _Bool support" >&5
10129echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000010130have_c99_bool=no
10131cat >conftest.$ac_ext <<_ACEOF
10132/* confdefs.h. */
10133_ACEOF
10134cat confdefs.h >>conftest.$ac_ext
10135cat >>conftest.$ac_ext <<_ACEOF
10136/* end confdefs.h. */
10137
10138int
10139main ()
10140{
10141_Bool x; x = (_Bool)0;
10142 ;
10143 return 0;
10144}
10145_ACEOF
10146rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010147if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10148 (eval $ac_compile) 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000010149 ac_status=$?
10150 grep -v '^ *+' conftest.er1 >conftest.err
10151 rm -f conftest.er1
10152 cat conftest.err >&5
10153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010154 (exit $ac_status); } &&
10155 { ac_try='test -z "$ac_c_werror_flag"
10156 || test ! -s conftest.err'
10157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10158 (eval $ac_try) 2>&5
10159 ac_status=$?
10160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10161 (exit $ac_status); }; } &&
10162 { ac_try='test -s conftest.$ac_objext'
10163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10164 (eval $ac_try) 2>&5
10165 ac_status=$?
10166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10167 (exit $ac_status); }; }; then
Thomas Woutersb2137042007-02-01 18:02:27 +000010168
10169
10170cat >>confdefs.h <<\_ACEOF
10171#define HAVE_C99_BOOL 1
10172_ACEOF
10173
10174 have_c99_bool=yes
10175
10176else
10177 echo "$as_me: failed program was:" >&5
10178sed 's/^/| /' conftest.$ac_ext >&5
10179
Thomas Woutersb2137042007-02-01 18:02:27 +000010180fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010181rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10182echo "$as_me:$LINENO: result: $have_c99_bool" >&5
10183echo "${ECHO_T}$have_c99_bool" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000010184if test "$have_c99_bool" = yes ; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010185echo "$as_me:$LINENO: checking for _Bool" >&5
10186echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000010187if test "${ac_cv_type__Bool+set}" = set; then
10188 echo $ECHO_N "(cached) $ECHO_C" >&6
10189else
10190 cat >conftest.$ac_ext <<_ACEOF
10191/* confdefs.h. */
10192_ACEOF
10193cat confdefs.h >>conftest.$ac_ext
10194cat >>conftest.$ac_ext <<_ACEOF
10195/* end confdefs.h. */
10196$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000010197int
10198main ()
10199{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010200if ((_Bool *) 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000010201 return 0;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010202if (sizeof (_Bool))
Thomas Woutersb2137042007-02-01 18:02:27 +000010203 return 0;
10204 ;
10205 return 0;
10206}
10207_ACEOF
10208rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010209if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10210 (eval $ac_compile) 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000010211 ac_status=$?
10212 grep -v '^ *+' conftest.er1 >conftest.err
10213 rm -f conftest.er1
10214 cat conftest.err >&5
10215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010216 (exit $ac_status); } &&
10217 { ac_try='test -z "$ac_c_werror_flag"
10218 || test ! -s conftest.err'
10219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10220 (eval $ac_try) 2>&5
10221 ac_status=$?
10222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10223 (exit $ac_status); }; } &&
10224 { ac_try='test -s conftest.$ac_objext'
10225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10226 (eval $ac_try) 2>&5
10227 ac_status=$?
10228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10229 (exit $ac_status); }; }; then
Thomas Woutersb2137042007-02-01 18:02:27 +000010230 ac_cv_type__Bool=yes
10231else
10232 echo "$as_me: failed program was:" >&5
10233sed 's/^/| /' conftest.$ac_ext >&5
10234
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010235ac_cv_type__Bool=no
Thomas Woutersb2137042007-02-01 18:02:27 +000010236fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010237rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000010238fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010239echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
10240echo "${ECHO_T}$ac_cv_type__Bool" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000010241
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010242echo "$as_me:$LINENO: checking size of _Bool" >&5
10243echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000010244if test "${ac_cv_sizeof__Bool+set}" = set; then
10245 echo $ECHO_N "(cached) $ECHO_C" >&6
10246else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010247 if test "$ac_cv_type__Bool" = yes; then
10248 # The cast to unsigned long works around a bug in the HP C Compiler
10249 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10250 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10251 # This bug is HP SR number 8606223364.
Thomas Woutersb2137042007-02-01 18:02:27 +000010252 if test "$cross_compiling" = yes; then
10253 # Depending upon the size, compute the lo and hi bounds.
10254cat >conftest.$ac_ext <<_ACEOF
10255/* confdefs.h. */
10256_ACEOF
10257cat confdefs.h >>conftest.$ac_ext
10258cat >>conftest.$ac_ext <<_ACEOF
10259/* end confdefs.h. */
10260$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000010261int
10262main ()
10263{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010264static int test_array [1 - 2 * !(((long) (sizeof (_Bool))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000010265test_array [0] = 0
10266
10267 ;
10268 return 0;
10269}
10270_ACEOF
10271rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010272if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10273 (eval $ac_compile) 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000010274 ac_status=$?
10275 grep -v '^ *+' conftest.er1 >conftest.err
10276 rm -f conftest.er1
10277 cat conftest.err >&5
10278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010279 (exit $ac_status); } &&
10280 { ac_try='test -z "$ac_c_werror_flag"
10281 || test ! -s conftest.err'
10282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10283 (eval $ac_try) 2>&5
10284 ac_status=$?
10285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10286 (exit $ac_status); }; } &&
10287 { ac_try='test -s conftest.$ac_objext'
10288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10289 (eval $ac_try) 2>&5
10290 ac_status=$?
10291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10292 (exit $ac_status); }; }; then
Thomas Woutersb2137042007-02-01 18:02:27 +000010293 ac_lo=0 ac_mid=0
10294 while :; do
10295 cat >conftest.$ac_ext <<_ACEOF
10296/* confdefs.h. */
10297_ACEOF
10298cat confdefs.h >>conftest.$ac_ext
10299cat >>conftest.$ac_ext <<_ACEOF
10300/* end confdefs.h. */
10301$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000010302int
10303main ()
10304{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010305static int test_array [1 - 2 * !(((long) (sizeof (_Bool))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000010306test_array [0] = 0
10307
10308 ;
10309 return 0;
10310}
10311_ACEOF
10312rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010313if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10314 (eval $ac_compile) 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000010315 ac_status=$?
10316 grep -v '^ *+' conftest.er1 >conftest.err
10317 rm -f conftest.er1
10318 cat conftest.err >&5
10319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010320 (exit $ac_status); } &&
10321 { ac_try='test -z "$ac_c_werror_flag"
10322 || test ! -s conftest.err'
10323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10324 (eval $ac_try) 2>&5
10325 ac_status=$?
10326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10327 (exit $ac_status); }; } &&
10328 { ac_try='test -s conftest.$ac_objext'
10329 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10330 (eval $ac_try) 2>&5
10331 ac_status=$?
10332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10333 (exit $ac_status); }; }; then
Thomas Woutersb2137042007-02-01 18:02:27 +000010334 ac_hi=$ac_mid; break
10335else
10336 echo "$as_me: failed program was:" >&5
10337sed 's/^/| /' conftest.$ac_ext >&5
10338
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010339ac_lo=`expr $ac_mid + 1`
10340 if test $ac_lo -le $ac_mid; then
10341 ac_lo= ac_hi=
10342 break
10343 fi
10344 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000010345fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010346rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000010347 done
10348else
10349 echo "$as_me: failed program was:" >&5
10350sed 's/^/| /' conftest.$ac_ext >&5
10351
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010352cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000010353/* confdefs.h. */
10354_ACEOF
10355cat confdefs.h >>conftest.$ac_ext
10356cat >>conftest.$ac_ext <<_ACEOF
10357/* end confdefs.h. */
10358$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000010359int
10360main ()
10361{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010362static int test_array [1 - 2 * !(((long) (sizeof (_Bool))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000010363test_array [0] = 0
10364
10365 ;
10366 return 0;
10367}
10368_ACEOF
10369rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010370if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10371 (eval $ac_compile) 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000010372 ac_status=$?
10373 grep -v '^ *+' conftest.er1 >conftest.err
10374 rm -f conftest.er1
10375 cat conftest.err >&5
10376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010377 (exit $ac_status); } &&
10378 { ac_try='test -z "$ac_c_werror_flag"
10379 || test ! -s conftest.err'
10380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10381 (eval $ac_try) 2>&5
10382 ac_status=$?
10383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10384 (exit $ac_status); }; } &&
10385 { ac_try='test -s conftest.$ac_objext'
10386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10387 (eval $ac_try) 2>&5
10388 ac_status=$?
10389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10390 (exit $ac_status); }; }; then
Thomas Woutersb2137042007-02-01 18:02:27 +000010391 ac_hi=-1 ac_mid=-1
10392 while :; do
10393 cat >conftest.$ac_ext <<_ACEOF
10394/* confdefs.h. */
10395_ACEOF
10396cat confdefs.h >>conftest.$ac_ext
10397cat >>conftest.$ac_ext <<_ACEOF
10398/* end confdefs.h. */
10399$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000010400int
10401main ()
10402{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010403static int test_array [1 - 2 * !(((long) (sizeof (_Bool))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000010404test_array [0] = 0
10405
10406 ;
10407 return 0;
10408}
10409_ACEOF
10410rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010411if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10412 (eval $ac_compile) 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000010413 ac_status=$?
10414 grep -v '^ *+' conftest.er1 >conftest.err
10415 rm -f conftest.er1
10416 cat conftest.err >&5
10417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010418 (exit $ac_status); } &&
10419 { ac_try='test -z "$ac_c_werror_flag"
10420 || test ! -s conftest.err'
10421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10422 (eval $ac_try) 2>&5
10423 ac_status=$?
10424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10425 (exit $ac_status); }; } &&
10426 { ac_try='test -s conftest.$ac_objext'
10427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10428 (eval $ac_try) 2>&5
10429 ac_status=$?
10430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10431 (exit $ac_status); }; }; then
Thomas Woutersb2137042007-02-01 18:02:27 +000010432 ac_lo=$ac_mid; break
10433else
10434 echo "$as_me: failed program was:" >&5
10435sed 's/^/| /' conftest.$ac_ext >&5
10436
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010437ac_hi=`expr '(' $ac_mid ')' - 1`
10438 if test $ac_mid -le $ac_hi; then
10439 ac_lo= ac_hi=
10440 break
10441 fi
10442 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000010443fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010444rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000010445 done
10446else
10447 echo "$as_me: failed program was:" >&5
10448sed 's/^/| /' conftest.$ac_ext >&5
10449
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010450ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000010451fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010452rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000010453fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010454rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000010455# Binary search between lo and hi bounds.
10456while test "x$ac_lo" != "x$ac_hi"; do
10457 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10458 cat >conftest.$ac_ext <<_ACEOF
10459/* confdefs.h. */
10460_ACEOF
10461cat confdefs.h >>conftest.$ac_ext
10462cat >>conftest.$ac_ext <<_ACEOF
10463/* end confdefs.h. */
10464$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000010465int
10466main ()
10467{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010468static int test_array [1 - 2 * !(((long) (sizeof (_Bool))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000010469test_array [0] = 0
10470
10471 ;
10472 return 0;
10473}
10474_ACEOF
10475rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10477 (eval $ac_compile) 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000010478 ac_status=$?
10479 grep -v '^ *+' conftest.er1 >conftest.err
10480 rm -f conftest.er1
10481 cat conftest.err >&5
10482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010483 (exit $ac_status); } &&
10484 { ac_try='test -z "$ac_c_werror_flag"
10485 || test ! -s conftest.err'
10486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10487 (eval $ac_try) 2>&5
10488 ac_status=$?
10489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10490 (exit $ac_status); }; } &&
10491 { ac_try='test -s conftest.$ac_objext'
10492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10493 (eval $ac_try) 2>&5
10494 ac_status=$?
10495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10496 (exit $ac_status); }; }; then
Thomas Woutersb2137042007-02-01 18:02:27 +000010497 ac_hi=$ac_mid
10498else
10499 echo "$as_me: failed program was:" >&5
10500sed 's/^/| /' conftest.$ac_ext >&5
10501
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010502ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000010503fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010504rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000010505done
10506case $ac_lo in
10507?*) ac_cv_sizeof__Bool=$ac_lo;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010508'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool), 77
Thomas Woutersb2137042007-02-01 18:02:27 +000010509See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010510echo "$as_me: error: cannot compute sizeof (_Bool), 77
Thomas Woutersb2137042007-02-01 18:02:27 +000010511See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010512 { (exit 1); exit 1; }; } ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000010513esac
10514else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010515 if test "$cross_compiling" = yes; then
10516 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
10517See \`config.log' for more details." >&5
10518echo "$as_me: error: cannot run test program while cross compiling
10519See \`config.log' for more details." >&2;}
10520 { (exit 1); exit 1; }; }
10521else
Thomas Woutersb2137042007-02-01 18:02:27 +000010522 cat >conftest.$ac_ext <<_ACEOF
10523/* confdefs.h. */
10524_ACEOF
10525cat confdefs.h >>conftest.$ac_ext
10526cat >>conftest.$ac_ext <<_ACEOF
10527/* end confdefs.h. */
10528$ac_includes_default
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010529long longval () { return (long) (sizeof (_Bool)); }
10530unsigned long ulongval () { return (long) (sizeof (_Bool)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000010531#include <stdio.h>
10532#include <stdlib.h>
10533int
10534main ()
10535{
10536
10537 FILE *f = fopen ("conftest.val", "w");
10538 if (! f)
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010539 exit (1);
10540 if (((long) (sizeof (_Bool))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000010541 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010542 long i = longval ();
10543 if (i != ((long) (sizeof (_Bool))))
10544 exit (1);
Thomas Woutersb2137042007-02-01 18:02:27 +000010545 fprintf (f, "%ld\n", i);
10546 }
10547 else
10548 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010549 unsigned long i = ulongval ();
10550 if (i != ((long) (sizeof (_Bool))))
10551 exit (1);
Thomas Woutersb2137042007-02-01 18:02:27 +000010552 fprintf (f, "%lu\n", i);
10553 }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010554 exit (ferror (f) || fclose (f) != 0);
Thomas Woutersb2137042007-02-01 18:02:27 +000010555
10556 ;
10557 return 0;
10558}
10559_ACEOF
10560rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010561if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10562 (eval $ac_link) 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000010563 ac_status=$?
10564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10565 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10567 (eval $ac_try) 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000010568 ac_status=$?
10569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10570 (exit $ac_status); }; }; then
10571 ac_cv_sizeof__Bool=`cat conftest.val`
10572else
10573 echo "$as_me: program exited with status $ac_status" >&5
10574echo "$as_me: failed program was:" >&5
10575sed 's/^/| /' conftest.$ac_ext >&5
10576
10577( exit $ac_status )
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010578{ { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool), 77
Thomas Woutersb2137042007-02-01 18:02:27 +000010579See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010580echo "$as_me: error: cannot compute sizeof (_Bool), 77
Thomas Woutersb2137042007-02-01 18:02:27 +000010581See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010582 { (exit 1); exit 1; }; }
Thomas Woutersb2137042007-02-01 18:02:27 +000010583fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010584rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10585fi
Thomas Woutersb2137042007-02-01 18:02:27 +000010586fi
10587rm -f conftest.val
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010588else
10589 ac_cv_sizeof__Bool=0
Thomas Woutersb2137042007-02-01 18:02:27 +000010590fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010591fi
10592echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
10593echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000010594cat >>confdefs.h <<_ACEOF
10595#define SIZEOF__BOOL $ac_cv_sizeof__Bool
10596_ACEOF
10597
10598
10599fi
10600
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010601echo "$as_me:$LINENO: checking for uintptr_t" >&5
10602echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000010603if test "${ac_cv_type_uintptr_t+set}" = set; then
10604 echo $ECHO_N "(cached) $ECHO_C" >&6
10605else
10606 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010607/* confdefs.h. */
10608_ACEOF
10609cat confdefs.h >>conftest.$ac_ext
10610cat >>conftest.$ac_ext <<_ACEOF
10611/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000010612#ifdef HAVE_STDINT_H
10613 #include <stdint.h>
10614 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010615
Martin v. Löwis11437992002-04-12 09:54:03 +000010616int
10617main ()
10618{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010619if ((uintptr_t *) 0)
Thomas Wouters89f507f2006-12-13 04:49:30 +000010620 return 0;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010621if (sizeof (uintptr_t))
Thomas Wouters89f507f2006-12-13 04:49:30 +000010622 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010623 ;
10624 return 0;
10625}
10626_ACEOF
10627rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010628if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10629 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010630 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010631 grep -v '^ *+' conftest.er1 >conftest.err
10632 rm -f conftest.er1
10633 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010635 (exit $ac_status); } &&
10636 { ac_try='test -z "$ac_c_werror_flag"
10637 || test ! -s conftest.err'
10638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10639 (eval $ac_try) 2>&5
10640 ac_status=$?
10641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10642 (exit $ac_status); }; } &&
10643 { ac_try='test -s conftest.$ac_objext'
10644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10645 (eval $ac_try) 2>&5
10646 ac_status=$?
10647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10648 (exit $ac_status); }; }; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000010649 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010650else
Martin v. Löwis11437992002-04-12 09:54:03 +000010651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010652sed 's/^/| /' conftest.$ac_ext >&5
10653
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010654ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010655fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010656rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000010657fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010658echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
10659echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000010660if test $ac_cv_type_uintptr_t = yes; then
10661
10662cat >>confdefs.h <<_ACEOF
10663#define HAVE_UINTPTR_T 1
10664_ACEOF
10665
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010666echo "$as_me:$LINENO: checking for uintptr_t" >&5
10667echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010668if test "${ac_cv_type_uintptr_t+set}" = set; then
10669 echo $ECHO_N "(cached) $ECHO_C" >&6
10670else
10671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010672/* confdefs.h. */
10673_ACEOF
10674cat confdefs.h >>conftest.$ac_ext
10675cat >>conftest.$ac_ext <<_ACEOF
10676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010677$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010678int
10679main ()
10680{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010681if ((uintptr_t *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010682 return 0;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010683if (sizeof (uintptr_t))
Martin v. Löwis11437992002-04-12 09:54:03 +000010684 return 0;
10685 ;
10686 return 0;
10687}
10688_ACEOF
10689rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010690if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10691 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010692 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010693 grep -v '^ *+' conftest.er1 >conftest.err
10694 rm -f conftest.er1
10695 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010697 (exit $ac_status); } &&
10698 { ac_try='test -z "$ac_c_werror_flag"
10699 || test ! -s conftest.err'
10700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10701 (eval $ac_try) 2>&5
10702 ac_status=$?
10703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10704 (exit $ac_status); }; } &&
10705 { ac_try='test -s conftest.$ac_objext'
10706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10707 (eval $ac_try) 2>&5
10708 ac_status=$?
10709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10710 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010711 ac_cv_type_uintptr_t=yes
10712else
10713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010714sed 's/^/| /' conftest.$ac_ext >&5
10715
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010716ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010717fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010718rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010719fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010720echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
10721echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010722
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010723echo "$as_me:$LINENO: checking size of uintptr_t" >&5
10724echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010725if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
10726 echo $ECHO_N "(cached) $ECHO_C" >&6
10727else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010728 if test "$ac_cv_type_uintptr_t" = yes; then
10729 # The cast to unsigned long works around a bug in the HP C Compiler
10730 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10731 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10732 # This bug is HP SR number 8606223364.
Martin v. Löwis11437992002-04-12 09:54:03 +000010733 if test "$cross_compiling" = yes; then
10734 # Depending upon the size, compute the lo and hi bounds.
10735cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010736/* confdefs.h. */
10737_ACEOF
10738cat confdefs.h >>conftest.$ac_ext
10739cat >>conftest.$ac_ext <<_ACEOF
10740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010741$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010742int
10743main ()
10744{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010745static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010746test_array [0] = 0
10747
10748 ;
10749 return 0;
10750}
10751_ACEOF
10752rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010753if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10754 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010755 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010756 grep -v '^ *+' conftest.er1 >conftest.err
10757 rm -f conftest.er1
10758 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010760 (exit $ac_status); } &&
10761 { ac_try='test -z "$ac_c_werror_flag"
10762 || test ! -s conftest.err'
10763 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10764 (eval $ac_try) 2>&5
10765 ac_status=$?
10766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10767 (exit $ac_status); }; } &&
10768 { ac_try='test -s conftest.$ac_objext'
10769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10770 (eval $ac_try) 2>&5
10771 ac_status=$?
10772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10773 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010774 ac_lo=0 ac_mid=0
10775 while :; do
10776 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010777/* confdefs.h. */
10778_ACEOF
10779cat confdefs.h >>conftest.$ac_ext
10780cat >>conftest.$ac_ext <<_ACEOF
10781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010782$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010783int
10784main ()
10785{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010786static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010787test_array [0] = 0
10788
10789 ;
10790 return 0;
10791}
10792_ACEOF
10793rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010794if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10795 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010796 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010797 grep -v '^ *+' conftest.er1 >conftest.err
10798 rm -f conftest.er1
10799 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010801 (exit $ac_status); } &&
10802 { ac_try='test -z "$ac_c_werror_flag"
10803 || test ! -s conftest.err'
10804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10805 (eval $ac_try) 2>&5
10806 ac_status=$?
10807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10808 (exit $ac_status); }; } &&
10809 { ac_try='test -s conftest.$ac_objext'
10810 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10811 (eval $ac_try) 2>&5
10812 ac_status=$?
10813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10814 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010815 ac_hi=$ac_mid; break
10816else
10817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010818sed 's/^/| /' conftest.$ac_ext >&5
10819
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010820ac_lo=`expr $ac_mid + 1`
10821 if test $ac_lo -le $ac_mid; then
10822 ac_lo= ac_hi=
10823 break
10824 fi
10825 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010826fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010827rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010828 done
10829else
10830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010831sed 's/^/| /' conftest.$ac_ext >&5
10832
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010833cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010834/* confdefs.h. */
10835_ACEOF
10836cat confdefs.h >>conftest.$ac_ext
10837cat >>conftest.$ac_ext <<_ACEOF
10838/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010839$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010840int
10841main ()
10842{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010843static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010844test_array [0] = 0
10845
10846 ;
10847 return 0;
10848}
10849_ACEOF
10850rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010851if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10852 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010853 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010854 grep -v '^ *+' conftest.er1 >conftest.err
10855 rm -f conftest.er1
10856 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010858 (exit $ac_status); } &&
10859 { ac_try='test -z "$ac_c_werror_flag"
10860 || test ! -s conftest.err'
10861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10862 (eval $ac_try) 2>&5
10863 ac_status=$?
10864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10865 (exit $ac_status); }; } &&
10866 { ac_try='test -s conftest.$ac_objext'
10867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10868 (eval $ac_try) 2>&5
10869 ac_status=$?
10870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10871 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010872 ac_hi=-1 ac_mid=-1
10873 while :; do
10874 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010875/* confdefs.h. */
10876_ACEOF
10877cat confdefs.h >>conftest.$ac_ext
10878cat >>conftest.$ac_ext <<_ACEOF
10879/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010880$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010881int
10882main ()
10883{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010884static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010885test_array [0] = 0
10886
10887 ;
10888 return 0;
10889}
10890_ACEOF
10891rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010892if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10893 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +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öwis11437992002-04-12 09:54:03 +000010898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010899 (exit $ac_status); } &&
10900 { ac_try='test -z "$ac_c_werror_flag"
10901 || test ! -s conftest.err'
10902 { (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_objext'
10908 { (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
Martin v. Löwis11437992002-04-12 09:54:03 +000010913 ac_lo=$ac_mid; break
10914else
10915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010916sed 's/^/| /' conftest.$ac_ext >&5
10917
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010918ac_hi=`expr '(' $ac_mid ')' - 1`
10919 if test $ac_mid -le $ac_hi; then
10920 ac_lo= ac_hi=
10921 break
10922 fi
10923 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010924fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010925rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010926 done
10927else
10928 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010929sed 's/^/| /' conftest.$ac_ext >&5
10930
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010931ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010932fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010933rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010934fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010935rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010936# Binary search between lo and hi bounds.
10937while test "x$ac_lo" != "x$ac_hi"; do
10938 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10939 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010940/* confdefs.h. */
10941_ACEOF
10942cat confdefs.h >>conftest.$ac_ext
10943cat >>conftest.$ac_ext <<_ACEOF
10944/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010945$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010946int
10947main ()
10948{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010949static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010950test_array [0] = 0
10951
10952 ;
10953 return 0;
10954}
10955_ACEOF
10956rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010957if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10958 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010959 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010960 grep -v '^ *+' conftest.er1 >conftest.err
10961 rm -f conftest.er1
10962 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010964 (exit $ac_status); } &&
10965 { ac_try='test -z "$ac_c_werror_flag"
10966 || test ! -s conftest.err'
10967 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10968 (eval $ac_try) 2>&5
10969 ac_status=$?
10970 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10971 (exit $ac_status); }; } &&
10972 { ac_try='test -s conftest.$ac_objext'
10973 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10974 (eval $ac_try) 2>&5
10975 ac_status=$?
10976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10977 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010978 ac_hi=$ac_mid
10979else
10980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010981sed 's/^/| /' conftest.$ac_ext >&5
10982
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010983ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010984fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010985rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010986done
10987case $ac_lo in
10988?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010989'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000010990See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010991echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000010992See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010993 { (exit 1); exit 1; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010994esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010995else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000010996 if test "$cross_compiling" = yes; then
10997 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
10998See \`config.log' for more details." >&5
10999echo "$as_me: error: cannot run test program while cross compiling
11000See \`config.log' for more details." >&2;}
11001 { (exit 1); exit 1; }; }
11002else
Martin v. Löwis11437992002-04-12 09:54:03 +000011003 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011004/* confdefs.h. */
11005_ACEOF
11006cat confdefs.h >>conftest.$ac_ext
11007cat >>conftest.$ac_ext <<_ACEOF
11008/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011009$ac_includes_default
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011010long longval () { return (long) (sizeof (uintptr_t)); }
11011unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011012#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011013#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011014int
11015main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011016{
Martin v. Löwis11437992002-04-12 09:54:03 +000011017
11018 FILE *f = fopen ("conftest.val", "w");
11019 if (! f)
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011020 exit (1);
11021 if (((long) (sizeof (uintptr_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011022 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011023 long i = longval ();
11024 if (i != ((long) (sizeof (uintptr_t))))
11025 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +000011026 fprintf (f, "%ld\n", i);
11027 }
11028 else
11029 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011030 unsigned long i = ulongval ();
11031 if (i != ((long) (sizeof (uintptr_t))))
11032 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +000011033 fprintf (f, "%lu\n", i);
11034 }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011035 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011036
11037 ;
11038 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011039}
Martin v. Löwis11437992002-04-12 09:54:03 +000011040_ACEOF
11041rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011042if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11043 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011044 ac_status=$?
11045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11046 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11048 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011049 ac_status=$?
11050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11051 (exit $ac_status); }; }; then
11052 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011053else
Martin v. Löwis11437992002-04-12 09:54:03 +000011054 echo "$as_me: program exited with status $ac_status" >&5
11055echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011056sed 's/^/| /' conftest.$ac_ext >&5
11057
Martin v. Löwis11437992002-04-12 09:54:03 +000011058( exit $ac_status )
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011059{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000011060See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011061echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000011062See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011063 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011064fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011065rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11066fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011067fi
11068rm -f conftest.val
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011069else
11070 ac_cv_sizeof_uintptr_t=0
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011071fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011072fi
11073echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
11074echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011075cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011076#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011077_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011078
Michael W. Hudson54241132001-12-07 15:38:26 +000011079
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011080fi
11081
Thomas Wouters89f507f2006-12-13 04:49:30 +000011082
11083
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011084# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011085echo "$as_me:$LINENO: checking size of off_t" >&5
11086echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011087if test "${ac_cv_sizeof_off_t+set}" = set; then
11088 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011089else
11090 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011091 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011092else
Martin v. Löwis11437992002-04-12 09:54:03 +000011093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011094/* confdefs.h. */
11095_ACEOF
11096cat confdefs.h >>conftest.$ac_ext
11097cat >>conftest.$ac_ext <<_ACEOF
11098/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011099#include <stdio.h>
11100#include <sys/types.h>
11101main()
11102{
11103 FILE *f=fopen("conftestval", "w");
11104 if (!f) exit(1);
11105 fprintf(f, "%d\n", sizeof(off_t));
11106 exit(0);
11107}
Martin v. Löwis11437992002-04-12 09:54:03 +000011108_ACEOF
11109rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011110if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11111 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011112 ac_status=$?
11113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11114 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11116 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011117 ac_status=$?
11118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11119 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011120 ac_cv_sizeof_off_t=`cat conftestval`
11121else
Martin v. Löwis11437992002-04-12 09:54:03 +000011122 echo "$as_me: program exited with status $ac_status" >&5
11123echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011124sed 's/^/| /' conftest.$ac_ext >&5
11125
Martin v. Löwis11437992002-04-12 09:54:03 +000011126( exit $ac_status )
11127ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011128fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011129rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011130fi
11131
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011132fi
11133
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011134echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
11135echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011136
11137cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011138#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011139_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011140
Michael W. Hudson54241132001-12-07 15:38:26 +000011141
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011142echo "$as_me:$LINENO: checking whether to enable large file support" >&5
11143echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011144if test "$have_long_long" = yes -a \
11145 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
11146 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011147
Martin v. Löwis11437992002-04-12 09:54:03 +000011148cat >>confdefs.h <<\_ACEOF
11149#define HAVE_LARGEFILE_SUPPORT 1
11150_ACEOF
11151
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011152 echo "$as_me:$LINENO: result: yes" >&5
11153echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011154else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011155 echo "$as_me:$LINENO: result: no" >&5
11156echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011157fi
11158
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011159# AC_CHECK_SIZEOF() doesn't include <time.h>.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011160echo "$as_me:$LINENO: checking size of time_t" >&5
11161echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011162if test "${ac_cv_sizeof_time_t+set}" = set; then
11163 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011164else
11165 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011166 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011167else
Martin v. Löwis11437992002-04-12 09:54:03 +000011168 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011169/* confdefs.h. */
11170_ACEOF
11171cat confdefs.h >>conftest.$ac_ext
11172cat >>conftest.$ac_ext <<_ACEOF
11173/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011174#include <stdio.h>
11175#include <time.h>
11176main()
11177{
11178 FILE *f=fopen("conftestval", "w");
11179 if (!f) exit(1);
11180 fprintf(f, "%d\n", sizeof(time_t));
11181 exit(0);
11182}
Martin v. Löwis11437992002-04-12 09:54:03 +000011183_ACEOF
11184rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011185if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11186 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011187 ac_status=$?
11188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11189 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11191 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011192 ac_status=$?
11193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11194 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011195 ac_cv_sizeof_time_t=`cat conftestval`
11196else
Martin v. Löwis11437992002-04-12 09:54:03 +000011197 echo "$as_me: program exited with status $ac_status" >&5
11198echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011199sed 's/^/| /' conftest.$ac_ext >&5
11200
Martin v. Löwis11437992002-04-12 09:54:03 +000011201( exit $ac_status )
11202ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011203fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011204rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011205fi
11206
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011207fi
11208
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011209echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
11210echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011211
11212cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011213#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011214_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011215
Michael W. Hudson54241132001-12-07 15:38:26 +000011216
11217
Trent Mick635f6fb2000-08-23 21:33:05 +000011218# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000011219ac_save_cc="$CC"
11220if test "$ac_cv_kpthread" = "yes"
11221then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011222elif test "$ac_cv_kthread" = "yes"
11223then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011224elif test "$ac_cv_pthread" = "yes"
11225then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000011226fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011227echo "$as_me:$LINENO: checking for pthread_t" >&5
11228echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000011229have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011230cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011231/* confdefs.h. */
11232_ACEOF
11233cat confdefs.h >>conftest.$ac_ext
11234cat >>conftest.$ac_ext <<_ACEOF
11235/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000011236#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011237int
11238main ()
11239{
Guido van Rossum12580492000-09-24 16:47:19 +000011240pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011241 ;
11242 return 0;
11243}
11244_ACEOF
11245rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011246if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11247 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011248 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011249 grep -v '^ *+' conftest.er1 >conftest.err
11250 rm -f conftest.er1
11251 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011253 (exit $ac_status); } &&
11254 { ac_try='test -z "$ac_c_werror_flag"
11255 || test ! -s conftest.err'
11256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11257 (eval $ac_try) 2>&5
11258 ac_status=$?
11259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11260 (exit $ac_status); }; } &&
11261 { ac_try='test -s conftest.$ac_objext'
11262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11263 (eval $ac_try) 2>&5
11264 ac_status=$?
11265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11266 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000011267 have_pthread_t=yes
11268else
Martin v. Löwis11437992002-04-12 09:54:03 +000011269 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011270sed 's/^/| /' conftest.$ac_ext >&5
11271
Trent Mick635f6fb2000-08-23 21:33:05 +000011272fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011273rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11274echo "$as_me:$LINENO: result: $have_pthread_t" >&5
11275echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000011276if test "$have_pthread_t" = yes ; then
11277 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011278 echo "$as_me:$LINENO: checking size of pthread_t" >&5
11279echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011280 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
11281 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000011282else
11283 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011284 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000011285else
Martin v. Löwis11437992002-04-12 09:54:03 +000011286 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011287/* confdefs.h. */
11288_ACEOF
11289cat confdefs.h >>conftest.$ac_ext
11290cat >>conftest.$ac_ext <<_ACEOF
11291/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000011292#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011293#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000011294 main()
11295 {
11296 FILE *f=fopen("conftestval", "w");
11297 if (!f) exit(1);
11298 fprintf(f, "%d\n", sizeof(pthread_t));
11299 exit(0);
11300 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011301_ACEOF
11302rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011303if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11304 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011305 ac_status=$?
11306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11307 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011308 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11309 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011310 ac_status=$?
11311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11312 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000011313 ac_cv_sizeof_pthread_t=`cat conftestval`
11314else
Martin v. Löwis11437992002-04-12 09:54:03 +000011315 echo "$as_me: program exited with status $ac_status" >&5
11316echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011317sed 's/^/| /' conftest.$ac_ext >&5
11318
Martin v. Löwis11437992002-04-12 09:54:03 +000011319( exit $ac_status )
11320ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000011321fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011322rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +000011323fi
11324
Trent Mick635f6fb2000-08-23 21:33:05 +000011325fi
11326
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011327 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
11328echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011329
11330cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000011331#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011332_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000011333
11334fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000011335CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000011336
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011337echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
11338echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
11339# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000011340if test "${enable_toolbox_glue+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011341 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +000011342
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011343fi;
Jack Jansene578a632001-08-15 01:27:14 +000011344
11345if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000011346then
Jack Jansene578a632001-08-15 01:27:14 +000011347 case $ac_sys_system/$ac_sys_release in
11348 Darwin/*)
11349 enable_toolbox_glue="yes";;
11350 *)
11351 enable_toolbox_glue="no";;
11352 esac
11353fi
11354case "$enable_toolbox_glue" in
11355yes)
Jack Jansene578a632001-08-15 01:27:14 +000011356 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011357 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000011358
11359cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000011360#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011361_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000011362
11363 ;;
11364*)
Jack Jansene578a632001-08-15 01:27:14 +000011365 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000011366 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000011367 ;;
11368esac
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011369echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
11370echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000011371
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011372
11373case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011374 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000011375 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
11376 ;;
11377 Darwin/*)
11378 OTHER_LIBTOOL_OPT=""
11379 ;;
11380esac
11381
11382
11383case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000011384 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000011385 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
11386 if test "${enable_universalsdk}"; then
11387 :
11388 else
11389 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
11390 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000011391 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000011392 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000011393 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000011394 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
11395 if test ${gcc_version} '<' 4.0
11396 then
11397 LIBTOOL_CRUFT="-lcc_dynamic"
11398 else
11399 LIBTOOL_CRUFT=""
11400 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000011401 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000011402 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000011403 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011404esac
11405
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011406echo "$as_me:$LINENO: checking for --enable-framework" >&5
11407echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000011408if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011409then
Skip Montanarodecc6a42003-01-01 20:07:49 +000011410 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000011411 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000011412 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011413
Martin v. Löwis11437992002-04-12 09:54:03 +000011414cat >>confdefs.h <<\_ACEOF
11415#define WITH_NEXT_FRAMEWORK 1
11416_ACEOF
11417
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011418 echo "$as_me:$LINENO: result: yes" >&5
11419echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011420else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011421 echo "$as_me:$LINENO: result: no" >&5
11422echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011423fi
11424
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011425echo "$as_me:$LINENO: checking for dyld" >&5
11426echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011427case $ac_sys_system/$ac_sys_release in
11428 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011429
Martin v. Löwis11437992002-04-12 09:54:03 +000011430cat >>confdefs.h <<\_ACEOF
11431#define WITH_DYLD 1
11432_ACEOF
11433
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011434 echo "$as_me:$LINENO: result: always on for Darwin" >&5
11435echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011436 ;;
11437 *)
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011438 echo "$as_me:$LINENO: result: no" >&5
11439echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +000011440 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011441esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011442
Guido van Rossum0a516c91994-09-12 10:58:40 +000011443# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000011444
Michael W. Hudson54241132001-12-07 15:38:26 +000011445
11446
11447
11448
Guido van Rossum0a516c91994-09-12 10:58:40 +000011449# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000011450# -- usually .so, .sl on HP-UX, .dll on Cygwin
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011451echo "$as_me:$LINENO: checking SO" >&5
11452echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011453if test -z "$SO"
11454then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011455 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000011456 hp*|HP*)
11457 case `uname -m` in
11458 ia64) SO=.so;;
11459 *) SO=.sl;;
11460 esac
11461 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000011462 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011463 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011464 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000011465else
11466 # this might also be a termcap variable, see #610332
11467 echo
11468 echo '====================================================================='
11469 echo '+ +'
11470 echo '+ WARNING: You have set SO in your environment. +'
11471 echo '+ Do you really mean to change the extension for shared libraries? +'
11472 echo '+ Continuing in 10 seconds to let you to ponder. +'
11473 echo '+ +'
11474 echo '====================================================================='
11475 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000011476fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011477echo "$as_me:$LINENO: result: $SO" >&5
11478echo "${ECHO_T}$SO" >&6
Thomas Wouters477c8d52006-05-27 19:21:47 +000011479
11480cat >>confdefs.h <<_ACEOF
11481#define SHLIB_EXT "$SO"
11482_ACEOF
11483
Guido van Rossum0a516c91994-09-12 10:58:40 +000011484# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000011485# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011486# (Shared libraries in this instance are shared modules to be loaded into
11487# Python, as opposed to building Python itself as a shared library.)
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011488echo "$as_me:$LINENO: checking LDSHARED" >&5
11489echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011490if test -z "$LDSHARED"
11491then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011492 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011493 AIX*)
11494 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000011495 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011496 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000011497 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000011498 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000011499 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000011500 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000011501 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000011502 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000011503 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011504 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000011505 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000011506 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000011507 LDSHARED='$(CC) $(LDFLAGS) -bundle'
11508 if test "$enable_framework" ; then
11509 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000011510 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
11511 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000011512 else
11513 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000011514 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000011515 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000011516 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000011517 LDSHARED='$(CC) $(LDFLAGS) -bundle'
11518 if test "$enable_framework" ; then
11519 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000011520 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
11521 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000011522 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000011523 # No framework, use the Python app as bundle-loader
11524 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000011525 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011526 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000011527 Darwin/*)
11528 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
11529 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000011530 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Thomas Wouters477c8d52006-05-27 19:21:47 +000011531 if test ${cur_target} '>' 10.2; then
11532 cur_target=10.3
11533 fi
Jack Jansenc110f862005-01-07 10:49:32 +000011534 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Thomas Wouters477c8d52006-05-27 19:21:47 +000011535 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Jack Jansenbe954622004-12-26 23:07:48 +000011536 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000011537 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000011538 if test "${enable_universalsdk}"; then
11539 LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
11540 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000011541 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
11542 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000011543 else
11544 LDSHARED='$(CC) $(LDFLAGS) -bundle'
11545 if test "$enable_framework" ; then
11546 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000011547 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
11548 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000011549 else
11550 # No framework, use the Python app as bundle-loader
11551 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
11552 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
11553 fi
11554 fi
11555 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000011556 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000011557 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011558 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000011559 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000011560 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000011561 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000011562 else
11563 LDSHARED="ld -Bshareable ${LDFLAGS}"
11564 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000011565 OpenBSD*)
11566 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
11567 then
11568 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
11569 else
11570 case `uname -r` in
11571 [01].* | 2.[0-7] | 2.[0-7].*)
11572 LDSHARED="ld -Bshareable ${LDFLAGS}"
11573 ;;
11574 *)
11575 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
11576 ;;
11577 esac
11578 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000011579 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000011580 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000011581 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000011582 then LDSHARED='$(CC) -shared'
11583 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000011584 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000011585 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000011586 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000011587 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011588 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011589 *) LDSHARED="ld";;
11590 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000011591fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011592echo "$as_me:$LINENO: result: $LDSHARED" >&5
11593echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011594BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000011595# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011596# library (module) -- this is only needed for a few systems
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011597echo "$as_me:$LINENO: checking CCSHARED" >&5
11598echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011599if test -z "$CCSHARED"
11600then
Guido van Rossum07397971997-04-29 21:49:50 +000011601 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000011602 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011603 then CCSHARED="-fPIC";
11604 elif test `uname -p` = sparc;
11605 then CCSHARED="-xcode=pic32";
11606 else CCSHARED="-Kpic";
11607 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000011608 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000011609 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000011610 else CCSHARED="+z";
11611 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011612 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000011613 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000011614 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000011615 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000011616 if test "$GCC" = "yes"
11617 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011618 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000011619 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000011620 SCO_SV*)
11621 if test "$GCC" = "yes"
11622 then CCSHARED="-fPIC"
11623 else CCSHARED="-Kpic -belf"
11624 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000011625 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000011626 IRIX*/6*) case $CC in
11627 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000011628 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000011629 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011630 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011631 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000011632fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011633echo "$as_me:$LINENO: result: $CCSHARED" >&5
11634echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011635# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011636# the python executable -- this is only needed for a few systems
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011637echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
11638echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011639if test -z "$LINKFORSHARED"
11640then
Guido van Rossum07397971997-04-29 21:49:50 +000011641 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011642 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000011643 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000011644 LINKFORSHARED="-Wl,-E -Wl,+s";;
11645# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000011646 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011647 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011648 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000011649 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011650 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
11651 # which is
Jack Jansene578a632001-08-15 01:27:14 +000011652 # not used by the core itself but which needs to be in the core so
11653 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000011654 # -prebind is no longer used, because it actually seems to give a
11655 # slowdown in stead of a speedup, maybe due to the large number of
11656 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011657
11658 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000011659 if test "$enable_framework"
11660 then
Jack Jansenda49e192005-01-07 13:08:22 +000011661 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000011662 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011663 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000011664 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000011665 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000011666 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000011667 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000011668 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
11669 then
11670 LINKFORSHARED="-Wl,--export-dynamic"
11671 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000011672 SunOS/5*) case $CC in
11673 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000011674 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000011675 then
11676 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000011677 fi;;
11678 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000011679 CYGWIN*)
11680 if test $enable_shared = "no"
11681 then
11682 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
11683 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011684 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000011685fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011686echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
11687echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011688
Michael W. Hudson54241132001-12-07 15:38:26 +000011689
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011690echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
11691echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000011692if test ! "$LIBRARY" = "$LDLIBRARY"
11693then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000011694 case $ac_sys_system in
11695 CYGWIN*)
11696 # Cygwin needs CCSHARED when building extension DLLs
11697 # but not when building the interpreter DLL.
11698 CFLAGSFORSHARED='';;
11699 *)
11700 CFLAGSFORSHARED='$(CCSHARED)'
11701 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000011702fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011703echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
11704echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000011705
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011706# SHLIBS are libraries (except -lc and -lm) to link to the python shared
11707# library (with --enable-shared).
11708# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000011709# symbols, this must be set to $(LIBS) (expanded by make). We do this even
11710# if it is not required, since it creates a dependency of the shared library
11711# to LIBS. This, in turn, means that applications linking the shared libpython
11712# don't need to link LIBS explicitly. The default should be only changed
11713# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011714
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011715echo "$as_me:$LINENO: checking SHLIBS" >&5
11716echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011717case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011718 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000011719 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011720esac
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011721echo "$as_me:$LINENO: result: $SHLIBS" >&5
11722echo "${ECHO_T}$SHLIBS" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011723
11724
Guido van Rossum627b2d71993-12-24 10:39:16 +000011725# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000011726
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011727echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
11728echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011729if test "${ac_cv_lib_dl_dlopen+set}" = set; then
11730 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011731else
Martin v. Löwis11437992002-04-12 09:54:03 +000011732 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011733LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011734cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011735/* confdefs.h. */
11736_ACEOF
11737cat confdefs.h >>conftest.$ac_ext
11738cat >>conftest.$ac_ext <<_ACEOF
11739/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011740
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011741/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011742#ifdef __cplusplus
11743extern "C"
11744#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011745/* We use char because int might match the return type of a gcc2
11746 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011747char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011748int
11749main ()
11750{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011751dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011752 ;
11753 return 0;
11754}
11755_ACEOF
11756rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011757if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11758 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011759 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011760 grep -v '^ *+' conftest.er1 >conftest.err
11761 rm -f conftest.er1
11762 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011764 (exit $ac_status); } &&
11765 { ac_try='test -z "$ac_c_werror_flag"
11766 || test ! -s conftest.err'
11767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11768 (eval $ac_try) 2>&5
11769 ac_status=$?
11770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11771 (exit $ac_status); }; } &&
11772 { ac_try='test -s conftest$ac_exeext'
11773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11774 (eval $ac_try) 2>&5
11775 ac_status=$?
11776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11777 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011778 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011779else
Martin v. Löwis11437992002-04-12 09:54:03 +000011780 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011781sed 's/^/| /' conftest.$ac_ext >&5
11782
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011783ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011784fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011785rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000011786 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011787LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000011788fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011789echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
11790echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011791if test $ac_cv_lib_dl_dlopen = yes; then
11792 cat >>confdefs.h <<_ACEOF
11793#define HAVE_LIBDL 1
11794_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011795
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011796 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011797
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011798fi
11799 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000011800
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011801echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
11802echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011803if test "${ac_cv_lib_dld_shl_load+set}" = set; then
11804 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011805else
Martin v. Löwis11437992002-04-12 09:54:03 +000011806 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011807LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011808cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011809/* confdefs.h. */
11810_ACEOF
11811cat confdefs.h >>conftest.$ac_ext
11812cat >>conftest.$ac_ext <<_ACEOF
11813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011814
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011815/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011816#ifdef __cplusplus
11817extern "C"
11818#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011819/* We use char because int might match the return type of a gcc2
11820 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011821char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011822int
11823main ()
11824{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011825shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011826 ;
11827 return 0;
11828}
11829_ACEOF
11830rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011831if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11832 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011834 grep -v '^ *+' conftest.er1 >conftest.err
11835 rm -f conftest.er1
11836 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011838 (exit $ac_status); } &&
11839 { ac_try='test -z "$ac_c_werror_flag"
11840 || test ! -s conftest.err'
11841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11842 (eval $ac_try) 2>&5
11843 ac_status=$?
11844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11845 (exit $ac_status); }; } &&
11846 { ac_try='test -s conftest$ac_exeext'
11847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11848 (eval $ac_try) 2>&5
11849 ac_status=$?
11850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11851 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011852 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011853else
Martin v. Löwis11437992002-04-12 09:54:03 +000011854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011855sed 's/^/| /' conftest.$ac_ext >&5
11856
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011857ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011858fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011859rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000011860 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011861LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000011862fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011863echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
11864echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011865if test $ac_cv_lib_dld_shl_load = yes; then
11866 cat >>confdefs.h <<_ACEOF
11867#define HAVE_LIBDLD 1
11868_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011869
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011870 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011871
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011872fi
11873 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000011874
11875# only check for sem_ini if thread support is requested
11876if test "$with_threads" = "yes" -o -z "$with_threads"; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011877 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
11878echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011879if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011880 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011881else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011882 ac_func_search_save_LIBS=$LIBS
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011883ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011884cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011885/* confdefs.h. */
11886_ACEOF
11887cat confdefs.h >>conftest.$ac_ext
11888cat >>conftest.$ac_ext <<_ACEOF
11889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011890
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011891/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011892#ifdef __cplusplus
11893extern "C"
11894#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011895/* We use char because int might match the return type of a gcc2
11896 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011897char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011898int
11899main ()
11900{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011901sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011902 ;
11903 return 0;
11904}
11905_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011906rm -f conftest.$ac_objext conftest$ac_exeext
11907if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11908 (eval $ac_link) 2>conftest.er1
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011909 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011910 grep -v '^ *+' conftest.er1 >conftest.err
11911 rm -f conftest.er1
11912 cat conftest.err >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011914 (exit $ac_status); } &&
11915 { ac_try='test -z "$ac_c_werror_flag"
11916 || test ! -s conftest.err'
11917 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11918 (eval $ac_try) 2>&5
11919 ac_status=$?
11920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11921 (exit $ac_status); }; } &&
11922 { ac_try='test -s conftest$ac_exeext'
11923 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11924 (eval $ac_try) 2>&5
11925 ac_status=$?
11926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11927 (exit $ac_status); }; }; then
11928 ac_cv_search_sem_init="none required"
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011929else
11930 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011931sed 's/^/| /' conftest.$ac_ext >&5
11932
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011933fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011934rm -f conftest.err conftest.$ac_objext \
11935 conftest$ac_exeext conftest.$ac_ext
11936if test "$ac_cv_search_sem_init" = no; then
11937 for ac_lib in pthread rt posix4; do
11938 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11939 cat >conftest.$ac_ext <<_ACEOF
11940/* confdefs.h. */
11941_ACEOF
11942cat confdefs.h >>conftest.$ac_ext
11943cat >>conftest.$ac_ext <<_ACEOF
11944/* end confdefs.h. */
Thomas Wouters477c8d52006-05-27 19:21:47 +000011945
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011946/* Override any gcc2 internal prototype to avoid an error. */
11947#ifdef __cplusplus
11948extern "C"
11949#endif
11950/* We use char because int might match the return type of a gcc2
11951 builtin and then its argument prototype would still apply. */
11952char sem_init ();
11953int
11954main ()
11955{
11956sem_init ();
11957 ;
11958 return 0;
11959}
11960_ACEOF
11961rm -f conftest.$ac_objext conftest$ac_exeext
11962if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11963 (eval $ac_link) 2>conftest.er1
11964 ac_status=$?
11965 grep -v '^ *+' conftest.er1 >conftest.err
11966 rm -f conftest.er1
11967 cat conftest.err >&5
11968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11969 (exit $ac_status); } &&
11970 { ac_try='test -z "$ac_c_werror_flag"
11971 || test ! -s conftest.err'
11972 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11973 (eval $ac_try) 2>&5
11974 ac_status=$?
11975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11976 (exit $ac_status); }; } &&
11977 { ac_try='test -s conftest$ac_exeext'
11978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11979 (eval $ac_try) 2>&5
11980 ac_status=$?
11981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11982 (exit $ac_status); }; }; then
11983 ac_cv_search_sem_init="-l$ac_lib"
11984break
Thomas Wouters477c8d52006-05-27 19:21:47 +000011985else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011986 echo "$as_me: failed program was:" >&5
11987sed 's/^/| /' conftest.$ac_ext >&5
11988
Thomas Wouters477c8d52006-05-27 19:21:47 +000011989fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011990rm -f conftest.err conftest.$ac_objext \
11991 conftest$ac_exeext conftest.$ac_ext
11992 done
11993fi
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011994LIBS=$ac_func_search_save_LIBS
11995fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000011996echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
11997echo "${ECHO_T}$ac_cv_search_sem_init" >&6
11998if test "$ac_cv_search_sem_init" != no; then
11999 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012000
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012001fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000012002 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000012003 # posix4 on Solaris 2.6
12004 # pthread (first!) on Linux
12005fi
12006
Martin v. Löwis19d17342003-06-14 21:03:05 +000012007# check if we need libintl for locale functions
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012008echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
12009echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000012010if test "${ac_cv_lib_intl_textdomain+set}" = set; then
12011 echo $ECHO_N "(cached) $ECHO_C" >&6
12012else
12013 ac_check_lib_save_LIBS=$LIBS
12014LIBS="-lintl $LIBS"
12015cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012016/* confdefs.h. */
12017_ACEOF
12018cat confdefs.h >>conftest.$ac_ext
12019cat >>conftest.$ac_ext <<_ACEOF
12020/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012021
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012022/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012023#ifdef __cplusplus
12024extern "C"
12025#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012026/* We use char because int might match the return type of a gcc2
12027 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012028char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012029int
12030main ()
12031{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012032textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012033 ;
12034 return 0;
12035}
12036_ACEOF
12037rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012038if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12039 (eval $ac_link) 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000012040 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012041 grep -v '^ *+' conftest.er1 >conftest.err
12042 rm -f conftest.er1
12043 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000012044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012045 (exit $ac_status); } &&
12046 { ac_try='test -z "$ac_c_werror_flag"
12047 || test ! -s conftest.err'
12048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12049 (eval $ac_try) 2>&5
12050 ac_status=$?
12051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12052 (exit $ac_status); }; } &&
12053 { ac_try='test -s conftest$ac_exeext'
12054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12055 (eval $ac_try) 2>&5
12056 ac_status=$?
12057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12058 (exit $ac_status); }; }; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000012059 ac_cv_lib_intl_textdomain=yes
12060else
12061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012062sed 's/^/| /' conftest.$ac_ext >&5
12063
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012064ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000012065fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012066rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012067 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000012068LIBS=$ac_check_lib_save_LIBS
12069fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012070echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
12071echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000012072if test $ac_cv_lib_intl_textdomain = yes; then
12073
12074cat >>confdefs.h <<\_ACEOF
12075#define WITH_LIBINTL 1
12076_ACEOF
12077
12078fi
12079
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012080
12081# checks for system dependent C++ extensions support
12082case "$ac_sys_system" in
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012083 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
12084echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012085 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012086/* confdefs.h. */
12087_ACEOF
12088cat confdefs.h >>conftest.$ac_ext
12089cat >>conftest.$ac_ext <<_ACEOF
12090/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012091#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012092int
12093main ()
12094{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012095loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000012096 ;
12097 return 0;
12098}
12099_ACEOF
12100rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012101if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12102 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012103 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012104 grep -v '^ *+' conftest.er1 >conftest.err
12105 rm -f conftest.er1
12106 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012108 (exit $ac_status); } &&
12109 { ac_try='test -z "$ac_c_werror_flag"
12110 || test ! -s conftest.err'
12111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12112 (eval $ac_try) 2>&5
12113 ac_status=$?
12114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12115 (exit $ac_status); }; } &&
12116 { ac_try='test -s conftest$ac_exeext'
12117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12118 (eval $ac_try) 2>&5
12119 ac_status=$?
12120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12121 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012122
Martin v. Löwis11437992002-04-12 09:54:03 +000012123cat >>confdefs.h <<\_ACEOF
12124#define AIX_GENUINE_CPLUSPLUS 1
12125_ACEOF
12126
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012127 echo "$as_me:$LINENO: result: yes" >&5
12128echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012129else
Martin v. Löwis11437992002-04-12 09:54:03 +000012130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012131sed 's/^/| /' conftest.$ac_ext >&5
12132
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012133echo "$as_me:$LINENO: result: no" >&5
12134echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012135fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012136rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012137 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012138 *) ;;
12139esac
12140
Guido van Rossum70c7f481998-03-26 18:44:10 +000012141# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012142echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
12143echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012144if test "${ac_cv_lib_nsl_t_open+set}" = set; then
12145 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012146else
Martin v. Löwis11437992002-04-12 09:54:03 +000012147 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012148LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012150/* confdefs.h. */
12151_ACEOF
12152cat confdefs.h >>conftest.$ac_ext
12153cat >>conftest.$ac_ext <<_ACEOF
12154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012155
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012156/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012157#ifdef __cplusplus
12158extern "C"
12159#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012160/* We use char because int might match the return type of a gcc2
12161 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012162char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012163int
12164main ()
12165{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012166t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012167 ;
12168 return 0;
12169}
12170_ACEOF
12171rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012172if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12173 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012174 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012175 grep -v '^ *+' conftest.er1 >conftest.err
12176 rm -f conftest.er1
12177 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012179 (exit $ac_status); } &&
12180 { ac_try='test -z "$ac_c_werror_flag"
12181 || test ! -s conftest.err'
12182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12183 (eval $ac_try) 2>&5
12184 ac_status=$?
12185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12186 (exit $ac_status); }; } &&
12187 { ac_try='test -s conftest$ac_exeext'
12188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12189 (eval $ac_try) 2>&5
12190 ac_status=$?
12191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12192 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012193 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012194else
Martin v. Löwis11437992002-04-12 09:54:03 +000012195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012196sed 's/^/| /' conftest.$ac_ext >&5
12197
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012198ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012199fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012200rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012201 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012202LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012203fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012204echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
12205echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012206if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012207 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012208fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000012209 # SVR4
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012210echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
12211echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012212if test "${ac_cv_lib_socket_socket+set}" = set; then
12213 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012214else
Martin v. Löwis11437992002-04-12 09:54:03 +000012215 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012216LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012217cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012218/* confdefs.h. */
12219_ACEOF
12220cat confdefs.h >>conftest.$ac_ext
12221cat >>conftest.$ac_ext <<_ACEOF
12222/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012223
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012224/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012225#ifdef __cplusplus
12226extern "C"
12227#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012228/* We use char because int might match the return type of a gcc2
12229 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012230char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012231int
12232main ()
12233{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012234socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012235 ;
12236 return 0;
12237}
12238_ACEOF
12239rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012240if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12241 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012242 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012243 grep -v '^ *+' conftest.er1 >conftest.err
12244 rm -f conftest.er1
12245 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012247 (exit $ac_status); } &&
12248 { ac_try='test -z "$ac_c_werror_flag"
12249 || test ! -s conftest.err'
12250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12251 (eval $ac_try) 2>&5
12252 ac_status=$?
12253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12254 (exit $ac_status); }; } &&
12255 { ac_try='test -s conftest$ac_exeext'
12256 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12257 (eval $ac_try) 2>&5
12258 ac_status=$?
12259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12260 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012261 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012262else
Martin v. Löwis11437992002-04-12 09:54:03 +000012263 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012264sed 's/^/| /' conftest.$ac_ext >&5
12265
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012266ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012267fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012268rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012269 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012270LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012271fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012272echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
12273echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012274if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000012275 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000012276fi
12277 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000012278
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012279echo "$as_me:$LINENO: checking for --with-libs" >&5
12280echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012281
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012282# Check whether --with-libs or --without-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000012283if test "${with_libs+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012284 withval="$with_libs"
12285
12286echo "$as_me:$LINENO: result: $withval" >&5
12287echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000012288LIBS="$withval $LIBS"
12289
12290else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012291 echo "$as_me:$LINENO: result: no" >&5
12292echo "${ECHO_T}no" >&6
12293fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012294
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012295# Check for use of the system libffi library
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012296echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
12297echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012298
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012299# Check whether --with-system_ffi or --without-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012300if test "${with_system_ffi+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012301 withval="$with_system_ffi"
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012302
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012303fi;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012304
12305if test -z "$with_system_ffi"
12306then with_system_ffi="no"
12307fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012308echo "$as_me:$LINENO: result: $with_system_ffi" >&5
12309echo "${ECHO_T}$with_system_ffi" >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000012310
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012311# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012312
12313
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012314echo "$as_me:$LINENO: checking for --with-signal-module" >&5
12315echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012316
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012317# Check whether --with-signal-module or --without-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012318if test "${with_signal_module+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012319 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012320
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012321fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012322
12323if test -z "$with_signal_module"
12324then with_signal_module="yes"
12325fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012326echo "$as_me:$LINENO: result: $with_signal_module" >&5
12327echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012328
12329if test "${with_signal_module}" = "yes"; then
12330 USE_SIGNAL_MODULE=""
12331 SIGNAL_OBJS=""
12332else
12333 USE_SIGNAL_MODULE="#"
12334 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
12335fi
12336
Guido van Rossum3d15bd82001-01-10 18:53:48 +000012337# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000012338
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000012339USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000012340
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012341echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
12342echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012343
Guido van Rossumec2f0731997-01-22 20:54:01 +000012344
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012345# Check whether --with-dec-threads or --without-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000012346if test "${with_dec_threads+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012347 withval="$with_dec_threads"
12348
12349echo "$as_me:$LINENO: result: $withval" >&5
12350echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000012351LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000012352if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000012353 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000012354fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000012355else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012356 echo "$as_me:$LINENO: result: no" >&5
12357echo "${ECHO_T}no" >&6
12358fi;
Martin v. Löwis11437992002-04-12 09:54:03 +000012359
12360# Templates for things AC_DEFINEd more than once.
12361# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000012362
12363
Martin v. Löwis11437992002-04-12 09:54:03 +000012364
12365
12366
12367
12368
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012369echo "$as_me:$LINENO: checking for --with-threads" >&5
12370echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012371
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012372# Check whether --with-threads or --without-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000012373if test "${with_threads+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012374 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000012375
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012376fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000012377
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000012378# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000012379
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012380# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012381if test "${with_thread+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012382 withval="$with_thread"
12383 with_threads=$with_thread
12384fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000012385
12386if test -z "$with_threads"
12387then with_threads="yes"
12388fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012389echo "$as_me:$LINENO: result: $with_threads" >&5
12390echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000012391
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012392
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000012393if test "$with_threads" = "no"
12394then
12395 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012396elif test "$ac_cv_pthread_is_default" = yes
12397then
Martin v. Löwis11437992002-04-12 09:54:03 +000012398 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012399#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012400_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012401
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012402 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000012403 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012404#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012405_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012406
12407 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000012408 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012409elif test "$ac_cv_kpthread" = "yes"
12410then
12411 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000012412 if test "$ac_cv_cxx_thread" = "yes"; then
12413 CXX="$CXX -Kpthread"
12414 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012415 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000012416#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012417_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000012418
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012419 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012420 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012421elif test "$ac_cv_kthread" = "yes"
12422then
12423 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000012424 if test "$ac_cv_cxx_thread" = "yes"; then
12425 CXX="$CXX -Kthread"
12426 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012427 cat >>confdefs.h <<\_ACEOF
12428#define WITH_THREAD 1
12429_ACEOF
12430
12431 posix_threads=yes
12432 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012433elif test "$ac_cv_pthread" = "yes"
12434then
12435 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000012436 if test "$ac_cv_cxx_thread" = "yes"; then
12437 CXX="$CXX -pthread"
12438 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012439 cat >>confdefs.h <<\_ACEOF
12440#define WITH_THREAD 1
12441_ACEOF
12442
12443 posix_threads=yes
12444 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012445else
12446 if test ! -z "$with_threads" -a -d "$with_threads"
12447 then LDFLAGS="$LDFLAGS -L$with_threads"
12448 fi
12449 if test ! -z "$withval" -a -d "$withval"
12450 then LDFLAGS="$LDFLAGS -L$withval"
12451 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012452
12453 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000012454 # define _POSIX_THREADS in unistd.h. Some apparently don't
12455 # (e.g. gnu pth with pthread emulation)
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012456 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
12457echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012458 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012459/* confdefs.h. */
12460_ACEOF
12461cat confdefs.h >>conftest.$ac_ext
12462cat >>conftest.$ac_ext <<_ACEOF
12463/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012464
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012465#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012466#ifdef _POSIX_THREADS
12467yes
12468#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012469
12470_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012471if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012472 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012473 unistd_defines_pthreads=yes
12474else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012475 unistd_defines_pthreads=no
12476fi
12477rm -f conftest*
12478
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012479 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
12480echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012481
Martin v. Löwis11437992002-04-12 09:54:03 +000012482 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000012483#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012484_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000012485
Martin v. Löwis11437992002-04-12 09:54:03 +000012486 if test "${ac_cv_header_cthreads_h+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012487 echo "$as_me:$LINENO: checking for cthreads.h" >&5
12488echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012489if test "${ac_cv_header_cthreads_h+set}" = set; then
12490 echo $ECHO_N "(cached) $ECHO_C" >&6
12491fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012492echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
12493echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012494else
Martin v. Löwis11437992002-04-12 09:54:03 +000012495 # Is the header compilable?
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012496echo "$as_me:$LINENO: checking cthreads.h usability" >&5
12497echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012498cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012499/* confdefs.h. */
12500_ACEOF
12501cat confdefs.h >>conftest.$ac_ext
12502cat >>conftest.$ac_ext <<_ACEOF
12503/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012504$ac_includes_default
12505#include <cthreads.h>
12506_ACEOF
12507rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012508if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12509 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012511 grep -v '^ *+' conftest.er1 >conftest.err
12512 rm -f conftest.er1
12513 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012515 (exit $ac_status); } &&
12516 { ac_try='test -z "$ac_c_werror_flag"
12517 || test ! -s conftest.err'
12518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12519 (eval $ac_try) 2>&5
12520 ac_status=$?
12521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12522 (exit $ac_status); }; } &&
12523 { ac_try='test -s conftest.$ac_objext'
12524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12525 (eval $ac_try) 2>&5
12526 ac_status=$?
12527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12528 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012529 ac_header_compiler=yes
12530else
12531 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012532sed 's/^/| /' conftest.$ac_ext >&5
12533
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012534ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012535fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012536rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12537echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12538echo "${ECHO_T}$ac_header_compiler" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012539
12540# Is the header present?
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012541echo "$as_me:$LINENO: checking cthreads.h presence" >&5
12542echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012543cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012544/* confdefs.h. */
12545_ACEOF
12546cat confdefs.h >>conftest.$ac_ext
12547cat >>conftest.$ac_ext <<_ACEOF
12548/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012549#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012550_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012551if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12552 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012553 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012554 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012555 rm -f conftest.er1
12556 cat conftest.err >&5
12557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012558 (exit $ac_status); } >/dev/null; then
12559 if test -s conftest.err; then
12560 ac_cpp_err=$ac_c_preproc_warn_flag
12561 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12562 else
12563 ac_cpp_err=
12564 fi
12565else
12566 ac_cpp_err=yes
12567fi
12568if test -z "$ac_cpp_err"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012569 ac_header_preproc=yes
12570else
12571 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012572sed 's/^/| /' conftest.$ac_ext >&5
12573
Martin v. Löwis11437992002-04-12 09:54:03 +000012574 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012575fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012576rm -f conftest.err conftest.$ac_ext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012577echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12578echo "${ECHO_T}$ac_header_preproc" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012579
12580# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012581case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12582 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012583 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
12584echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012585 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
12586echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
12587 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012588 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012589 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012590 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
12591echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012592 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
12593echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
12594 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
12595echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
12596 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
12597echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012598 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
12599echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012600 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
12601echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012602 (
12603 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012604## ------------------------------------------------ ##
12605## Report this to http://www.python.org/python-bugs ##
12606## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012607_ASBOX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012608 ) |
12609 sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000012610 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012611esac
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012612echo "$as_me:$LINENO: checking for cthreads.h" >&5
12613echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012614if test "${ac_cv_header_cthreads_h+set}" = set; then
12615 echo $ECHO_N "(cached) $ECHO_C" >&6
12616else
12617 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012618fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012619echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
12620echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012621
12622fi
12623if test $ac_cv_header_cthreads_h = yes; then
12624 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012625#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012626_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012627
Martin v. Löwis11437992002-04-12 09:54:03 +000012628 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012629#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012630_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012631
Martin v. Löwis11437992002-04-12 09:54:03 +000012632
12633cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012634#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012635_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012636
12637 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012638 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012639else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012640
Martin v. Löwis11437992002-04-12 09:54:03 +000012641 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012642 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
12643echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012644if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
12645 echo $ECHO_N "(cached) $ECHO_C" >&6
12646fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012647echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
12648echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012649else
Martin v. Löwis11437992002-04-12 09:54:03 +000012650 # Is the header compilable?
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012651echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
12652echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012653cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012654/* confdefs.h. */
12655_ACEOF
12656cat confdefs.h >>conftest.$ac_ext
12657cat >>conftest.$ac_ext <<_ACEOF
12658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012659$ac_includes_default
12660#include <mach/cthreads.h>
12661_ACEOF
12662rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12664 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012665 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012666 grep -v '^ *+' conftest.er1 >conftest.err
12667 rm -f conftest.er1
12668 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012670 (exit $ac_status); } &&
12671 { ac_try='test -z "$ac_c_werror_flag"
12672 || test ! -s conftest.err'
12673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12674 (eval $ac_try) 2>&5
12675 ac_status=$?
12676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12677 (exit $ac_status); }; } &&
12678 { ac_try='test -s conftest.$ac_objext'
12679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12680 (eval $ac_try) 2>&5
12681 ac_status=$?
12682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12683 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012684 ac_header_compiler=yes
12685else
12686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012687sed 's/^/| /' conftest.$ac_ext >&5
12688
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012689ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012690fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012691rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12692echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12693echo "${ECHO_T}$ac_header_compiler" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012694
12695# Is the header present?
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012696echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
12697echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012698cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012699/* confdefs.h. */
12700_ACEOF
12701cat confdefs.h >>conftest.$ac_ext
12702cat >>conftest.$ac_ext <<_ACEOF
12703/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012704#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012705_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012706if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12707 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012708 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012709 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012710 rm -f conftest.er1
12711 cat conftest.err >&5
12712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012713 (exit $ac_status); } >/dev/null; then
12714 if test -s conftest.err; then
12715 ac_cpp_err=$ac_c_preproc_warn_flag
12716 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12717 else
12718 ac_cpp_err=
12719 fi
12720else
12721 ac_cpp_err=yes
12722fi
12723if test -z "$ac_cpp_err"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012724 ac_header_preproc=yes
12725else
12726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012727sed 's/^/| /' conftest.$ac_ext >&5
12728
Martin v. Löwis11437992002-04-12 09:54:03 +000012729 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012730fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012731rm -f conftest.err conftest.$ac_ext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012732echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12733echo "${ECHO_T}$ac_header_preproc" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012734
12735# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012736case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12737 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012738 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
12739echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012740 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
12741echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
12742 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012743 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012744 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012745 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
12746echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012747 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
12748echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
12749 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
12750echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
12751 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
12752echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012753 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
12754echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012755 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
12756echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012757 (
12758 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012759## ------------------------------------------------ ##
12760## Report this to http://www.python.org/python-bugs ##
12761## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012762_ASBOX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012763 ) |
12764 sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000012765 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012766esac
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012767echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
12768echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012769if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
12770 echo $ECHO_N "(cached) $ECHO_C" >&6
12771else
12772 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012773fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012774echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
12775echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012776
12777fi
12778if test $ac_cv_header_mach_cthreads_h = yes; then
12779 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012780#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012781_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012782
Martin v. Löwis11437992002-04-12 09:54:03 +000012783 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012784#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012785_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012786
Martin v. Löwis11437992002-04-12 09:54:03 +000012787
12788cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012789#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012790_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012791
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012792 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012793else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012794
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012795 echo "$as_me:$LINENO: checking for --with-pth" >&5
12796echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012797
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012798# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012799if test "${with_pth+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012800 withval="$with_pth"
12801 echo "$as_me:$LINENO: result: $withval" >&5
12802echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012803 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000012804#define WITH_THREAD 1
12805_ACEOF
12806
12807
12808cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012809#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012810_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012811
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012812 LIBS="-lpth $LIBS"
12813 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012814else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012815 echo "$as_me:$LINENO: result: no" >&5
12816echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012817
12818 # Just looking for pthread_create in libpthread is not enough:
12819 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
12820 # So we really have to include pthread.h, and then link.
12821 _libs=$LIBS
12822 LIBS="$LIBS -lpthread"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012823 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
12824echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012825 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012826/* confdefs.h. */
12827_ACEOF
12828cat confdefs.h >>conftest.$ac_ext
12829cat >>conftest.$ac_ext <<_ACEOF
12830/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012831#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000012832
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012833void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000012834int
12835main ()
12836{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012837
12838pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000012839 ;
12840 return 0;
12841}
12842_ACEOF
12843rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012844if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12845 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012847 grep -v '^ *+' conftest.er1 >conftest.err
12848 rm -f conftest.er1
12849 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012851 (exit $ac_status); } &&
12852 { ac_try='test -z "$ac_c_werror_flag"
12853 || test ! -s conftest.err'
12854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12855 (eval $ac_try) 2>&5
12856 ac_status=$?
12857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12858 (exit $ac_status); }; } &&
12859 { ac_try='test -s conftest$ac_exeext'
12860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12861 (eval $ac_try) 2>&5
12862 ac_status=$?
12863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12864 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012865
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012866 echo "$as_me:$LINENO: result: yes" >&5
12867echo "${ECHO_T}yes" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012868 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000012869#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012870_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000012871
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012872 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012873 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000012874else
Martin v. Löwis11437992002-04-12 09:54:03 +000012875 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012876sed 's/^/| /' conftest.$ac_ext >&5
12877
Martin v. Löwis11437992002-04-12 09:54:03 +000012878
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012879 LIBS=$_libs
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012880 echo "$as_me:$LINENO: checking for pthread_detach" >&5
12881echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012882if test "${ac_cv_func_pthread_detach+set}" = set; then
12883 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000012884else
Martin v. Löwis11437992002-04-12 09:54:03 +000012885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012886/* confdefs.h. */
12887_ACEOF
12888cat confdefs.h >>conftest.$ac_ext
12889cat >>conftest.$ac_ext <<_ACEOF
12890/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012891/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
12892 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12893#define pthread_detach innocuous_pthread_detach
12894
Guido van Rossumad678af1998-10-02 14:42:15 +000012895/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012896 which can conflict with char pthread_detach (); below.
12897 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012898 <limits.h> exists even on freestanding compilers. */
12899
12900#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000012901# include <limits.h>
12902#else
12903# include <assert.h>
12904#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012905
12906#undef pthread_detach
12907
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012908/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012909#ifdef __cplusplus
12910extern "C"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012911{
Martin v. Löwis11437992002-04-12 09:54:03 +000012912#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012913/* We use char because int might match the return type of a gcc2
12914 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012915char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000012916/* The GNU C library defines this for functions which it implements
12917 to always fail with ENOSYS. Some functions are actually named
12918 something starting with __ and the normal name is an alias. */
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012919#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000012920choke me
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012921#else
12922char (*f) () = pthread_detach;
12923#endif
12924#ifdef __cplusplus
12925}
Guido van Rossumad678af1998-10-02 14:42:15 +000012926#endif
12927
Skip Montanaro6dead952003-09-25 14:50:04 +000012928int
12929main ()
12930{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012931return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000012932 ;
12933 return 0;
12934}
12935_ACEOF
12936rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012937if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12938 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012939 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012940 grep -v '^ *+' conftest.er1 >conftest.err
12941 rm -f conftest.er1
12942 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012944 (exit $ac_status); } &&
12945 { ac_try='test -z "$ac_c_werror_flag"
12946 || test ! -s conftest.err'
12947 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12948 (eval $ac_try) 2>&5
12949 ac_status=$?
12950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12951 (exit $ac_status); }; } &&
12952 { ac_try='test -s conftest$ac_exeext'
12953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12954 (eval $ac_try) 2>&5
12955 ac_status=$?
12956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12957 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012958 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000012959else
Martin v. Löwis11437992002-04-12 09:54:03 +000012960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012961sed 's/^/| /' conftest.$ac_ext >&5
12962
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012963ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000012964fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012965rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012966 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000012967fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012968echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
12969echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012970if test $ac_cv_func_pthread_detach = yes; then
12971 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000012972#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012973_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000012974
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012975 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012976 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000012977else
Guido van Rossumad678af1998-10-02 14:42:15 +000012978
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012979 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012980 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
12981echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012982if test "${ac_cv_header_atheos_threads_h+set}" = set; then
12983 echo $ECHO_N "(cached) $ECHO_C" >&6
12984fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012985echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
12986echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012987else
12988 # Is the header compilable?
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000012989echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
12990echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012991cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012992/* confdefs.h. */
12993_ACEOF
12994cat confdefs.h >>conftest.$ac_ext
12995cat >>conftest.$ac_ext <<_ACEOF
12996/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012997$ac_includes_default
12998#include <atheos/threads.h>
12999_ACEOF
13000rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013001if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13002 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013003 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013004 grep -v '^ *+' conftest.er1 >conftest.err
13005 rm -f conftest.er1
13006 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013008 (exit $ac_status); } &&
13009 { ac_try='test -z "$ac_c_werror_flag"
13010 || test ! -s conftest.err'
13011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13012 (eval $ac_try) 2>&5
13013 ac_status=$?
13014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13015 (exit $ac_status); }; } &&
13016 { ac_try='test -s conftest.$ac_objext'
13017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13018 (eval $ac_try) 2>&5
13019 ac_status=$?
13020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13021 (exit $ac_status); }; }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013022 ac_header_compiler=yes
13023else
13024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013025sed 's/^/| /' conftest.$ac_ext >&5
13026
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013027ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013028fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013029rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13030echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13031echo "${ECHO_T}$ac_header_compiler" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013032
13033# Is the header present?
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013034echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
13035echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013036cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013037/* confdefs.h. */
13038_ACEOF
13039cat confdefs.h >>conftest.$ac_ext
13040cat >>conftest.$ac_ext <<_ACEOF
13041/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013042#include <atheos/threads.h>
13043_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013044if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13045 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013046 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013047 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013048 rm -f conftest.er1
13049 cat conftest.err >&5
13050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013051 (exit $ac_status); } >/dev/null; then
13052 if test -s conftest.err; then
13053 ac_cpp_err=$ac_c_preproc_warn_flag
13054 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13055 else
13056 ac_cpp_err=
13057 fi
13058else
13059 ac_cpp_err=yes
13060fi
13061if test -z "$ac_cpp_err"; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013062 ac_header_preproc=yes
13063else
13064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013065sed 's/^/| /' conftest.$ac_ext >&5
13066
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013067 ac_header_preproc=no
13068fi
13069rm -f conftest.err conftest.$ac_ext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013070echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13071echo "${ECHO_T}$ac_header_preproc" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013072
13073# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013074case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13075 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013076 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13077echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013078 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
13079echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
13080 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013081 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013082 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013083 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
13084echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013085 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
13086echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
13087 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
13088echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
13089 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
13090echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013091 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
13092echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013093 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
13094echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013095 (
13096 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013097## ------------------------------------------------ ##
13098## Report this to http://www.python.org/python-bugs ##
13099## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013100_ASBOX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013101 ) |
13102 sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013103 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013104esac
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013105echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13106echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013107if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13108 echo $ECHO_N "(cached) $ECHO_C" >&6
13109else
13110 ac_cv_header_atheos_threads_h=$ac_header_preproc
13111fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013112echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13113echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013114
13115fi
13116if test $ac_cv_header_atheos_threads_h = yes; then
13117 cat >>confdefs.h <<\_ACEOF
13118#define WITH_THREAD 1
13119_ACEOF
13120
13121
13122cat >>confdefs.h <<\_ACEOF
13123#define ATHEOS_THREADS 1
13124_ACEOF
13125
13126 THREADOBJ="Python/thread.o"
13127else
13128
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013129 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
13130echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013131if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
13132 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013133else
Martin v. Löwis11437992002-04-12 09:54:03 +000013134 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013135LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013136cat >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öwis11437992002-04-12 09:54:03 +000013142
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013143/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013144#ifdef __cplusplus
13145extern "C"
13146#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013147/* We use char because int might match the return type of a gcc2
13148 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013149char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013150int
13151main ()
13152{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013153pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013154 ;
13155 return 0;
13156}
13157_ACEOF
13158rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013159if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13160 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013162 grep -v '^ *+' conftest.er1 >conftest.err
13163 rm -f conftest.er1
13164 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013166 (exit $ac_status); } &&
13167 { ac_try='test -z "$ac_c_werror_flag"
13168 || test ! -s conftest.err'
13169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13170 (eval $ac_try) 2>&5
13171 ac_status=$?
13172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13173 (exit $ac_status); }; } &&
13174 { ac_try='test -s conftest$ac_exeext'
13175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13176 (eval $ac_try) 2>&5
13177 ac_status=$?
13178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13179 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013180 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000013181else
Martin v. Löwis11437992002-04-12 09:54:03 +000013182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013183sed 's/^/| /' conftest.$ac_ext >&5
13184
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013185ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000013186fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013187rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013188 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013189LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000013190fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013191echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
13192echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013193if test $ac_cv_lib_pthreads_pthread_create = yes; then
13194 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000013195#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013196_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000013197
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013198 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000013199 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013200 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000013201else
Greg Steinadf63d62000-07-05 10:38:09 +000013202
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013203 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
13204echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013205if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
13206 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000013207else
Martin v. Löwis11437992002-04-12 09:54:03 +000013208 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000013209LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013210cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013211/* confdefs.h. */
13212_ACEOF
13213cat confdefs.h >>conftest.$ac_ext
13214cat >>conftest.$ac_ext <<_ACEOF
13215/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013216
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013217/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013218#ifdef __cplusplus
13219extern "C"
13220#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013221/* We use char because int might match the return type of a gcc2
13222 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013223char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013224int
13225main ()
13226{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013227pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013228 ;
13229 return 0;
13230}
13231_ACEOF
13232rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013233if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13234 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013236 grep -v '^ *+' conftest.er1 >conftest.err
13237 rm -f conftest.er1
13238 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013240 (exit $ac_status); } &&
13241 { ac_try='test -z "$ac_c_werror_flag"
13242 || test ! -s conftest.err'
13243 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13244 (eval $ac_try) 2>&5
13245 ac_status=$?
13246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13247 (exit $ac_status); }; } &&
13248 { ac_try='test -s conftest$ac_exeext'
13249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13250 (eval $ac_try) 2>&5
13251 ac_status=$?
13252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13253 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013254 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000013255else
Martin v. Löwis11437992002-04-12 09:54:03 +000013256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013257sed 's/^/| /' conftest.$ac_ext >&5
13258
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013259ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000013260fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013261rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013262 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013263LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000013264fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013265echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
13266echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013267if test $ac_cv_lib_c_r_pthread_create = yes; then
13268 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000013269#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013270_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000013271
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013272 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000013273 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013274 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000013275else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000013276
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013277 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
13278echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013279if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
13280 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013281else
Martin v. Löwis11437992002-04-12 09:54:03 +000013282 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013283LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013284cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013285/* confdefs.h. */
13286_ACEOF
13287cat confdefs.h >>conftest.$ac_ext
13288cat >>conftest.$ac_ext <<_ACEOF
13289/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013290
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013291/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013292#ifdef __cplusplus
13293extern "C"
13294#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013295/* We use char because int might match the return type of a gcc2
13296 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013297char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013298int
13299main ()
13300{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013301__pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013302 ;
13303 return 0;
13304}
13305_ACEOF
13306rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013307if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13308 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013309 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013310 grep -v '^ *+' conftest.er1 >conftest.err
13311 rm -f conftest.er1
13312 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013314 (exit $ac_status); } &&
13315 { ac_try='test -z "$ac_c_werror_flag"
13316 || test ! -s conftest.err'
13317 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13318 (eval $ac_try) 2>&5
13319 ac_status=$?
13320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13321 (exit $ac_status); }; } &&
13322 { ac_try='test -s conftest$ac_exeext'
13323 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13324 (eval $ac_try) 2>&5
13325 ac_status=$?
13326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13327 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013328 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013329else
Martin v. Löwis11437992002-04-12 09:54:03 +000013330 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013331sed 's/^/| /' conftest.$ac_ext >&5
13332
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013333ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013334fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013335rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013336 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013337LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013338fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013339echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
13340echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013341if test $ac_cv_lib_pthread___pthread_create_system = yes; then
13342 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013343#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013344_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013345
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013346 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000013347 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013348 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013349else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013350
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013351 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
13352echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013353if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
13354 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000013355else
Martin v. Löwis11437992002-04-12 09:54:03 +000013356 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000013357LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013358cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013359/* confdefs.h. */
13360_ACEOF
13361cat confdefs.h >>conftest.$ac_ext
13362cat >>conftest.$ac_ext <<_ACEOF
13363/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013364
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013365/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013366#ifdef __cplusplus
13367extern "C"
13368#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013369/* We use char because int might match the return type of a gcc2
13370 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013371char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013372int
13373main ()
13374{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013375pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013376 ;
13377 return 0;
13378}
13379_ACEOF
13380rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013381if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13382 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013384 grep -v '^ *+' conftest.er1 >conftest.err
13385 rm -f conftest.er1
13386 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013388 (exit $ac_status); } &&
13389 { ac_try='test -z "$ac_c_werror_flag"
13390 || test ! -s conftest.err'
13391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13392 (eval $ac_try) 2>&5
13393 ac_status=$?
13394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13395 (exit $ac_status); }; } &&
13396 { ac_try='test -s conftest$ac_exeext'
13397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13398 (eval $ac_try) 2>&5
13399 ac_status=$?
13400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13401 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013402 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000013403else
Martin v. Löwis11437992002-04-12 09:54:03 +000013404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013405sed 's/^/| /' conftest.$ac_ext >&5
13406
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013407ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000013408fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013409rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013410 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013411LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000013412fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013413echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
13414echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013415if test $ac_cv_lib_cma_pthread_create = yes; then
13416 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000013417#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013418_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000013419
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013420 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000013421 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013422 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000013423else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000013424
Martin v. Löwis130fb172001-07-19 11:00:41 +000013425 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000013426fi
13427
Guido van Rossum627b2d71993-12-24 10:39:16 +000013428
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013429fi
13430
Guido van Rossum0be3e491997-05-22 20:33:33 +000013431fi
13432
Guido van Rossum49545951997-12-02 19:28:29 +000013433fi
13434
Guido van Rossumb93a8621998-05-07 13:27:32 +000013435fi
13436
Guido van Rossum07bd90e2000-05-08 13:41:38 +000013437
Michael W. Hudson54241132001-12-07 15:38:26 +000013438fi
13439
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013440fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013441rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013442 conftest$ac_exeext conftest.$ac_ext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013443fi;
Martin v. Löwis11437992002-04-12 09:54:03 +000013444fi
13445
13446
13447fi
13448
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013449
Michael W. Hudson54241132001-12-07 15:38:26 +000013450
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013451 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
13452echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013453if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
13454 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013455else
Martin v. Löwis11437992002-04-12 09:54:03 +000013456 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013457LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013458cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013459/* confdefs.h. */
13460_ACEOF
13461cat confdefs.h >>conftest.$ac_ext
13462cat >>conftest.$ac_ext <<_ACEOF
13463/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013464
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013465/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013466#ifdef __cplusplus
13467extern "C"
13468#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013469/* We use char because int might match the return type of a gcc2
13470 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013471char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013472int
13473main ()
13474{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013475usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013476 ;
13477 return 0;
13478}
13479_ACEOF
13480rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013481if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13482 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013483 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013484 grep -v '^ *+' conftest.er1 >conftest.err
13485 rm -f conftest.er1
13486 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013488 (exit $ac_status); } &&
13489 { ac_try='test -z "$ac_c_werror_flag"
13490 || test ! -s conftest.err'
13491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13492 (eval $ac_try) 2>&5
13493 ac_status=$?
13494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13495 (exit $ac_status); }; } &&
13496 { ac_try='test -s conftest$ac_exeext'
13497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13498 (eval $ac_try) 2>&5
13499 ac_status=$?
13500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13501 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013502 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013503else
Martin v. Löwis11437992002-04-12 09:54:03 +000013504 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013505sed 's/^/| /' conftest.$ac_ext >&5
13506
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013507ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013508fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013509rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013510 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013511LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013512fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013513echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
13514echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013515if test $ac_cv_lib_mpc_usconfig = yes; then
13516 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013517#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013518_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013519
Martin v. Löwis130fb172001-07-19 11:00:41 +000013520 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013521 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013522 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000013523fi
13524
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013525
Neal Norwitza978ab02002-11-02 16:58:05 +000013526 if test "$posix_threads" != "yes"; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013527 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
13528echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013529if test "${ac_cv_lib_thread_thr_create+set}" = set; then
13530 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013531else
Martin v. Löwis11437992002-04-12 09:54:03 +000013532 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013533LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013534cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013535/* confdefs.h. */
13536_ACEOF
13537cat confdefs.h >>conftest.$ac_ext
13538cat >>conftest.$ac_ext <<_ACEOF
13539/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013540
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013541/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013542#ifdef __cplusplus
13543extern "C"
13544#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013545/* We use char because int might match the return type of a gcc2
13546 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013547char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013548int
13549main ()
13550{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013551thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013552 ;
13553 return 0;
13554}
13555_ACEOF
13556rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013557if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13558 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013559 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013560 grep -v '^ *+' conftest.er1 >conftest.err
13561 rm -f conftest.er1
13562 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013564 (exit $ac_status); } &&
13565 { ac_try='test -z "$ac_c_werror_flag"
13566 || test ! -s conftest.err'
13567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13568 (eval $ac_try) 2>&5
13569 ac_status=$?
13570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13571 (exit $ac_status); }; } &&
13572 { ac_try='test -s conftest$ac_exeext'
13573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13574 (eval $ac_try) 2>&5
13575 ac_status=$?
13576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13577 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013578 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013579else
Martin v. Löwis11437992002-04-12 09:54:03 +000013580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013581sed 's/^/| /' conftest.$ac_ext >&5
13582
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013583ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013584fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013585rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013586 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013587LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013588fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013589echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
13590echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013591if test $ac_cv_lib_thread_thr_create = yes; then
13592 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013593#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013594_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013595
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013596 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013597 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013598 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000013599fi
13600
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013601 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000013602
Martin v. Löwis130fb172001-07-19 11:00:41 +000013603 if test "$USE_THREAD_MODULE" != "#"
13604 then
13605 # If the above checks didn't disable threads, (at least) OSF1
13606 # needs this '-threads' argument during linking.
13607 case $ac_sys_system in
13608 OSF1) LDLAST=-threads;;
13609 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000013610 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013611fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013612
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013613if test "$posix_threads" = "yes"; then
13614 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013615
13616cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013617#define _POSIX_THREADS 1
13618_ACEOF
13619
13620 fi
13621
13622 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
13623 case $ac_sys_system/$ac_sys_release in
13624 SunOS/5.6)
13625cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013626#define HAVE_PTHREAD_DESTRUCTOR 1
13627_ACEOF
13628
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013629 ;;
13630 SunOS/5.8)
13631cat >>confdefs.h <<\_ACEOF
13632#define HAVE_BROKEN_POSIX_SEMAPHORES 1
13633_ACEOF
13634
13635 ;;
13636 esac
13637
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013638 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
13639echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013640 if test "${ac_cv_pthread_system_supported+set}" = set; then
13641 echo $ECHO_N "(cached) $ECHO_C" >&6
13642else
13643 if test "$cross_compiling" = yes; then
13644 ac_cv_pthread_system_supported=no
13645else
13646 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013647/* confdefs.h. */
13648_ACEOF
13649cat confdefs.h >>conftest.$ac_ext
13650cat >>conftest.$ac_ext <<_ACEOF
13651/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013652#include <pthread.h>
13653 void *foo(void *parm) {
13654 return NULL;
13655 }
13656 main() {
13657 pthread_attr_t attr;
13658 pthread_t id;
13659 if (pthread_attr_init(&attr)) exit(-1);
13660 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
13661 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
13662 exit(0);
13663 }
13664_ACEOF
13665rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013666if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13667 (eval $ac_link) 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013668 ac_status=$?
13669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13670 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13672 (eval $ac_try) 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013673 ac_status=$?
13674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13675 (exit $ac_status); }; }; then
13676 ac_cv_pthread_system_supported=yes
13677else
13678 echo "$as_me: program exited with status $ac_status" >&5
13679echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013680sed 's/^/| /' conftest.$ac_ext >&5
13681
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013682( exit $ac_status )
13683ac_cv_pthread_system_supported=no
13684fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013685rm -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 +000013686fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013687
Guido van Rossum627b2d71993-12-24 10:39:16 +000013688fi
13689
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013690 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
13691echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013692 if test "$ac_cv_pthread_system_supported" = "yes"; then
13693
13694cat >>confdefs.h <<\_ACEOF
13695#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
13696_ACEOF
13697
13698 fi
13699
13700for ac_func in pthread_sigmask
13701do
13702as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013703echo "$as_me:$LINENO: checking for $ac_func" >&5
13704echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13705if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013706 echo $ECHO_N "(cached) $ECHO_C" >&6
13707else
13708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013709/* confdefs.h. */
13710_ACEOF
13711cat confdefs.h >>conftest.$ac_ext
13712cat >>conftest.$ac_ext <<_ACEOF
13713/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013714/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13715 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13716#define $ac_func innocuous_$ac_func
13717
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013718/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013719 which can conflict with char $ac_func (); below.
13720 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013721 <limits.h> exists even on freestanding compilers. */
13722
13723#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013724# include <limits.h>
13725#else
13726# include <assert.h>
13727#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013728
13729#undef $ac_func
13730
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013731/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013732#ifdef __cplusplus
13733extern "C"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013734{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013735#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013736/* We use char because int might match the return type of a gcc2
13737 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013738char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013739/* The GNU C library defines this for functions which it implements
13740 to always fail with ENOSYS. Some functions are actually named
13741 something starting with __ and the normal name is an alias. */
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013742#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013743choke me
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013744#else
13745char (*f) () = $ac_func;
13746#endif
13747#ifdef __cplusplus
13748}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013749#endif
13750
Skip Montanaro6dead952003-09-25 14:50:04 +000013751int
13752main ()
13753{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013754return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013755 ;
13756 return 0;
13757}
13758_ACEOF
13759rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013760if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13761 (eval $ac_link) 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013763 grep -v '^ *+' conftest.er1 >conftest.err
13764 rm -f conftest.er1
13765 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013767 (exit $ac_status); } &&
13768 { ac_try='test -z "$ac_c_werror_flag"
13769 || test ! -s conftest.err'
13770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13771 (eval $ac_try) 2>&5
13772 ac_status=$?
13773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13774 (exit $ac_status); }; } &&
13775 { ac_try='test -s conftest$ac_exeext'
13776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13777 (eval $ac_try) 2>&5
13778 ac_status=$?
13779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13780 (exit $ac_status); }; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013781 eval "$as_ac_var=yes"
13782else
13783 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013784sed 's/^/| /' conftest.$ac_ext >&5
13785
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013786eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013787fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013788rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013789 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013790fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013791echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13792echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013793if test `eval echo '${'$as_ac_var'}'` = yes; then
13794 cat >>confdefs.h <<_ACEOF
13795#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13796_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000013797 case $ac_sys_system in
13798 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013799
Jason Tishlerfac083d2003-07-22 15:20:49 +000013800cat >>confdefs.h <<\_ACEOF
13801#define HAVE_BROKEN_PTHREAD_SIGMASK 1
13802_ACEOF
13803
13804 ;;
13805 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013806fi
13807done
13808
13809fi
13810
13811
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013812# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000013813
13814
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013815echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
13816echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
13817# Check whether --enable-ipv6 or --disable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013818if test "${enable_ipv6+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013819 enableval="$enable_ipv6"
13820 case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013821 no)
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013822 echo "$as_me:$LINENO: result: no" >&5
13823echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013824 ipv6=no
13825 ;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013826 *) echo "$as_me:$LINENO: result: yes" >&5
13827echo "${ECHO_T}yes" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013828 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013829#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013830_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013831
13832 ipv6=yes
13833 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013835else
Martin v. Löwis11437992002-04-12 09:54:03 +000013836
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013837 if test "$cross_compiling" = yes; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013838 echo "$as_me:$LINENO: result: no" >&5
13839echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013840 ipv6=no
13841
13842else
Martin v. Löwis11437992002-04-12 09:54:03 +000013843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013844/* confdefs.h. */
13845_ACEOF
13846cat confdefs.h >>conftest.$ac_ext
13847cat >>conftest.$ac_ext <<_ACEOF
13848/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013849 /* AF_INET6 available check */
13850#include <sys/types.h>
13851#include <sys/socket.h>
13852main()
13853{
13854 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
13855 exit(1);
13856 else
13857 exit(0);
13858}
13859
Martin v. Löwis11437992002-04-12 09:54:03 +000013860_ACEOF
13861rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013862if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13863 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013864 ac_status=$?
13865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13866 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013867 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13868 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013869 ac_status=$?
13870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13871 (exit $ac_status); }; }; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013872 echo "$as_me:$LINENO: result: yes" >&5
13873echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013874 ipv6=yes
13875else
Martin v. Löwis11437992002-04-12 09:54:03 +000013876 echo "$as_me: program exited with status $ac_status" >&5
13877echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013878sed 's/^/| /' conftest.$ac_ext >&5
13879
Martin v. Löwis11437992002-04-12 09:54:03 +000013880( exit $ac_status )
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013881echo "$as_me:$LINENO: result: no" >&5
13882echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013883 ipv6=no
13884fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013885rm -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 +000013886fi
13887
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013888if test "$ipv6" = "yes"; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013889 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
13890echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013891 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013892/* confdefs.h. */
13893_ACEOF
13894cat confdefs.h >>conftest.$ac_ext
13895cat >>conftest.$ac_ext <<_ACEOF
13896/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013897#include <sys/types.h>
13898#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013899int
13900main ()
13901{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013902struct sockaddr_in6 x;
13903x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000013904 ;
13905 return 0;
13906}
13907_ACEOF
13908rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013909if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13910 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013912 grep -v '^ *+' conftest.er1 >conftest.err
13913 rm -f conftest.er1
13914 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013916 (exit $ac_status); } &&
13917 { ac_try='test -z "$ac_c_werror_flag"
13918 || test ! -s conftest.err'
13919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13920 (eval $ac_try) 2>&5
13921 ac_status=$?
13922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13923 (exit $ac_status); }; } &&
13924 { ac_try='test -s conftest.$ac_objext'
13925 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13926 (eval $ac_try) 2>&5
13927 ac_status=$?
13928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13929 (exit $ac_status); }; }; then
13930 echo "$as_me:$LINENO: result: yes" >&5
13931echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013932 ipv6=yes
13933else
Martin v. Löwis11437992002-04-12 09:54:03 +000013934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013935sed 's/^/| /' conftest.$ac_ext >&5
13936
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013937echo "$as_me:$LINENO: result: no" >&5
13938echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013939 ipv6=no
13940fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013941rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013942fi
13943
13944if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013945 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013946#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013947_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000013948
13949fi
13950
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013951fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013952
13953ipv6type=unknown
13954ipv6lib=none
13955ipv6trylibc=no
13956
13957if test "$ipv6" = "yes"; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013958 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
13959echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000013960 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
13961 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013962 case $i in
13963 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000013964 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013965/* confdefs.h. */
13966_ACEOF
13967cat confdefs.h >>conftest.$ac_ext
13968cat >>conftest.$ac_ext <<_ACEOF
13969/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013970
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013971#include <netinet/in.h>
13972#ifdef IPV6_INRIA_VERSION
13973yes
13974#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013975_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013976if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013977 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013978 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013979fi
13980rm -f conftest*
13981
13982 ;;
13983 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000013984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013985/* confdefs.h. */
13986_ACEOF
13987cat confdefs.h >>conftest.$ac_ext
13988cat >>conftest.$ac_ext <<_ACEOF
13989/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013990
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013991#include <netinet/in.h>
13992#ifdef __KAME__
13993yes
13994#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013995_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013996if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013997 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013998 ipv6type=$i;
13999 ipv6lib=inet6
14000 ipv6libdir=/usr/local/v6/lib
14001 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014002fi
14003rm -f conftest*
14004
14005 ;;
14006 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000014007 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014008/* confdefs.h. */
14009_ACEOF
14010cat confdefs.h >>conftest.$ac_ext
14011cat >>conftest.$ac_ext <<_ACEOF
14012/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014013
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014014#include <features.h>
14015#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
14016yes
14017#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014018_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014019if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014020 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014021 ipv6type=$i;
14022 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014023fi
14024rm -f conftest*
14025
14026 ;;
14027 linux-inet6)
14028 if test -d /usr/inet6; then
14029 ipv6type=$i
14030 ipv6lib=inet6
14031 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000014032 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014033 fi
14034 ;;
14035 solaris)
14036 if test -f /etc/netconfig; then
14037 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
14038 ipv6type=$i
14039 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014040 fi
14041 fi
14042 ;;
14043 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000014044 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014045/* confdefs.h. */
14046_ACEOF
14047cat confdefs.h >>conftest.$ac_ext
14048cat >>conftest.$ac_ext <<_ACEOF
14049/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014050
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014051#include <sys/param.h>
14052#ifdef _TOSHIBA_INET6
14053yes
14054#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014055_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014056if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014057 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014058 ipv6type=$i;
14059 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000014060 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014061fi
14062rm -f conftest*
14063
14064 ;;
14065 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000014066 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014067/* confdefs.h. */
14068_ACEOF
14069cat confdefs.h >>conftest.$ac_ext
14070cat >>conftest.$ac_ext <<_ACEOF
14071/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014072
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014073#include </usr/local/v6/include/sys/v6config.h>
14074#ifdef __V6D__
14075yes
14076#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014077_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014078if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014079 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014080 ipv6type=$i;
14081 ipv6lib=v6;
14082 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000014083 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014084fi
14085rm -f conftest*
14086
14087 ;;
14088 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000014089 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014090/* confdefs.h. */
14091_ACEOF
14092cat confdefs.h >>conftest.$ac_ext
14093cat >>conftest.$ac_ext <<_ACEOF
14094/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014095
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014096#include <sys/param.h>
14097#ifdef _ZETA_MINAMI_INET6
14098yes
14099#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014100_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014101if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014102 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014103 ipv6type=$i;
14104 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000014105 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014106fi
14107rm -f conftest*
14108
14109 ;;
14110 esac
14111 if test "$ipv6type" != "unknown"; then
14112 break
14113 fi
14114 done
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014115 echo "$as_me:$LINENO: result: $ipv6type" >&5
14116echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014117fi
14118
14119if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
14120 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
14121 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
14122 echo "using lib$ipv6lib"
14123 else
14124 if test $ipv6trylibc = "yes"; then
14125 echo "using libc"
14126 else
14127 echo 'Fatal: no $ipv6lib library found. cannot continue.'
14128 echo "You need to fetch lib$ipv6lib.a from appropriate"
14129 echo 'ipv6 kit and compile beforehand.'
14130 exit 1
14131 fi
14132 fi
14133fi
14134
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014135# Check for --with-doc-strings
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014136echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
14137echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014138
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014139# Check whether --with-doc-strings or --without-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014140if test "${with_doc_strings+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014141 withval="$with_doc_strings"
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014142
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014143fi;
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014144
14145if test -z "$with_doc_strings"
14146then with_doc_strings="yes"
14147fi
14148if test "$with_doc_strings" != "no"
14149then
14150
14151cat >>confdefs.h <<\_ACEOF
14152#define WITH_DOC_STRINGS 1
14153_ACEOF
14154
14155fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014156echo "$as_me:$LINENO: result: $with_doc_strings" >&5
14157echo "${ECHO_T}$with_doc_strings" >&6
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014158
Neil Schemenauera35c6882001-02-27 04:45:05 +000014159# Check for Python-specific malloc support
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014160echo "$as_me:$LINENO: checking for --with-tsc" >&5
14161echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014162
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014163# Check whether --with-tsc or --without-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014164if test "${with_tsc+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014165 withval="$with_tsc"
14166
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014167if test "$withval" != no
14168then
14169
14170cat >>confdefs.h <<\_ACEOF
14171#define WITH_TSC 1
14172_ACEOF
14173
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014174 echo "$as_me:$LINENO: result: yes" >&5
14175echo "${ECHO_T}yes" >&6
14176else echo "$as_me:$LINENO: result: no" >&5
14177echo "${ECHO_T}no" >&6
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014178fi
14179else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014180 echo "$as_me:$LINENO: result: no" >&5
14181echo "${ECHO_T}no" >&6
14182fi;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014183
14184# Check for Python-specific malloc support
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014185echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
14186echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014187
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014188# Check whether --with-pymalloc or --without-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000014189if test "${with_pymalloc+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014190 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000014191
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014192fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000014193
Neil Schemenauer16c22972002-03-22 15:34:49 +000014194if test -z "$with_pymalloc"
14195then with_pymalloc="yes"
14196fi
14197if test "$with_pymalloc" != "no"
14198then
Martin v. Löwis11437992002-04-12 09:54:03 +000014199
14200cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000014201#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014202_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000014203
14204fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014205echo "$as_me:$LINENO: result: $with_pymalloc" >&5
14206echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000014207
Barry Warsawef82cd72000-06-30 16:21:01 +000014208# Check for --with-wctype-functions
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014209echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
14210echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014211
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014212# Check whether --with-wctype-functions or --without-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000014213if test "${with_wctype_functions+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014214 withval="$with_wctype_functions"
14215
Barry Warsawef82cd72000-06-30 16:21:01 +000014216if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014217then
14218
14219cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000014220#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014221_ACEOF
14222
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014223 echo "$as_me:$LINENO: result: yes" >&5
14224echo "${ECHO_T}yes" >&6
14225else echo "$as_me:$LINENO: result: no" >&5
14226echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000014227fi
14228else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014229 echo "$as_me:$LINENO: result: no" >&5
14230echo "${ECHO_T}no" >&6
14231fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000014232
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014233# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000014234
Guido van Rossum98935bf2001-09-05 19:13:16 +000014235DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000014236
Guido van Rossume97ee181999-12-20 21:27:22 +000014237# the dlopen() function means we might want to use dynload_shlib.o. some
14238# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000014239
Thomas Wouters3a584202000-08-05 23:28:51 +000014240for ac_func in dlopen
14241do
Martin v. Löwis11437992002-04-12 09:54:03 +000014242as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014243echo "$as_me:$LINENO: checking for $ac_func" >&5
14244echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14245if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014246 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000014247else
Martin v. Löwis11437992002-04-12 09:54:03 +000014248 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014249/* confdefs.h. */
14250_ACEOF
14251cat confdefs.h >>conftest.$ac_ext
14252cat >>conftest.$ac_ext <<_ACEOF
14253/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014254/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14255 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14256#define $ac_func innocuous_$ac_func
14257
Guido van Rossume97ee181999-12-20 21:27:22 +000014258/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014259 which can conflict with char $ac_func (); below.
14260 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014261 <limits.h> exists even on freestanding compilers. */
14262
14263#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014264# include <limits.h>
14265#else
14266# include <assert.h>
14267#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014268
14269#undef $ac_func
14270
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014271/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014272#ifdef __cplusplus
14273extern "C"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014274{
Martin v. Löwis11437992002-04-12 09:54:03 +000014275#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014276/* We use char because int might match the return type of a gcc2
14277 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014278char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000014279/* The GNU C library defines this for functions which it implements
14280 to always fail with ENOSYS. Some functions are actually named
14281 something starting with __ and the normal name is an alias. */
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014282#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000014283choke me
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014284#else
14285char (*f) () = $ac_func;
14286#endif
14287#ifdef __cplusplus
14288}
Guido van Rossume97ee181999-12-20 21:27:22 +000014289#endif
14290
Skip Montanaro6dead952003-09-25 14:50:04 +000014291int
14292main ()
14293{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014294return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014295 ;
14296 return 0;
14297}
14298_ACEOF
14299rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014300if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14301 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014303 grep -v '^ *+' conftest.er1 >conftest.err
14304 rm -f conftest.er1
14305 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014307 (exit $ac_status); } &&
14308 { ac_try='test -z "$ac_c_werror_flag"
14309 || test ! -s conftest.err'
14310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14311 (eval $ac_try) 2>&5
14312 ac_status=$?
14313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14314 (exit $ac_status); }; } &&
14315 { ac_try='test -s conftest$ac_exeext'
14316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14317 (eval $ac_try) 2>&5
14318 ac_status=$?
14319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14320 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014321 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014322else
Martin v. Löwis11437992002-04-12 09:54:03 +000014323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014324sed 's/^/| /' conftest.$ac_ext >&5
14325
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014326eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014327fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014328rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014329 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014330fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014331echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14332echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014333if test `eval echo '${'$as_ac_var'}'` = yes; then
14334 cat >>confdefs.h <<_ACEOF
14335#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14336_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000014337
Guido van Rossume97ee181999-12-20 21:27:22 +000014338fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014339done
Guido van Rossume97ee181999-12-20 21:27:22 +000014340
Michael W. Hudson54241132001-12-07 15:38:26 +000014341
Guido van Rossume97ee181999-12-20 21:27:22 +000014342# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
14343# loading of modules.
14344
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014345echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
14346echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000014347if test -z "$DYNLOADFILE"
14348then
14349 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000014350 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
14351 if test "$ac_cv_func_dlopen" = yes
14352 then DYNLOADFILE="dynload_shlib.o"
14353 else DYNLOADFILE="dynload_aix.o"
14354 fi
14355 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000014356 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014357 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
14358 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014359 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000014360 *)
14361 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
14362 # out any dynamic loading
14363 if test "$ac_cv_func_dlopen" = yes
14364 then DYNLOADFILE="dynload_shlib.o"
14365 else DYNLOADFILE="dynload_stub.o"
14366 fi
14367 ;;
14368 esac
14369fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014370echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
14371echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000014372if test "$DYNLOADFILE" != "dynload_stub.o"
14373then
Martin v. Löwis11437992002-04-12 09:54:03 +000014374
14375cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000014376#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014377_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000014378
14379fi
14380
Neil Schemenauer4e425612001-06-19 15:44:15 +000014381# MACHDEP_OBJS can be set to platform-specific object files needed by Python
14382
Michael W. Hudson54241132001-12-07 15:38:26 +000014383
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014384echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
14385echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000014386if test -z "$MACHDEP_OBJS"
14387then
Jack Jansene578a632001-08-15 01:27:14 +000014388 MACHDEP_OBJS=$extra_machdep_objs
14389else
14390 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000014391fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014392echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
14393echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000014394
Guido van Rossum627b2d71993-12-24 10:39:16 +000014395# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000014396
14397
14398
14399
14400
14401
14402
14403
14404
14405
14406
14407
14408
14409
14410
14411
14412
14413
14414
14415
14416
14417
14418
14419
14420
14421
14422
14423
14424
14425
14426
14427
14428
14429
14430
14431
14432
14433
14434
14435
14436
14437
14438
14439
14440
14441
14442
14443
14444
14445
14446
14447
14448
14449
14450
14451
14452
14453
14454
14455
14456
14457
14458
14459
14460
14461
14462
14463
14464
14465
14466
Martin v. Löwisd6320502004-08-12 13:45:08 +000014467
Martin v. Löwisc3001752005-01-23 09:27:24 +000014468
14469
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014470
14471
Thomas Wouterscf297e42007-02-23 15:07:44 +000014472
14473
14474for ac_func in alarm bind_textdomain_codeset chflags chown clock confstr \
14475 ctermid execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000014476 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000014477 getpriority getpwent getspnam getspent getsid getwd \
Thomas Wouterscf297e42007-02-23 15:07:44 +000014478 kill killpg lchflags lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000014479 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000014480 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000014481 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000014482 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000014483 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000014484 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014485 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000014486do
Martin v. Löwis11437992002-04-12 09:54:03 +000014487as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014488echo "$as_me:$LINENO: checking for $ac_func" >&5
14489echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14490if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014491 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014492else
Martin v. Löwis11437992002-04-12 09:54:03 +000014493 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014494/* confdefs.h. */
14495_ACEOF
14496cat confdefs.h >>conftest.$ac_ext
14497cat >>conftest.$ac_ext <<_ACEOF
14498/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014499/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14500 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14501#define $ac_func innocuous_$ac_func
14502
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014503/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014504 which can conflict with char $ac_func (); below.
14505 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014506 <limits.h> exists even on freestanding compilers. */
14507
14508#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014509# include <limits.h>
14510#else
14511# include <assert.h>
14512#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014513
14514#undef $ac_func
14515
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014516/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014517#ifdef __cplusplus
14518extern "C"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014519{
Martin v. Löwis11437992002-04-12 09:54:03 +000014520#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014521/* We use char because int might match the return type of a gcc2
14522 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014523char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000014524/* The GNU C library defines this for functions which it implements
14525 to always fail with ENOSYS. Some functions are actually named
14526 something starting with __ and the normal name is an alias. */
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014527#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000014528choke me
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014529#else
14530char (*f) () = $ac_func;
14531#endif
14532#ifdef __cplusplus
14533}
Guido van Rossum627b2d71993-12-24 10:39:16 +000014534#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014535
Skip Montanaro6dead952003-09-25 14:50:04 +000014536int
14537main ()
14538{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014539return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014540 ;
14541 return 0;
14542}
14543_ACEOF
14544rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14546 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014548 grep -v '^ *+' conftest.er1 >conftest.err
14549 rm -f conftest.er1
14550 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014552 (exit $ac_status); } &&
14553 { ac_try='test -z "$ac_c_werror_flag"
14554 || test ! -s conftest.err'
14555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14556 (eval $ac_try) 2>&5
14557 ac_status=$?
14558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14559 (exit $ac_status); }; } &&
14560 { ac_try='test -s conftest$ac_exeext'
14561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14562 (eval $ac_try) 2>&5
14563 ac_status=$?
14564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14565 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014566 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014567else
Martin v. Löwis11437992002-04-12 09:54:03 +000014568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014569sed 's/^/| /' conftest.$ac_ext >&5
14570
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014571eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014572fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014573rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014574 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014575fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014576echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14577echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014578if test `eval echo '${'$as_ac_var'}'` = yes; then
14579 cat >>confdefs.h <<_ACEOF
14580#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14581_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014582
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014583fi
14584done
14585
Michael W. Hudson54241132001-12-07 15:38:26 +000014586
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014587# For some functions, having a definition is not sufficient, since
14588# we want to take their address.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014589echo "$as_me:$LINENO: checking for chroot" >&5
14590echo $ECHO_N "checking for chroot... $ECHO_C" >&6
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014591cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014592/* confdefs.h. */
14593_ACEOF
14594cat confdefs.h >>conftest.$ac_ext
14595cat >>conftest.$ac_ext <<_ACEOF
14596/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014597#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014598int
14599main ()
14600{
14601void *x=chroot
14602 ;
14603 return 0;
14604}
14605_ACEOF
14606rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14608 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014609 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014610 grep -v '^ *+' conftest.er1 >conftest.err
14611 rm -f conftest.er1
14612 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014614 (exit $ac_status); } &&
14615 { ac_try='test -z "$ac_c_werror_flag"
14616 || test ! -s conftest.err'
14617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14618 (eval $ac_try) 2>&5
14619 ac_status=$?
14620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14621 (exit $ac_status); }; } &&
14622 { ac_try='test -s conftest.$ac_objext'
14623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14624 (eval $ac_try) 2>&5
14625 ac_status=$?
14626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14627 (exit $ac_status); }; }; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014628
14629cat >>confdefs.h <<\_ACEOF
14630#define HAVE_CHROOT 1
14631_ACEOF
14632
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014633 echo "$as_me:$LINENO: result: yes" >&5
14634echo "${ECHO_T}yes" >&6
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014635else
14636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014637sed 's/^/| /' conftest.$ac_ext >&5
14638
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014639echo "$as_me:$LINENO: result: no" >&5
14640echo "${ECHO_T}no" >&6
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014641
14642fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014643rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14644echo "$as_me:$LINENO: checking for link" >&5
14645echo $ECHO_N "checking for link... $ECHO_C" >&6
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014646cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014647/* confdefs.h. */
14648_ACEOF
14649cat confdefs.h >>conftest.$ac_ext
14650cat >>conftest.$ac_ext <<_ACEOF
14651/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014652#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014653int
14654main ()
14655{
14656void *x=link
14657 ;
14658 return 0;
14659}
14660_ACEOF
14661rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014662if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14663 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014665 grep -v '^ *+' conftest.er1 >conftest.err
14666 rm -f conftest.er1
14667 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014669 (exit $ac_status); } &&
14670 { ac_try='test -z "$ac_c_werror_flag"
14671 || test ! -s conftest.err'
14672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14673 (eval $ac_try) 2>&5
14674 ac_status=$?
14675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14676 (exit $ac_status); }; } &&
14677 { ac_try='test -s conftest.$ac_objext'
14678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14679 (eval $ac_try) 2>&5
14680 ac_status=$?
14681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14682 (exit $ac_status); }; }; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014683
14684cat >>confdefs.h <<\_ACEOF
14685#define HAVE_LINK 1
14686_ACEOF
14687
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014688 echo "$as_me:$LINENO: result: yes" >&5
14689echo "${ECHO_T}yes" >&6
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014690else
14691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014692sed 's/^/| /' conftest.$ac_ext >&5
14693
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014694echo "$as_me:$LINENO: result: no" >&5
14695echo "${ECHO_T}no" >&6
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014696
14697fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014698rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14699echo "$as_me:$LINENO: checking for symlink" >&5
14700echo $ECHO_N "checking for symlink... $ECHO_C" >&6
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014701cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014702/* confdefs.h. */
14703_ACEOF
14704cat confdefs.h >>conftest.$ac_ext
14705cat >>conftest.$ac_ext <<_ACEOF
14706/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014707#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014708int
14709main ()
14710{
14711void *x=symlink
14712 ;
14713 return 0;
14714}
14715_ACEOF
14716rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14718 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014720 grep -v '^ *+' conftest.er1 >conftest.err
14721 rm -f conftest.er1
14722 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014724 (exit $ac_status); } &&
14725 { ac_try='test -z "$ac_c_werror_flag"
14726 || test ! -s conftest.err'
14727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14728 (eval $ac_try) 2>&5
14729 ac_status=$?
14730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14731 (exit $ac_status); }; } &&
14732 { ac_try='test -s conftest.$ac_objext'
14733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14734 (eval $ac_try) 2>&5
14735 ac_status=$?
14736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14737 (exit $ac_status); }; }; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014738
14739cat >>confdefs.h <<\_ACEOF
14740#define HAVE_SYMLINK 1
14741_ACEOF
14742
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014743 echo "$as_me:$LINENO: result: yes" >&5
14744echo "${ECHO_T}yes" >&6
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014745else
14746 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014747sed 's/^/| /' conftest.$ac_ext >&5
14748
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014749echo "$as_me:$LINENO: result: no" >&5
14750echo "${ECHO_T}no" >&6
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014751
14752fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014753rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14754echo "$as_me:$LINENO: checking for fchdir" >&5
14755echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014756cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014757/* confdefs.h. */
14758_ACEOF
14759cat confdefs.h >>conftest.$ac_ext
14760cat >>conftest.$ac_ext <<_ACEOF
14761/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014762#include <unistd.h>
14763int
14764main ()
14765{
14766void *x=fchdir
14767 ;
14768 return 0;
14769}
14770_ACEOF
14771rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14773 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014774 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014775 grep -v '^ *+' conftest.er1 >conftest.err
14776 rm -f conftest.er1
14777 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014779 (exit $ac_status); } &&
14780 { ac_try='test -z "$ac_c_werror_flag"
14781 || test ! -s conftest.err'
14782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14783 (eval $ac_try) 2>&5
14784 ac_status=$?
14785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14786 (exit $ac_status); }; } &&
14787 { ac_try='test -s conftest.$ac_objext'
14788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14789 (eval $ac_try) 2>&5
14790 ac_status=$?
14791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14792 (exit $ac_status); }; }; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014793
14794cat >>confdefs.h <<\_ACEOF
14795#define HAVE_FCHDIR 1
14796_ACEOF
14797
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014798 echo "$as_me:$LINENO: result: yes" >&5
14799echo "${ECHO_T}yes" >&6
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014800else
14801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014802sed 's/^/| /' conftest.$ac_ext >&5
14803
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014804echo "$as_me:$LINENO: result: no" >&5
14805echo "${ECHO_T}no" >&6
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014806
14807fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014808rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14809echo "$as_me:$LINENO: checking for fsync" >&5
14810echo $ECHO_N "checking for fsync... $ECHO_C" >&6
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014811cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014812/* confdefs.h. */
14813_ACEOF
14814cat confdefs.h >>conftest.$ac_ext
14815cat >>conftest.$ac_ext <<_ACEOF
14816/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014817#include <unistd.h>
14818int
14819main ()
14820{
14821void *x=fsync
14822 ;
14823 return 0;
14824}
14825_ACEOF
14826rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014827if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14828 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014829 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014830 grep -v '^ *+' conftest.er1 >conftest.err
14831 rm -f conftest.er1
14832 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014834 (exit $ac_status); } &&
14835 { ac_try='test -z "$ac_c_werror_flag"
14836 || test ! -s conftest.err'
14837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14838 (eval $ac_try) 2>&5
14839 ac_status=$?
14840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14841 (exit $ac_status); }; } &&
14842 { ac_try='test -s conftest.$ac_objext'
14843 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14844 (eval $ac_try) 2>&5
14845 ac_status=$?
14846 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14847 (exit $ac_status); }; }; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014848
14849cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014850#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014851_ACEOF
14852
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014853 echo "$as_me:$LINENO: result: yes" >&5
14854echo "${ECHO_T}yes" >&6
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014855else
14856 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014857sed 's/^/| /' conftest.$ac_ext >&5
14858
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014859echo "$as_me:$LINENO: result: no" >&5
14860echo "${ECHO_T}no" >&6
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014861
14862fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014863rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14864echo "$as_me:$LINENO: checking for fdatasync" >&5
14865echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014866cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014867/* confdefs.h. */
14868_ACEOF
14869cat confdefs.h >>conftest.$ac_ext
14870cat >>conftest.$ac_ext <<_ACEOF
14871/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014872#include <unistd.h>
14873int
14874main ()
14875{
14876void *x=fdatasync
14877 ;
14878 return 0;
14879}
14880_ACEOF
14881rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014882if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14883 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014884 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014885 grep -v '^ *+' conftest.er1 >conftest.err
14886 rm -f conftest.er1
14887 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014889 (exit $ac_status); } &&
14890 { ac_try='test -z "$ac_c_werror_flag"
14891 || test ! -s conftest.err'
14892 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14893 (eval $ac_try) 2>&5
14894 ac_status=$?
14895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14896 (exit $ac_status); }; } &&
14897 { ac_try='test -s conftest.$ac_objext'
14898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14899 (eval $ac_try) 2>&5
14900 ac_status=$?
14901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14902 (exit $ac_status); }; }; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014903
14904cat >>confdefs.h <<\_ACEOF
14905#define HAVE_FDATASYNC 1
14906_ACEOF
14907
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014908 echo "$as_me:$LINENO: result: yes" >&5
14909echo "${ECHO_T}yes" >&6
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014910else
14911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014912sed 's/^/| /' conftest.$ac_ext >&5
14913
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014914echo "$as_me:$LINENO: result: no" >&5
14915echo "${ECHO_T}no" >&6
Martin v. Löwisa64988c2003-09-20 15:30:20 +000014916
14917fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014918rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014919
Martin v. Löwisd5843682002-11-21 20:41:28 +000014920# On some systems (eg. FreeBSD 5), we would find a definition of the
14921# functions ctermid_r, setgroups in the library, but no prototype
14922# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
14923# address to avoid compiler warnings and potential miscompilations
14924# because of the missing prototypes.
14925
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014926echo "$as_me:$LINENO: checking for ctermid_r" >&5
14927echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
Martin v. Löwisd5843682002-11-21 20:41:28 +000014928cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014929/* confdefs.h. */
14930_ACEOF
14931cat confdefs.h >>conftest.$ac_ext
14932cat >>conftest.$ac_ext <<_ACEOF
14933/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014934
14935#include "confdefs.h"
14936#include <stdio.h>
14937
Martin v. Löwisd5843682002-11-21 20:41:28 +000014938int
14939main ()
14940{
14941void* p = ctermid_r
14942 ;
14943 return 0;
14944}
14945_ACEOF
14946rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14948 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000014949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014950 grep -v '^ *+' conftest.er1 >conftest.err
14951 rm -f conftest.er1
14952 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000014953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014954 (exit $ac_status); } &&
14955 { ac_try='test -z "$ac_c_werror_flag"
14956 || test ! -s conftest.err'
14957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14958 (eval $ac_try) 2>&5
14959 ac_status=$?
14960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14961 (exit $ac_status); }; } &&
14962 { ac_try='test -s conftest.$ac_objext'
14963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14964 (eval $ac_try) 2>&5
14965 ac_status=$?
14966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14967 (exit $ac_status); }; }; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000014968
14969cat >>confdefs.h <<\_ACEOF
14970#define HAVE_CTERMID_R 1
14971_ACEOF
14972
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014973 echo "$as_me:$LINENO: result: yes" >&5
14974echo "${ECHO_T}yes" >&6
Martin v. Löwisd5843682002-11-21 20:41:28 +000014975else
14976 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014977sed 's/^/| /' conftest.$ac_ext >&5
14978
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014979echo "$as_me:$LINENO: result: no" >&5
14980echo "${ECHO_T}no" >&6
Martin v. Löwisd5843682002-11-21 20:41:28 +000014981
14982fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014983rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000014984
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014985echo "$as_me:$LINENO: checking for flock" >&5
14986echo $ECHO_N "checking for flock... $ECHO_C" >&6
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014987cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014988/* confdefs.h. */
14989_ACEOF
14990cat confdefs.h >>conftest.$ac_ext
14991cat >>conftest.$ac_ext <<_ACEOF
14992/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014993
14994#include "confdefs.h"
14995#include <sys/file.h>
14996
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014997int
14998main ()
14999{
15000void* p = flock
15001 ;
15002 return 0;
15003}
15004_ACEOF
15005rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015006if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15007 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015008 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015009 grep -v '^ *+' conftest.er1 >conftest.err
15010 rm -f conftest.er1
15011 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015013 (exit $ac_status); } &&
15014 { ac_try='test -z "$ac_c_werror_flag"
15015 || test ! -s conftest.err'
15016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15017 (eval $ac_try) 2>&5
15018 ac_status=$?
15019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15020 (exit $ac_status); }; } &&
15021 { ac_try='test -s conftest.$ac_objext'
15022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15023 (eval $ac_try) 2>&5
15024 ac_status=$?
15025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15026 (exit $ac_status); }; }; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015027
15028cat >>confdefs.h <<\_ACEOF
15029#define HAVE_FLOCK 1
15030_ACEOF
15031
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015032 echo "$as_me:$LINENO: result: yes" >&5
15033echo "${ECHO_T}yes" >&6
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015034else
15035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015036sed 's/^/| /' conftest.$ac_ext >&5
15037
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015038echo "$as_me:$LINENO: result: no" >&5
15039echo "${ECHO_T}no" >&6
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015040
15041fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015042rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000015043
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015044echo "$as_me:$LINENO: checking for getpagesize" >&5
15045echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015046cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015047/* confdefs.h. */
15048_ACEOF
15049cat confdefs.h >>conftest.$ac_ext
15050cat >>conftest.$ac_ext <<_ACEOF
15051/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015052
15053#include "confdefs.h"
15054#include <unistd.h>
15055
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015056int
15057main ()
15058{
15059void* p = getpagesize
15060 ;
15061 return 0;
15062}
15063_ACEOF
15064rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015065if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15066 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015068 grep -v '^ *+' conftest.er1 >conftest.err
15069 rm -f conftest.er1
15070 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015072 (exit $ac_status); } &&
15073 { ac_try='test -z "$ac_c_werror_flag"
15074 || test ! -s conftest.err'
15075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15076 (eval $ac_try) 2>&5
15077 ac_status=$?
15078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15079 (exit $ac_status); }; } &&
15080 { ac_try='test -s conftest.$ac_objext'
15081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15082 (eval $ac_try) 2>&5
15083 ac_status=$?
15084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15085 (exit $ac_status); }; }; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015086
15087cat >>confdefs.h <<\_ACEOF
15088#define HAVE_GETPAGESIZE 1
15089_ACEOF
15090
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015091 echo "$as_me:$LINENO: result: yes" >&5
15092echo "${ECHO_T}yes" >&6
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015093else
15094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015095sed 's/^/| /' conftest.$ac_ext >&5
15096
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015097echo "$as_me:$LINENO: result: no" >&5
15098echo "${ECHO_T}no" >&6
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015099
15100fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015101rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015102
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015103for ac_prog in true
15104do
15105 # Extract the first word of "$ac_prog", so it can be a program name with args.
15106set dummy $ac_prog; ac_word=$2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015107echo "$as_me:$LINENO: checking for $ac_word" >&5
15108echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015109if test "${ac_cv_prog_TRUE+set}" = set; then
15110 echo $ECHO_N "(cached) $ECHO_C" >&6
15111else
15112 if test -n "$TRUE"; then
15113 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
15114else
15115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15116for as_dir in $PATH
15117do
15118 IFS=$as_save_IFS
15119 test -z "$as_dir" && as_dir=.
15120 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015121 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015122 ac_cv_prog_TRUE="$ac_prog"
15123 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15124 break 2
15125 fi
15126done
15127done
15128
15129fi
15130fi
15131TRUE=$ac_cv_prog_TRUE
15132if test -n "$TRUE"; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015133 echo "$as_me:$LINENO: result: $TRUE" >&5
15134echo "${ECHO_T}$TRUE" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015135else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015136 echo "$as_me:$LINENO: result: no" >&5
15137echo "${ECHO_T}no" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015138fi
15139
15140 test -n "$TRUE" && break
15141done
15142test -n "$TRUE" || TRUE="/bin/true"
15143
15144
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015145echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
15146echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015147if test "${ac_cv_lib_c_inet_aton+set}" = set; then
15148 echo $ECHO_N "(cached) $ECHO_C" >&6
15149else
15150 ac_check_lib_save_LIBS=$LIBS
15151LIBS="-lc $LIBS"
15152cat >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. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015158
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015159/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015160#ifdef __cplusplus
15161extern "C"
15162#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015163/* We use char because int might match the return type of a gcc2
15164 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015165char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015166int
15167main ()
15168{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015169inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015170 ;
15171 return 0;
15172}
15173_ACEOF
15174rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015175if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15176 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015178 grep -v '^ *+' conftest.er1 >conftest.err
15179 rm -f conftest.er1
15180 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015182 (exit $ac_status); } &&
15183 { ac_try='test -z "$ac_c_werror_flag"
15184 || test ! -s conftest.err'
15185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15186 (eval $ac_try) 2>&5
15187 ac_status=$?
15188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15189 (exit $ac_status); }; } &&
15190 { ac_try='test -s conftest$ac_exeext'
15191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15192 (eval $ac_try) 2>&5
15193 ac_status=$?
15194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15195 (exit $ac_status); }; }; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015196 ac_cv_lib_c_inet_aton=yes
15197else
15198 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015199sed 's/^/| /' conftest.$ac_ext >&5
15200
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015201ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015202fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015203rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015204 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015205LIBS=$ac_check_lib_save_LIBS
15206fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015207echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
15208echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015209if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015210 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015211else
15212
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015213echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
15214echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015215if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
15216 echo $ECHO_N "(cached) $ECHO_C" >&6
15217else
15218 ac_check_lib_save_LIBS=$LIBS
15219LIBS="-lresolv $LIBS"
15220cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015221/* confdefs.h. */
15222_ACEOF
15223cat confdefs.h >>conftest.$ac_ext
15224cat >>conftest.$ac_ext <<_ACEOF
15225/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015226
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015227/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015228#ifdef __cplusplus
15229extern "C"
15230#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015231/* We use char because int might match the return type of a gcc2
15232 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015233char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015234int
15235main ()
15236{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015237inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015238 ;
15239 return 0;
15240}
15241_ACEOF
15242rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015243if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15244 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015245 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015246 grep -v '^ *+' conftest.er1 >conftest.err
15247 rm -f conftest.er1
15248 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015250 (exit $ac_status); } &&
15251 { ac_try='test -z "$ac_c_werror_flag"
15252 || test ! -s conftest.err'
15253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15254 (eval $ac_try) 2>&5
15255 ac_status=$?
15256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15257 (exit $ac_status); }; } &&
15258 { ac_try='test -s conftest$ac_exeext'
15259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15260 (eval $ac_try) 2>&5
15261 ac_status=$?
15262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15263 (exit $ac_status); }; }; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015264 ac_cv_lib_resolv_inet_aton=yes
15265else
15266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015267sed 's/^/| /' conftest.$ac_ext >&5
15268
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015269ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015270fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015271rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015272 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015273LIBS=$ac_check_lib_save_LIBS
15274fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015275echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
15276echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015277if test $ac_cv_lib_resolv_inet_aton = yes; then
15278 cat >>confdefs.h <<_ACEOF
15279#define HAVE_LIBRESOLV 1
15280_ACEOF
15281
15282 LIBS="-lresolv $LIBS"
15283
15284fi
15285
15286
15287fi
15288
15289
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015290case $ac_sys_system/$ac_sys_release in
15291Darwin/*)
15292 _CUR_CFLAGS="${CFLAGS}"
15293 _CUR_LDFLAGS="${LDFLAGS}"
15294 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
15295 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
15296 ;;
15297esac
15298
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015299echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
15300echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015301if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
15302 echo $ECHO_N "(cached) $ECHO_C" >&6
15303else
15304 ac_check_lib_save_LIBS=$LIBS
15305LIBS="-lz $LIBS"
15306cat >conftest.$ac_ext <<_ACEOF
15307/* confdefs.h. */
15308_ACEOF
15309cat confdefs.h >>conftest.$ac_ext
15310cat >>conftest.$ac_ext <<_ACEOF
15311/* end confdefs.h. */
15312
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015313/* Override any gcc2 internal prototype to avoid an error. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015314#ifdef __cplusplus
15315extern "C"
15316#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015317/* We use char because int might match the return type of a gcc2
15318 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015319char inflateCopy ();
15320int
15321main ()
15322{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015323inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015324 ;
15325 return 0;
15326}
15327_ACEOF
15328rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015329if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15330 (eval $ac_link) 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015331 ac_status=$?
15332 grep -v '^ *+' conftest.er1 >conftest.err
15333 rm -f conftest.er1
15334 cat conftest.err >&5
15335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015336 (exit $ac_status); } &&
15337 { ac_try='test -z "$ac_c_werror_flag"
15338 || test ! -s conftest.err'
15339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15340 (eval $ac_try) 2>&5
15341 ac_status=$?
15342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15343 (exit $ac_status); }; } &&
15344 { ac_try='test -s conftest$ac_exeext'
15345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15346 (eval $ac_try) 2>&5
15347 ac_status=$?
15348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15349 (exit $ac_status); }; }; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015350 ac_cv_lib_z_inflateCopy=yes
15351else
15352 echo "$as_me: failed program was:" >&5
15353sed 's/^/| /' conftest.$ac_ext >&5
15354
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015355ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015356fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015357rm -f conftest.err conftest.$ac_objext \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015358 conftest$ac_exeext conftest.$ac_ext
15359LIBS=$ac_check_lib_save_LIBS
15360fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015361echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
15362echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000015363if test $ac_cv_lib_z_inflateCopy = yes; then
15364
15365cat >>confdefs.h <<\_ACEOF
15366#define HAVE_ZLIB_COPY 1
15367_ACEOF
15368
15369fi
15370
15371
15372case $ac_sys_system/$ac_sys_release in
15373Darwin/*)
15374 CFLAGS="${_CUR_CFLAGS}"
15375 LDFLAGS="${_CUR_LDFLAGS}"
15376 ;;
15377esac
15378
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015379echo "$as_me:$LINENO: checking for hstrerror" >&5
15380echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
Martin v. Löwise9416172003-05-03 10:12:45 +000015381cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015382/* confdefs.h. */
15383_ACEOF
15384cat confdefs.h >>conftest.$ac_ext
15385cat >>conftest.$ac_ext <<_ACEOF
15386/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000015387
15388#include "confdefs.h"
15389#include <netdb.h>
15390
Martin v. Löwise9416172003-05-03 10:12:45 +000015391int
15392main ()
15393{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015394void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000015395 ;
15396 return 0;
15397}
15398_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015399rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015400if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15401 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000015402 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015403 grep -v '^ *+' conftest.er1 >conftest.err
15404 rm -f conftest.er1
15405 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000015406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015407 (exit $ac_status); } &&
15408 { ac_try='test -z "$ac_c_werror_flag"
15409 || test ! -s conftest.err'
15410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15411 (eval $ac_try) 2>&5
15412 ac_status=$?
15413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15414 (exit $ac_status); }; } &&
15415 { ac_try='test -s conftest$ac_exeext'
15416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15417 (eval $ac_try) 2>&5
15418 ac_status=$?
15419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15420 (exit $ac_status); }; }; then
Martin v. Löwise9416172003-05-03 10:12:45 +000015421
15422cat >>confdefs.h <<\_ACEOF
15423#define HAVE_HSTRERROR 1
15424_ACEOF
15425
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015426 echo "$as_me:$LINENO: result: yes" >&5
15427echo "${ECHO_T}yes" >&6
Martin v. Löwise9416172003-05-03 10:12:45 +000015428else
15429 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015430sed 's/^/| /' conftest.$ac_ext >&5
15431
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015432echo "$as_me:$LINENO: result: no" >&5
15433echo "${ECHO_T}no" >&6
Martin v. Löwise9416172003-05-03 10:12:45 +000015434
15435fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015436rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015437 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000015438
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015439echo "$as_me:$LINENO: checking for inet_aton" >&5
15440echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
Martin v. Löwise9416172003-05-03 10:12:45 +000015441cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015442/* confdefs.h. */
15443_ACEOF
15444cat confdefs.h >>conftest.$ac_ext
15445cat >>conftest.$ac_ext <<_ACEOF
15446/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000015447
15448#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000015449#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000015450#include <sys/socket.h>
15451#include <netinet/in.h>
15452#include <arpa/inet.h>
15453
Martin v. Löwise9416172003-05-03 10:12:45 +000015454int
15455main ()
15456{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015457void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000015458 ;
15459 return 0;
15460}
15461_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015462rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015463if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15464 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000015465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015466 grep -v '^ *+' conftest.er1 >conftest.err
15467 rm -f conftest.er1
15468 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000015469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015470 (exit $ac_status); } &&
15471 { ac_try='test -z "$ac_c_werror_flag"
15472 || test ! -s conftest.err'
15473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15474 (eval $ac_try) 2>&5
15475 ac_status=$?
15476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15477 (exit $ac_status); }; } &&
15478 { ac_try='test -s conftest$ac_exeext'
15479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15480 (eval $ac_try) 2>&5
15481 ac_status=$?
15482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15483 (exit $ac_status); }; }; then
Martin v. Löwise9416172003-05-03 10:12:45 +000015484
15485cat >>confdefs.h <<\_ACEOF
15486#define HAVE_INET_ATON 1
15487_ACEOF
15488
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015489 echo "$as_me:$LINENO: result: yes" >&5
15490echo "${ECHO_T}yes" >&6
Martin v. Löwise9416172003-05-03 10:12:45 +000015491else
15492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015493sed 's/^/| /' conftest.$ac_ext >&5
15494
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015495echo "$as_me:$LINENO: result: no" >&5
15496echo "${ECHO_T}no" >&6
Martin v. Löwise9416172003-05-03 10:12:45 +000015497
15498fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015499rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015500 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000015501
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015502echo "$as_me:$LINENO: checking for inet_pton" >&5
15503echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
Martin v. Löwise9416172003-05-03 10:12:45 +000015504cat >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. */
Martin v. Löwise9416172003-05-03 10:12:45 +000015510
15511#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000015512#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000015513#include <sys/socket.h>
15514#include <netinet/in.h>
15515#include <arpa/inet.h>
15516
Martin v. Löwise9416172003-05-03 10:12:45 +000015517int
15518main ()
15519{
15520void* p = inet_pton
15521 ;
15522 return 0;
15523}
15524_ACEOF
15525rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015526if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15527 (eval $ac_compile) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000015528 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015529 grep -v '^ *+' conftest.er1 >conftest.err
15530 rm -f conftest.er1
15531 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000015532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015533 (exit $ac_status); } &&
15534 { ac_try='test -z "$ac_c_werror_flag"
15535 || test ! -s conftest.err'
15536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15537 (eval $ac_try) 2>&5
15538 ac_status=$?
15539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15540 (exit $ac_status); }; } &&
15541 { ac_try='test -s conftest.$ac_objext'
15542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15543 (eval $ac_try) 2>&5
15544 ac_status=$?
15545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15546 (exit $ac_status); }; }; then
Martin v. Löwise9416172003-05-03 10:12:45 +000015547
15548cat >>confdefs.h <<\_ACEOF
15549#define HAVE_INET_PTON 1
15550_ACEOF
15551
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015552 echo "$as_me:$LINENO: result: yes" >&5
15553echo "${ECHO_T}yes" >&6
Martin v. Löwise9416172003-05-03 10:12:45 +000015554else
15555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015556sed 's/^/| /' conftest.$ac_ext >&5
15557
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015558echo "$as_me:$LINENO: result: no" >&5
15559echo "${ECHO_T}no" >&6
Martin v. Löwise9416172003-05-03 10:12:45 +000015560
15561fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015562rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000015563
Martin v. Löwisd6640d42003-07-06 09:29:52 +000015564# On some systems, setgroups is in unistd.h, on others, in grp.h
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015565echo "$as_me:$LINENO: checking for setgroups" >&5
15566echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
Martin v. Löwisd5843682002-11-21 20:41:28 +000015567cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015568/* confdefs.h. */
15569_ACEOF
15570cat confdefs.h >>conftest.$ac_ext
15571cat >>conftest.$ac_ext <<_ACEOF
15572/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000015573
15574#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000015575#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000015576#ifdef HAVE_GRP_H
15577#include <grp.h>
15578#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000015579
Martin v. Löwisd5843682002-11-21 20:41:28 +000015580int
15581main ()
15582{
15583void* p = setgroups
15584 ;
15585 return 0;
15586}
15587_ACEOF
15588rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015589if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15590 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000015591 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015592 grep -v '^ *+' conftest.er1 >conftest.err
15593 rm -f conftest.er1
15594 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000015595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015596 (exit $ac_status); } &&
15597 { ac_try='test -z "$ac_c_werror_flag"
15598 || test ! -s conftest.err'
15599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15600 (eval $ac_try) 2>&5
15601 ac_status=$?
15602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15603 (exit $ac_status); }; } &&
15604 { ac_try='test -s conftest.$ac_objext'
15605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15606 (eval $ac_try) 2>&5
15607 ac_status=$?
15608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15609 (exit $ac_status); }; }; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000015610
15611cat >>confdefs.h <<\_ACEOF
15612#define HAVE_SETGROUPS 1
15613_ACEOF
15614
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015615 echo "$as_me:$LINENO: result: yes" >&5
15616echo "${ECHO_T}yes" >&6
Martin v. Löwisd5843682002-11-21 20:41:28 +000015617else
15618 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015619sed 's/^/| /' conftest.$ac_ext >&5
15620
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015621echo "$as_me:$LINENO: result: no" >&5
15622echo "${ECHO_T}no" >&6
Martin v. Löwisd5843682002-11-21 20:41:28 +000015623
15624fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015625rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000015626
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015627# check for openpty and forkpty
15628
Martin v. Löwis11437992002-04-12 09:54:03 +000015629
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015630for ac_func in openpty
15631do
Martin v. Löwis11437992002-04-12 09:54:03 +000015632as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015633echo "$as_me:$LINENO: checking for $ac_func" >&5
15634echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15635if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015636 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015637else
Martin v. Löwis11437992002-04-12 09:54:03 +000015638 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015639/* confdefs.h. */
15640_ACEOF
15641cat confdefs.h >>conftest.$ac_ext
15642cat >>conftest.$ac_ext <<_ACEOF
15643/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015644/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15645 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15646#define $ac_func innocuous_$ac_func
15647
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015648/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015649 which can conflict with char $ac_func (); below.
15650 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015651 <limits.h> exists even on freestanding compilers. */
15652
15653#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015654# include <limits.h>
15655#else
15656# include <assert.h>
15657#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015658
15659#undef $ac_func
15660
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015661/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015662#ifdef __cplusplus
15663extern "C"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015664{
Martin v. Löwis11437992002-04-12 09:54:03 +000015665#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015666/* We use char because int might match the return type of a gcc2
15667 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015668char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015669/* The GNU C library defines this for functions which it implements
15670 to always fail with ENOSYS. Some functions are actually named
15671 something starting with __ and the normal name is an alias. */
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015672#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015673choke me
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015674#else
15675char (*f) () = $ac_func;
15676#endif
15677#ifdef __cplusplus
15678}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015679#endif
15680
Skip Montanaro6dead952003-09-25 14:50:04 +000015681int
15682main ()
15683{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015684return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015685 ;
15686 return 0;
15687}
15688_ACEOF
15689rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015690if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15691 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015692 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015693 grep -v '^ *+' conftest.er1 >conftest.err
15694 rm -f conftest.er1
15695 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015697 (exit $ac_status); } &&
15698 { ac_try='test -z "$ac_c_werror_flag"
15699 || test ! -s conftest.err'
15700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15701 (eval $ac_try) 2>&5
15702 ac_status=$?
15703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15704 (exit $ac_status); }; } &&
15705 { ac_try='test -s conftest$ac_exeext'
15706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15707 (eval $ac_try) 2>&5
15708 ac_status=$?
15709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15710 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015711 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015712else
Martin v. Löwis11437992002-04-12 09:54:03 +000015713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015714sed 's/^/| /' conftest.$ac_ext >&5
15715
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015716eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015717fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015718rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015719 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015720fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015721echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15722echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015723if test `eval echo '${'$as_ac_var'}'` = yes; then
15724 cat >>confdefs.h <<_ACEOF
15725#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15726_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015727
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015728else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015729 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
15730echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015731if test "${ac_cv_lib_util_openpty+set}" = set; then
15732 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000015733else
Martin v. Löwis11437992002-04-12 09:54:03 +000015734 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015735LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015736cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015737/* confdefs.h. */
15738_ACEOF
15739cat confdefs.h >>conftest.$ac_ext
15740cat >>conftest.$ac_ext <<_ACEOF
15741/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015742
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015743/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015744#ifdef __cplusplus
15745extern "C"
15746#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015747/* We use char because int might match the return type of a gcc2
15748 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015749char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015750int
15751main ()
15752{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015753openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015754 ;
15755 return 0;
15756}
15757_ACEOF
15758rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015759if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15760 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015762 grep -v '^ *+' conftest.er1 >conftest.err
15763 rm -f conftest.er1
15764 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015766 (exit $ac_status); } &&
15767 { ac_try='test -z "$ac_c_werror_flag"
15768 || test ! -s conftest.err'
15769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15770 (eval $ac_try) 2>&5
15771 ac_status=$?
15772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15773 (exit $ac_status); }; } &&
15774 { ac_try='test -s conftest$ac_exeext'
15775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15776 (eval $ac_try) 2>&5
15777 ac_status=$?
15778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15779 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015780 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000015781else
Martin v. Löwis11437992002-04-12 09:54:03 +000015782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015783sed 's/^/| /' conftest.$ac_ext >&5
15784
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015785ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015786fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015787rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015788 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015789LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015790fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015791echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
15792echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015793if test $ac_cv_lib_util_openpty = yes; then
15794 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015795#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015796_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015797 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015798else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015799 echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
15800echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015801if test "${ac_cv_lib_bsd_openpty+set}" = set; then
15802 echo $ECHO_N "(cached) $ECHO_C" >&6
15803else
15804 ac_check_lib_save_LIBS=$LIBS
15805LIBS="-lbsd $LIBS"
15806cat >conftest.$ac_ext <<_ACEOF
15807/* confdefs.h. */
15808_ACEOF
15809cat confdefs.h >>conftest.$ac_ext
15810cat >>conftest.$ac_ext <<_ACEOF
15811/* end confdefs.h. */
15812
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015813/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015814#ifdef __cplusplus
15815extern "C"
15816#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015817/* We use char because int might match the return type of a gcc2
15818 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015819char openpty ();
15820int
15821main ()
15822{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015823openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015824 ;
15825 return 0;
15826}
15827_ACEOF
15828rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015829if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15830 (eval $ac_link) 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015831 ac_status=$?
15832 grep -v '^ *+' conftest.er1 >conftest.err
15833 rm -f conftest.er1
15834 cat conftest.err >&5
15835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015836 (exit $ac_status); } &&
15837 { ac_try='test -z "$ac_c_werror_flag"
15838 || test ! -s conftest.err'
15839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15840 (eval $ac_try) 2>&5
15841 ac_status=$?
15842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15843 (exit $ac_status); }; } &&
15844 { ac_try='test -s conftest$ac_exeext'
15845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15846 (eval $ac_try) 2>&5
15847 ac_status=$?
15848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15849 (exit $ac_status); }; }; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015850 ac_cv_lib_bsd_openpty=yes
15851else
15852 echo "$as_me: failed program was:" >&5
15853sed 's/^/| /' conftest.$ac_ext >&5
15854
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015855ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000015856fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015857rm -f conftest.err conftest.$ac_objext \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015858 conftest$ac_exeext conftest.$ac_ext
15859LIBS=$ac_check_lib_save_LIBS
15860fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015861echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
15862echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000015863if test $ac_cv_lib_bsd_openpty = yes; then
15864 cat >>confdefs.h <<\_ACEOF
15865#define HAVE_OPENPTY 1
15866_ACEOF
15867 LIBS="$LIBS -lbsd"
15868fi
15869
15870
15871fi
15872
Fred Drake8cef4cf2000-06-28 16:40:38 +000015873
15874fi
15875done
15876
Martin v. Löwis11437992002-04-12 09:54:03 +000015877
Fred Drake8cef4cf2000-06-28 16:40:38 +000015878for ac_func in forkpty
15879do
Martin v. Löwis11437992002-04-12 09:54:03 +000015880as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015881echo "$as_me:$LINENO: checking for $ac_func" >&5
15882echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15883if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015884 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000015885else
Martin v. Löwis11437992002-04-12 09:54:03 +000015886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015887/* confdefs.h. */
15888_ACEOF
15889cat confdefs.h >>conftest.$ac_ext
15890cat >>conftest.$ac_ext <<_ACEOF
15891/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015892/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15893 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15894#define $ac_func innocuous_$ac_func
15895
Fred Drake8cef4cf2000-06-28 16:40:38 +000015896/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015897 which can conflict with char $ac_func (); below.
15898 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015899 <limits.h> exists even on freestanding compilers. */
15900
15901#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015902# include <limits.h>
15903#else
15904# include <assert.h>
15905#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015906
15907#undef $ac_func
15908
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015909/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015910#ifdef __cplusplus
15911extern "C"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015912{
Martin v. Löwis11437992002-04-12 09:54:03 +000015913#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015914/* We use char because int might match the return type of a gcc2
15915 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015916char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000015917/* The GNU C library defines this for functions which it implements
15918 to always fail with ENOSYS. Some functions are actually named
15919 something starting with __ and the normal name is an alias. */
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015920#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Fred Drake8cef4cf2000-06-28 16:40:38 +000015921choke me
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015922#else
15923char (*f) () = $ac_func;
15924#endif
15925#ifdef __cplusplus
15926}
Fred Drake8cef4cf2000-06-28 16:40:38 +000015927#endif
15928
Skip Montanaro6dead952003-09-25 14:50:04 +000015929int
15930main ()
15931{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015932return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015933 ;
15934 return 0;
15935}
15936_ACEOF
15937rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015938if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15939 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015940 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015941 grep -v '^ *+' conftest.er1 >conftest.err
15942 rm -f conftest.er1
15943 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015945 (exit $ac_status); } &&
15946 { ac_try='test -z "$ac_c_werror_flag"
15947 || test ! -s conftest.err'
15948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15949 (eval $ac_try) 2>&5
15950 ac_status=$?
15951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15952 (exit $ac_status); }; } &&
15953 { ac_try='test -s conftest$ac_exeext'
15954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15955 (eval $ac_try) 2>&5
15956 ac_status=$?
15957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15958 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015959 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015960else
Martin v. Löwis11437992002-04-12 09:54:03 +000015961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015962sed 's/^/| /' conftest.$ac_ext >&5
15963
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015964eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015965fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015966rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015967 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015968fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015969echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15970echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015971if test `eval echo '${'$as_ac_var'}'` = yes; then
15972 cat >>confdefs.h <<_ACEOF
15973#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15974_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000015975
Fred Drake8cef4cf2000-06-28 16:40:38 +000015976else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015977 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
15978echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015979if test "${ac_cv_lib_util_forkpty+set}" = set; then
15980 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000015981else
Martin v. Löwis11437992002-04-12 09:54:03 +000015982 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015983LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015984cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015985/* confdefs.h. */
15986_ACEOF
15987cat confdefs.h >>conftest.$ac_ext
15988cat >>conftest.$ac_ext <<_ACEOF
15989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015990
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015991/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015992#ifdef __cplusplus
15993extern "C"
15994#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015995/* We use char because int might match the return type of a gcc2
15996 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015997char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015998int
15999main ()
16000{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016001forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016002 ;
16003 return 0;
16004}
16005_ACEOF
16006rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016007if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16008 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016010 grep -v '^ *+' conftest.er1 >conftest.err
16011 rm -f conftest.er1
16012 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016014 (exit $ac_status); } &&
16015 { ac_try='test -z "$ac_c_werror_flag"
16016 || test ! -s conftest.err'
16017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16018 (eval $ac_try) 2>&5
16019 ac_status=$?
16020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16021 (exit $ac_status); }; } &&
16022 { ac_try='test -s conftest$ac_exeext'
16023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16024 (eval $ac_try) 2>&5
16025 ac_status=$?
16026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16027 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016028 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000016029else
Martin v. Löwis11437992002-04-12 09:54:03 +000016030 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016031sed 's/^/| /' conftest.$ac_ext >&5
16032
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016033ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016034fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016035rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016036 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016037LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016038fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016039echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
16040echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016041if test $ac_cv_lib_util_forkpty = yes; then
16042 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016043#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016044_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016045 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016046else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016047 echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
16048echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016049if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
16050 echo $ECHO_N "(cached) $ECHO_C" >&6
16051else
16052 ac_check_lib_save_LIBS=$LIBS
16053LIBS="-lbsd $LIBS"
16054cat >conftest.$ac_ext <<_ACEOF
16055/* confdefs.h. */
16056_ACEOF
16057cat confdefs.h >>conftest.$ac_ext
16058cat >>conftest.$ac_ext <<_ACEOF
16059/* end confdefs.h. */
16060
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016061/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016062#ifdef __cplusplus
16063extern "C"
16064#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016065/* We use char because int might match the return type of a gcc2
16066 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016067char forkpty ();
16068int
16069main ()
16070{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016071forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016072 ;
16073 return 0;
16074}
16075_ACEOF
16076rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016077if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16078 (eval $ac_link) 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016079 ac_status=$?
16080 grep -v '^ *+' conftest.er1 >conftest.err
16081 rm -f conftest.er1
16082 cat conftest.err >&5
16083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016084 (exit $ac_status); } &&
16085 { ac_try='test -z "$ac_c_werror_flag"
16086 || test ! -s conftest.err'
16087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16088 (eval $ac_try) 2>&5
16089 ac_status=$?
16090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16091 (exit $ac_status); }; } &&
16092 { ac_try='test -s conftest$ac_exeext'
16093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16094 (eval $ac_try) 2>&5
16095 ac_status=$?
16096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16097 (exit $ac_status); }; }; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016098 ac_cv_lib_bsd_forkpty=yes
16099else
16100 echo "$as_me: failed program was:" >&5
16101sed 's/^/| /' conftest.$ac_ext >&5
16102
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016103ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016104fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016105rm -f conftest.err conftest.$ac_objext \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016106 conftest$ac_exeext conftest.$ac_ext
16107LIBS=$ac_check_lib_save_LIBS
16108fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016109echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
16110echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016111if test $ac_cv_lib_bsd_forkpty = yes; then
16112 cat >>confdefs.h <<\_ACEOF
16113#define HAVE_FORKPTY 1
16114_ACEOF
16115 LIBS="$LIBS -lbsd"
16116fi
16117
16118
16119fi
16120
Fred Drake8cef4cf2000-06-28 16:40:38 +000016121
16122fi
16123done
16124
Jack Jansendd19cf82001-12-06 22:36:17 +000016125
Michael W. Hudson54241132001-12-07 15:38:26 +000016126# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016127
16128
16129
16130
16131
16132
Fred Drake8cef4cf2000-06-28 16:40:38 +000016133for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
16134do
Martin v. Löwis11437992002-04-12 09:54:03 +000016135as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016136echo "$as_me:$LINENO: checking for $ac_func" >&5
16137echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16138if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016139 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016140else
Martin v. Löwis11437992002-04-12 09:54:03 +000016141 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016142/* confdefs.h. */
16143_ACEOF
16144cat confdefs.h >>conftest.$ac_ext
16145cat >>conftest.$ac_ext <<_ACEOF
16146/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016147/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16148 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16149#define $ac_func innocuous_$ac_func
16150
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016151/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016152 which can conflict with char $ac_func (); below.
16153 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016154 <limits.h> exists even on freestanding compilers. */
16155
16156#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016157# include <limits.h>
16158#else
16159# include <assert.h>
16160#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016161
16162#undef $ac_func
16163
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016164/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016165#ifdef __cplusplus
16166extern "C"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016167{
Martin v. Löwis11437992002-04-12 09:54:03 +000016168#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016169/* We use char because int might match the return type of a gcc2
16170 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016171char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016172/* The GNU C library defines this for functions which it implements
16173 to always fail with ENOSYS. Some functions are actually named
16174 something starting with __ and the normal name is an alias. */
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016175#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016176choke me
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016177#else
16178char (*f) () = $ac_func;
16179#endif
16180#ifdef __cplusplus
16181}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016182#endif
16183
Skip Montanaro6dead952003-09-25 14:50:04 +000016184int
16185main ()
16186{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016187return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016188 ;
16189 return 0;
16190}
16191_ACEOF
16192rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016193if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16194 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016195 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016196 grep -v '^ *+' conftest.er1 >conftest.err
16197 rm -f conftest.er1
16198 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016200 (exit $ac_status); } &&
16201 { ac_try='test -z "$ac_c_werror_flag"
16202 || test ! -s conftest.err'
16203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16204 (eval $ac_try) 2>&5
16205 ac_status=$?
16206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16207 (exit $ac_status); }; } &&
16208 { ac_try='test -s conftest$ac_exeext'
16209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16210 (eval $ac_try) 2>&5
16211 ac_status=$?
16212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16213 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016214 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016215else
Martin v. Löwis11437992002-04-12 09:54:03 +000016216 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016217sed 's/^/| /' conftest.$ac_ext >&5
16218
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016219eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016220fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016221rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016222 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016223fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016224echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16225echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016226if test `eval echo '${'$as_ac_var'}'` = yes; then
16227 cat >>confdefs.h <<_ACEOF
16228#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16229_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016230
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016231fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016232done
16233
Michael W. Hudson54241132001-12-07 15:38:26 +000016234
Martin v. Löwis11437992002-04-12 09:54:03 +000016235
16236
16237
16238
16239
Martin v. Löwis1142de32002-03-29 16:28:31 +000016240for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000016241do
Martin v. Löwis11437992002-04-12 09:54:03 +000016242as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016243echo "$as_me:$LINENO: checking for $ac_func" >&5
16244echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16245if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016246 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016247else
Martin v. Löwis11437992002-04-12 09:54:03 +000016248 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016249/* confdefs.h. */
16250_ACEOF
16251cat confdefs.h >>conftest.$ac_ext
16252cat >>conftest.$ac_ext <<_ACEOF
16253/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016254/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16255 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16256#define $ac_func innocuous_$ac_func
16257
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016258/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016259 which can conflict with char $ac_func (); below.
16260 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016261 <limits.h> exists even on freestanding compilers. */
16262
16263#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016264# include <limits.h>
16265#else
16266# include <assert.h>
16267#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016268
16269#undef $ac_func
16270
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016271/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016272#ifdef __cplusplus
16273extern "C"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016274{
Martin v. Löwis11437992002-04-12 09:54:03 +000016275#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016276/* We use char because int might match the return type of a gcc2
16277 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016278char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016279/* The GNU C library defines this for functions which it implements
16280 to always fail with ENOSYS. Some functions are actually named
16281 something starting with __ and the normal name is an alias. */
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016282#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000016283choke me
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016284#else
16285char (*f) () = $ac_func;
16286#endif
16287#ifdef __cplusplus
16288}
Guido van Rossum627b2d71993-12-24 10:39:16 +000016289#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016290
Skip Montanaro6dead952003-09-25 14:50:04 +000016291int
16292main ()
16293{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016294return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016295 ;
16296 return 0;
16297}
16298_ACEOF
16299rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016300if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16301 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016303 grep -v '^ *+' conftest.er1 >conftest.err
16304 rm -f conftest.er1
16305 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016307 (exit $ac_status); } &&
16308 { ac_try='test -z "$ac_c_werror_flag"
16309 || test ! -s conftest.err'
16310 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16311 (eval $ac_try) 2>&5
16312 ac_status=$?
16313 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16314 (exit $ac_status); }; } &&
16315 { ac_try='test -s conftest$ac_exeext'
16316 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16317 (eval $ac_try) 2>&5
16318 ac_status=$?
16319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16320 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016321 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000016322else
Martin v. Löwis11437992002-04-12 09:54:03 +000016323 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016324sed 's/^/| /' conftest.$ac_ext >&5
16325
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016326eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000016327fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016328rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016329 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000016330fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016331echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16332echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016333if test `eval echo '${'$as_ac_var'}'` = yes; then
16334 cat >>confdefs.h <<_ACEOF
16335#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16336_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000016337
Martin v. Löwis1142de32002-03-29 16:28:31 +000016338else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016339 case $LIBOBJS in
16340 "$ac_func.$ac_objext" | \
16341 *" $ac_func.$ac_objext" | \
16342 "$ac_func.$ac_objext "* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016343 *" $ac_func.$ac_objext "* ) ;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016344 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016345esac
16346
Martin v. Löwis1142de32002-03-29 16:28:31 +000016347fi
16348done
16349
16350
Martin v. Löwis11437992002-04-12 09:54:03 +000016351
Martin v. Löwis1142de32002-03-29 16:28:31 +000016352for ac_func in getpgrp
16353do
Martin v. Löwis11437992002-04-12 09:54:03 +000016354as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016355echo "$as_me:$LINENO: checking for $ac_func" >&5
16356echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16357if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016358 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000016359else
Martin v. Löwis11437992002-04-12 09:54:03 +000016360 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016361/* confdefs.h. */
16362_ACEOF
16363cat confdefs.h >>conftest.$ac_ext
16364cat >>conftest.$ac_ext <<_ACEOF
16365/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016366/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16367 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16368#define $ac_func innocuous_$ac_func
16369
Martin v. Löwis1142de32002-03-29 16:28:31 +000016370/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016371 which can conflict with char $ac_func (); below.
16372 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016373 <limits.h> exists even on freestanding compilers. */
16374
16375#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016376# include <limits.h>
16377#else
16378# include <assert.h>
16379#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016380
16381#undef $ac_func
16382
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016383/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016384#ifdef __cplusplus
16385extern "C"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016386{
Martin v. Löwis11437992002-04-12 09:54:03 +000016387#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016388/* We use char because int might match the return type of a gcc2
16389 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016390char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000016391/* The GNU C library defines this for functions which it implements
16392 to always fail with ENOSYS. Some functions are actually named
16393 something starting with __ and the normal name is an alias. */
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016394#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Martin v. Löwis1142de32002-03-29 16:28:31 +000016395choke me
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016396#else
16397char (*f) () = $ac_func;
16398#endif
16399#ifdef __cplusplus
16400}
Martin v. Löwis1142de32002-03-29 16:28:31 +000016401#endif
16402
Skip Montanaro6dead952003-09-25 14:50:04 +000016403int
16404main ()
16405{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016406return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016407 ;
16408 return 0;
16409}
16410_ACEOF
16411rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016412if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16413 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016414 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016415 grep -v '^ *+' conftest.er1 >conftest.err
16416 rm -f conftest.er1
16417 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016419 (exit $ac_status); } &&
16420 { ac_try='test -z "$ac_c_werror_flag"
16421 || test ! -s conftest.err'
16422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16423 (eval $ac_try) 2>&5
16424 ac_status=$?
16425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16426 (exit $ac_status); }; } &&
16427 { ac_try='test -s conftest$ac_exeext'
16428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16429 (eval $ac_try) 2>&5
16430 ac_status=$?
16431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16432 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016433 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016434else
Martin v. Löwis11437992002-04-12 09:54:03 +000016435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016436sed 's/^/| /' conftest.$ac_ext >&5
16437
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016438eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016439fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016440rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016441 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016442fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016443echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16444echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016445if test `eval echo '${'$as_ac_var'}'` = yes; then
16446 cat >>confdefs.h <<_ACEOF
16447#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16448_ACEOF
16449 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016450/* confdefs.h. */
16451_ACEOF
16452cat confdefs.h >>conftest.$ac_ext
16453cat >>conftest.$ac_ext <<_ACEOF
16454/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016455#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016456int
16457main ()
16458{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016459getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000016460 ;
16461 return 0;
16462}
16463_ACEOF
16464rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016465if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16466 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016467 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016468 grep -v '^ *+' conftest.er1 >conftest.err
16469 rm -f conftest.er1
16470 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016472 (exit $ac_status); } &&
16473 { ac_try='test -z "$ac_c_werror_flag"
16474 || test ! -s conftest.err'
16475 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16476 (eval $ac_try) 2>&5
16477 ac_status=$?
16478 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16479 (exit $ac_status); }; } &&
16480 { ac_try='test -s conftest.$ac_objext'
16481 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16482 (eval $ac_try) 2>&5
16483 ac_status=$?
16484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16485 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016486
16487cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016488#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016489_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016490
Martin v. Löwis11437992002-04-12 09:54:03 +000016491
Guido van Rossumf78abae1997-01-21 22:02:36 +000016492else
Martin v. Löwis11437992002-04-12 09:54:03 +000016493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016494sed 's/^/| /' conftest.$ac_ext >&5
16495
Guido van Rossum627b2d71993-12-24 10:39:16 +000016496fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016497rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016498
Guido van Rossum627b2d71993-12-24 10:39:16 +000016499fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016500done
Guido van Rossum627b2d71993-12-24 10:39:16 +000016501
Jack Jansen150753c2003-03-29 22:07:47 +000016502
16503for ac_func in setpgrp
16504do
16505as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016506echo "$as_me:$LINENO: checking for $ac_func" >&5
16507echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16508if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016509 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016510else
Martin v. Löwis11437992002-04-12 09:54:03 +000016511 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016512/* confdefs.h. */
16513_ACEOF
16514cat confdefs.h >>conftest.$ac_ext
16515cat >>conftest.$ac_ext <<_ACEOF
16516/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016517/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16518 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16519#define $ac_func innocuous_$ac_func
16520
Jack Jansen150753c2003-03-29 22:07:47 +000016521/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016522 which can conflict with char $ac_func (); below.
16523 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016524 <limits.h> exists even on freestanding compilers. */
16525
16526#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016527# include <limits.h>
16528#else
16529# include <assert.h>
16530#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016531
16532#undef $ac_func
16533
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016534/* Override any gcc2 internal prototype to avoid an error. */
Jack Jansen150753c2003-03-29 22:07:47 +000016535#ifdef __cplusplus
16536extern "C"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016537{
Martin v. Löwis11437992002-04-12 09:54:03 +000016538#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016539/* We use char because int might match the return type of a gcc2
16540 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000016541char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000016542/* The GNU C library defines this for functions which it implements
16543 to always fail with ENOSYS. Some functions are actually named
16544 something starting with __ and the normal name is an alias. */
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016545#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Jack Jansen150753c2003-03-29 22:07:47 +000016546choke me
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016547#else
16548char (*f) () = $ac_func;
16549#endif
16550#ifdef __cplusplus
16551}
Jack Jansen150753c2003-03-29 22:07:47 +000016552#endif
16553
Skip Montanaro6dead952003-09-25 14:50:04 +000016554int
16555main ()
16556{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016557return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016558 ;
16559 return 0;
16560}
16561_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000016562rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016563if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16564 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016566 grep -v '^ *+' conftest.er1 >conftest.err
16567 rm -f conftest.er1
16568 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016570 (exit $ac_status); } &&
16571 { ac_try='test -z "$ac_c_werror_flag"
16572 || test ! -s conftest.err'
16573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16574 (eval $ac_try) 2>&5
16575 ac_status=$?
16576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16577 (exit $ac_status); }; } &&
16578 { ac_try='test -s conftest$ac_exeext'
16579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16580 (eval $ac_try) 2>&5
16581 ac_status=$?
16582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16583 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000016584 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016585else
Jack Jansen150753c2003-03-29 22:07:47 +000016586 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016587sed 's/^/| /' conftest.$ac_ext >&5
16588
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016589eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016590fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016591rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016592 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016593fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016594echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16595echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Jack Jansen150753c2003-03-29 22:07:47 +000016596if test `eval echo '${'$as_ac_var'}'` = yes; then
16597 cat >>confdefs.h <<_ACEOF
16598#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16599_ACEOF
16600 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016601/* confdefs.h. */
16602_ACEOF
16603cat confdefs.h >>conftest.$ac_ext
16604cat >>conftest.$ac_ext <<_ACEOF
16605/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000016606#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000016607int
16608main ()
16609{
16610setpgrp(0,0);
16611 ;
16612 return 0;
16613}
16614_ACEOF
16615rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016616if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16617 (eval $ac_compile) 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000016618 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016619 grep -v '^ *+' conftest.er1 >conftest.err
16620 rm -f conftest.er1
16621 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000016622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016623 (exit $ac_status); } &&
16624 { ac_try='test -z "$ac_c_werror_flag"
16625 || test ! -s conftest.err'
16626 { (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); }; } &&
16631 { ac_try='test -s conftest.$ac_objext'
16632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16633 (eval $ac_try) 2>&5
16634 ac_status=$?
16635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16636 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016637
16638cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000016639#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016640_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000016641
Jack Jansen150753c2003-03-29 22:07:47 +000016642
16643else
16644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016645sed 's/^/| /' conftest.$ac_ext >&5
16646
Guido van Rossum8eee56f1994-10-20 22:18:37 +000016647fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016648rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000016649
16650fi
16651done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000016652
Martin v. Löwis11437992002-04-12 09:54:03 +000016653
Thomas Wouters3a584202000-08-05 23:28:51 +000016654for ac_func in gettimeofday
16655do
Martin v. Löwis11437992002-04-12 09:54:03 +000016656as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016657echo "$as_me:$LINENO: checking for $ac_func" >&5
16658echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16659if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016660 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016661else
Martin v. Löwis11437992002-04-12 09:54:03 +000016662 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016663/* confdefs.h. */
16664_ACEOF
16665cat confdefs.h >>conftest.$ac_ext
16666cat >>conftest.$ac_ext <<_ACEOF
16667/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016668/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16669 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16670#define $ac_func innocuous_$ac_func
16671
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016672/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016673 which can conflict with char $ac_func (); below.
16674 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016675 <limits.h> exists even on freestanding compilers. */
16676
16677#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016678# include <limits.h>
16679#else
16680# include <assert.h>
16681#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016682
16683#undef $ac_func
16684
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016685/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016686#ifdef __cplusplus
16687extern "C"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016688{
Martin v. Löwis11437992002-04-12 09:54:03 +000016689#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016690/* We use char because int might match the return type of a gcc2
16691 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016692char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016693/* The GNU C library defines this for functions which it implements
16694 to always fail with ENOSYS. Some functions are actually named
16695 something starting with __ and the normal name is an alias. */
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016696#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016697choke me
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016698#else
16699char (*f) () = $ac_func;
16700#endif
16701#ifdef __cplusplus
16702}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016703#endif
16704
Skip Montanaro6dead952003-09-25 14:50:04 +000016705int
16706main ()
16707{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016708return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016709 ;
16710 return 0;
16711}
16712_ACEOF
16713rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016714if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16715 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016716 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016717 grep -v '^ *+' conftest.er1 >conftest.err
16718 rm -f conftest.er1
16719 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016721 (exit $ac_status); } &&
16722 { ac_try='test -z "$ac_c_werror_flag"
16723 || test ! -s conftest.err'
16724 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16725 (eval $ac_try) 2>&5
16726 ac_status=$?
16727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16728 (exit $ac_status); }; } &&
16729 { ac_try='test -s conftest$ac_exeext'
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); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016735 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016736else
Martin v. Löwis11437992002-04-12 09:54:03 +000016737 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016738sed 's/^/| /' conftest.$ac_ext >&5
16739
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016740eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016741fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016742rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016743 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016744fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016745echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16746echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016747if test `eval echo '${'$as_ac_var'}'` = yes; then
16748 cat >>confdefs.h <<_ACEOF
16749#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16750_ACEOF
16751 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016752/* confdefs.h. */
16753_ACEOF
16754cat confdefs.h >>conftest.$ac_ext
16755cat >>conftest.$ac_ext <<_ACEOF
16756/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016757#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016758int
16759main ()
16760{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016761gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000016762 ;
16763 return 0;
16764}
16765_ACEOF
16766rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016767if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16768 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016770 grep -v '^ *+' conftest.er1 >conftest.err
16771 rm -f conftest.er1
16772 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016774 (exit $ac_status); } &&
16775 { ac_try='test -z "$ac_c_werror_flag"
16776 || test ! -s conftest.err'
16777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16778 (eval $ac_try) 2>&5
16779 ac_status=$?
16780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16781 (exit $ac_status); }; } &&
16782 { ac_try='test -s conftest.$ac_objext'
16783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16784 (eval $ac_try) 2>&5
16785 ac_status=$?
16786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16787 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000016788 :
16789else
Martin v. Löwis11437992002-04-12 09:54:03 +000016790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016791sed 's/^/| /' conftest.$ac_ext >&5
16792
Martin v. Löwis11437992002-04-12 09:54:03 +000016793
16794cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016795#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016796_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016797
Martin v. Löwis11437992002-04-12 09:54:03 +000016798
Guido van Rossum627b2d71993-12-24 10:39:16 +000016799fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016800rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016801
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016802fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016803done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016804
Michael W. Hudson54241132001-12-07 15:38:26 +000016805
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016806echo "$as_me:$LINENO: checking for major" >&5
16807echo $ECHO_N "checking for major... $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016808cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016809/* confdefs.h. */
16810_ACEOF
16811cat confdefs.h >>conftest.$ac_ext
16812cat >>conftest.$ac_ext <<_ACEOF
16813/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016814
Neal Norwitz6eb37f02003-02-23 23:28:15 +000016815#if defined(MAJOR_IN_MKDEV)
16816#include <sys/mkdev.h>
16817#elif defined(MAJOR_IN_SYSMACROS)
16818#include <sys/sysmacros.h>
16819#else
16820#include <sys/types.h>
16821#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016822
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016823int
16824main ()
16825{
16826
16827 makedev(major(0),minor(0));
16828
16829 ;
16830 return 0;
16831}
16832_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000016833rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016834if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16835 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016836 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016837 grep -v '^ *+' conftest.er1 >conftest.err
16838 rm -f conftest.er1
16839 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016841 (exit $ac_status); } &&
16842 { ac_try='test -z "$ac_c_werror_flag"
16843 || test ! -s conftest.err'
16844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16845 (eval $ac_try) 2>&5
16846 ac_status=$?
16847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16848 (exit $ac_status); }; } &&
16849 { ac_try='test -s conftest$ac_exeext'
16850 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16851 (eval $ac_try) 2>&5
16852 ac_status=$?
16853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16854 (exit $ac_status); }; }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016855
16856
16857cat >>confdefs.h <<\_ACEOF
16858#define HAVE_DEVICE_MACROS 1
16859_ACEOF
16860
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016861 echo "$as_me:$LINENO: result: yes" >&5
16862echo "${ECHO_T}yes" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016863
16864else
16865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016866sed 's/^/| /' conftest.$ac_ext >&5
16867
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016868
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016869 echo "$as_me:$LINENO: result: no" >&5
16870echo "${ECHO_T}no" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000016871
16872fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016873rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016874 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016875
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016876# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000016877# for [no]getaddrinfo in netdb.h.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016878echo "$as_me:$LINENO: checking for getaddrinfo" >&5
16879echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016880cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016881/* confdefs.h. */
16882_ACEOF
16883cat confdefs.h >>conftest.$ac_ext
16884cat >>conftest.$ac_ext <<_ACEOF
16885/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016886
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000016887#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016888#include <sys/socket.h>
16889#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000016890#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016891
Martin v. Löwis11437992002-04-12 09:54:03 +000016892int
16893main ()
16894{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016895
Martin v. Löwis861a65b2001-10-24 14:36:00 +000016896getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016897
Martin v. Löwis11437992002-04-12 09:54:03 +000016898 ;
16899 return 0;
16900}
16901_ACEOF
16902rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016903if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16904 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016905 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016906 grep -v '^ *+' conftest.er1 >conftest.err
16907 rm -f conftest.er1
16908 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016910 (exit $ac_status); } &&
16911 { ac_try='test -z "$ac_c_werror_flag"
16912 || test ! -s conftest.err'
16913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16914 (eval $ac_try) 2>&5
16915 ac_status=$?
16916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16917 (exit $ac_status); }; } &&
16918 { ac_try='test -s conftest$ac_exeext'
16919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16920 (eval $ac_try) 2>&5
16921 ac_status=$?
16922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16923 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016924
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016925echo "$as_me:$LINENO: result: yes" >&5
16926echo "${ECHO_T}yes" >&6
16927echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
16928echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016929if test "$cross_compiling" = yes; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000016930 echo "$as_me:$LINENO: result: buggy" >&5
16931echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016932buggygetaddrinfo=yes
16933else
Martin v. Löwis11437992002-04-12 09:54:03 +000016934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016935/* confdefs.h. */
16936_ACEOF
16937cat confdefs.h >>conftest.$ac_ext
16938cat >>conftest.$ac_ext <<_ACEOF
16939/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016940
16941#include <sys/types.h>
16942#include <netdb.h>
16943#include <string.h>
16944#include <sys/socket.h>
16945#include <netinet/in.h>
16946
16947main()
16948{
16949 int passive, gaierr, inet4 = 0, inet6 = 0;
16950 struct addrinfo hints, *ai, *aitop;
16951 char straddr[INET6_ADDRSTRLEN], strport[16];
16952
16953 for (passive = 0; passive <= 1; passive++) {
16954 memset(&hints, 0, sizeof(hints));
16955 hints.ai_family = AF_UNSPEC;
16956 hints.ai_flags = passive ? AI_PASSIVE : 0;
16957 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000016958 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016959 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
16960 (void)gai_strerror(gaierr);
16961 goto bad;
16962 }
16963 for (ai = aitop; ai; ai = ai->ai_next) {
16964 if (ai->ai_addr == NULL ||
16965 ai->ai_addrlen == 0 ||
16966 getnameinfo(ai->ai_addr, ai->ai_addrlen,
16967 straddr, sizeof(straddr), strport, sizeof(strport),
16968 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
16969 goto bad;
16970 }
16971 switch (ai->ai_family) {
16972 case AF_INET:
16973 if (strcmp(strport, "54321") != 0) {
16974 goto bad;
16975 }
16976 if (passive) {
16977 if (strcmp(straddr, "0.0.0.0") != 0) {
16978 goto bad;
16979 }
16980 } else {
16981 if (strcmp(straddr, "127.0.0.1") != 0) {
16982 goto bad;
16983 }
16984 }
16985 inet4++;
16986 break;
16987 case AF_INET6:
16988 if (strcmp(strport, "54321") != 0) {
16989 goto bad;
16990 }
16991 if (passive) {
16992 if (strcmp(straddr, "::") != 0) {
16993 goto bad;
16994 }
16995 } else {
16996 if (strcmp(straddr, "::1") != 0) {
16997 goto bad;
16998 }
16999 }
17000 inet6++;
17001 break;
17002 case AF_UNSPEC:
17003 goto bad;
17004 break;
17005 default:
17006 /* another family support? */
17007 break;
17008 }
17009 }
17010 }
17011
17012 if (!(inet4 == 0 || inet4 == 2))
17013 goto bad;
17014 if (!(inet6 == 0 || inet6 == 2))
17015 goto bad;
17016
17017 if (aitop)
17018 freeaddrinfo(aitop);
17019 exit(0);
17020
17021 bad:
17022 if (aitop)
17023 freeaddrinfo(aitop);
17024 exit(1);
17025}
17026
Martin v. Löwis11437992002-04-12 09:54:03 +000017027_ACEOF
17028rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017029if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17030 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017031 ac_status=$?
17032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17033 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17035 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017036 ac_status=$?
17037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17038 (exit $ac_status); }; }; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017039 echo "$as_me:$LINENO: result: good" >&5
17040echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017041buggygetaddrinfo=no
17042else
Martin v. Löwis11437992002-04-12 09:54:03 +000017043 echo "$as_me: program exited with status $ac_status" >&5
17044echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017045sed 's/^/| /' conftest.$ac_ext >&5
17046
Martin v. Löwis11437992002-04-12 09:54:03 +000017047( exit $ac_status )
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017048echo "$as_me:$LINENO: result: buggy" >&5
17049echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017050buggygetaddrinfo=yes
17051fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017052rm -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 +000017053fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017054else
Martin v. Löwis11437992002-04-12 09:54:03 +000017055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017056sed 's/^/| /' conftest.$ac_ext >&5
17057
Martin v. Löwis11437992002-04-12 09:54:03 +000017058
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017059echo "$as_me:$LINENO: result: no" >&5
17060echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017061buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017062
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017063fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017064rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017065 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017066
17067if test "$buggygetaddrinfo" = "yes"; then
17068 if test "$ipv6" = "yes"; then
17069 echo 'Fatal: You must get working getaddrinfo() function.'
17070 echo ' or you can specify "--disable-ipv6"'.
17071 exit 1
17072 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017073else
Martin v. Löwis11437992002-04-12 09:54:03 +000017074
17075cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017076#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017077_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017078
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017079fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017080
Jack Jansen9a66b6d2001-08-08 13:56:14 +000017081for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017082do
Martin v. Löwis11437992002-04-12 09:54:03 +000017083as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017084echo "$as_me:$LINENO: checking for $ac_func" >&5
17085echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17086if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017087 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017088else
Martin v. Löwis11437992002-04-12 09:54:03 +000017089 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017090/* confdefs.h. */
17091_ACEOF
17092cat confdefs.h >>conftest.$ac_ext
17093cat >>conftest.$ac_ext <<_ACEOF
17094/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017095/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17096 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17097#define $ac_func innocuous_$ac_func
17098
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017099/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017100 which can conflict with char $ac_func (); below.
17101 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017102 <limits.h> exists even on freestanding compilers. */
17103
17104#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017105# include <limits.h>
17106#else
17107# include <assert.h>
17108#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017109
17110#undef $ac_func
17111
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017112/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017113#ifdef __cplusplus
17114extern "C"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017115{
Martin v. Löwis11437992002-04-12 09:54:03 +000017116#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017117/* We use char because int might match the return type of a gcc2
17118 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017119char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017120/* The GNU C library defines this for functions which it implements
17121 to always fail with ENOSYS. Some functions are actually named
17122 something starting with __ and the normal name is an alias. */
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017123#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017124choke me
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017125#else
17126char (*f) () = $ac_func;
17127#endif
17128#ifdef __cplusplus
17129}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017130#endif
17131
Skip Montanaro6dead952003-09-25 14:50:04 +000017132int
17133main ()
17134{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017135return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000017136 ;
17137 return 0;
17138}
17139_ACEOF
17140rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017141if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17142 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017144 grep -v '^ *+' conftest.er1 >conftest.err
17145 rm -f conftest.er1
17146 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017148 (exit $ac_status); } &&
17149 { ac_try='test -z "$ac_c_werror_flag"
17150 || test ! -s conftest.err'
17151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17152 (eval $ac_try) 2>&5
17153 ac_status=$?
17154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17155 (exit $ac_status); }; } &&
17156 { ac_try='test -s conftest$ac_exeext'
17157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17158 (eval $ac_try) 2>&5
17159 ac_status=$?
17160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17161 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017162 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017163else
Martin v. Löwis11437992002-04-12 09:54:03 +000017164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017165sed 's/^/| /' conftest.$ac_ext >&5
17166
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017167eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017168fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017169rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017170 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017171fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017172echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17173echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000017174if test `eval echo '${'$as_ac_var'}'` = yes; then
17175 cat >>confdefs.h <<_ACEOF
17176#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17177_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017178
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017179fi
17180done
17181
Michael W. Hudson54241132001-12-07 15:38:26 +000017182
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017183# checks for structures
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017184echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
17185echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000017186if test "${ac_cv_header_time+set}" = set; then
17187 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017188else
Martin v. Löwis11437992002-04-12 09:54:03 +000017189 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017190/* confdefs.h. */
17191_ACEOF
17192cat confdefs.h >>conftest.$ac_ext
17193cat >>conftest.$ac_ext <<_ACEOF
17194/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017195#include <sys/types.h>
17196#include <sys/time.h>
17197#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017198
Martin v. Löwis11437992002-04-12 09:54:03 +000017199int
17200main ()
17201{
17202if ((struct tm *) 0)
17203return 0;
17204 ;
17205 return 0;
17206}
17207_ACEOF
17208rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017209if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17210 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017211 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017212 grep -v '^ *+' conftest.er1 >conftest.err
17213 rm -f conftest.er1
17214 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017216 (exit $ac_status); } &&
17217 { ac_try='test -z "$ac_c_werror_flag"
17218 || test ! -s conftest.err'
17219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17220 (eval $ac_try) 2>&5
17221 ac_status=$?
17222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17223 (exit $ac_status); }; } &&
17224 { ac_try='test -s conftest.$ac_objext'
17225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17226 (eval $ac_try) 2>&5
17227 ac_status=$?
17228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17229 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017230 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017231else
Martin v. Löwis11437992002-04-12 09:54:03 +000017232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017233sed 's/^/| /' conftest.$ac_ext >&5
17234
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017235ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017236fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017237rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017238fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017239echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
17240echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017241if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017242
17243cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017244#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017245_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017246
17247fi
17248
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017249echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
17250echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000017251if test "${ac_cv_struct_tm+set}" = set; then
17252 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017253else
Martin v. Löwis11437992002-04-12 09:54:03 +000017254 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017255/* confdefs.h. */
17256_ACEOF
17257cat confdefs.h >>conftest.$ac_ext
17258cat >>conftest.$ac_ext <<_ACEOF
17259/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017260#include <sys/types.h>
17261#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017262
Martin v. Löwis11437992002-04-12 09:54:03 +000017263int
17264main ()
17265{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017266struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000017267 ;
17268 return 0;
17269}
17270_ACEOF
17271rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017272if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17273 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017274 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017275 grep -v '^ *+' conftest.er1 >conftest.err
17276 rm -f conftest.er1
17277 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017279 (exit $ac_status); } &&
17280 { ac_try='test -z "$ac_c_werror_flag"
17281 || test ! -s conftest.err'
17282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17283 (eval $ac_try) 2>&5
17284 ac_status=$?
17285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17286 (exit $ac_status); }; } &&
17287 { ac_try='test -s conftest.$ac_objext'
17288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17289 (eval $ac_try) 2>&5
17290 ac_status=$?
17291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17292 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017293 ac_cv_struct_tm=time.h
17294else
Martin v. Löwis11437992002-04-12 09:54:03 +000017295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017296sed 's/^/| /' conftest.$ac_ext >&5
17297
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017298ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017299fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017300rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017301fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017302echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
17303echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017304if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017305
17306cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017307#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017308_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017309
17310fi
17311
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017312echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
17313echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000017314if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
17315 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017316else
Martin v. Löwis11437992002-04-12 09:54:03 +000017317 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017318/* confdefs.h. */
17319_ACEOF
17320cat confdefs.h >>conftest.$ac_ext
17321cat >>conftest.$ac_ext <<_ACEOF
17322/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017323#include <sys/types.h>
17324#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000017325
17326
Martin v. Löwis11437992002-04-12 09:54:03 +000017327int
17328main ()
17329{
17330static struct tm ac_aggr;
17331if (ac_aggr.tm_zone)
17332return 0;
17333 ;
17334 return 0;
17335}
17336_ACEOF
17337rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17339 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017341 grep -v '^ *+' conftest.er1 >conftest.err
17342 rm -f conftest.er1
17343 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017345 (exit $ac_status); } &&
17346 { ac_try='test -z "$ac_c_werror_flag"
17347 || test ! -s conftest.err'
17348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17349 (eval $ac_try) 2>&5
17350 ac_status=$?
17351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17352 (exit $ac_status); }; } &&
17353 { ac_try='test -s conftest.$ac_objext'
17354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17355 (eval $ac_try) 2>&5
17356 ac_status=$?
17357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17358 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017359 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000017360else
Martin v. Löwis11437992002-04-12 09:54:03 +000017361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017362sed 's/^/| /' conftest.$ac_ext >&5
17363
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017364cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017365/* confdefs.h. */
17366_ACEOF
17367cat confdefs.h >>conftest.$ac_ext
17368cat >>conftest.$ac_ext <<_ACEOF
17369/* end confdefs.h. */
17370#include <sys/types.h>
17371#include <$ac_cv_struct_tm>
17372
17373
17374int
17375main ()
17376{
17377static struct tm ac_aggr;
17378if (sizeof ac_aggr.tm_zone)
17379return 0;
17380 ;
17381 return 0;
17382}
17383_ACEOF
17384rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017385if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17386 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000017387 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017388 grep -v '^ *+' conftest.er1 >conftest.err
17389 rm -f conftest.er1
17390 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017392 (exit $ac_status); } &&
17393 { ac_try='test -z "$ac_c_werror_flag"
17394 || test ! -s conftest.err'
17395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17396 (eval $ac_try) 2>&5
17397 ac_status=$?
17398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17399 (exit $ac_status); }; } &&
17400 { ac_try='test -s conftest.$ac_objext'
17401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17402 (eval $ac_try) 2>&5
17403 ac_status=$?
17404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17405 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017406 ac_cv_member_struct_tm_tm_zone=yes
17407else
17408 echo "$as_me: failed program was:" >&5
17409sed 's/^/| /' conftest.$ac_ext >&5
17410
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017411ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000017412fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017413rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017414fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017415rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017416fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017417echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
17418echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000017419if test $ac_cv_member_struct_tm_tm_zone = yes; then
17420
17421cat >>confdefs.h <<_ACEOF
17422#define HAVE_STRUCT_TM_TM_ZONE 1
17423_ACEOF
17424
17425
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017426fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017427
Martin v. Löwis11437992002-04-12 09:54:03 +000017428if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
17429
17430cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017431#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017432_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017433
17434else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017435 echo "$as_me:$LINENO: checking for tzname" >&5
17436echo $ECHO_N "checking for tzname... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000017437if test "${ac_cv_var_tzname+set}" = set; then
17438 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017439else
Martin v. Löwis11437992002-04-12 09:54:03 +000017440 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017441/* confdefs.h. */
17442_ACEOF
17443cat confdefs.h >>conftest.$ac_ext
17444cat >>conftest.$ac_ext <<_ACEOF
17445/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017446#include <time.h>
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017447#ifndef tzname /* For SGI. */
17448extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017449#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017450
Martin v. Löwis11437992002-04-12 09:54:03 +000017451int
17452main ()
17453{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017454atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000017455 ;
17456 return 0;
17457}
17458_ACEOF
17459rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017460if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17461 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017462 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017463 grep -v '^ *+' conftest.er1 >conftest.err
17464 rm -f conftest.er1
17465 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017467 (exit $ac_status); } &&
17468 { ac_try='test -z "$ac_c_werror_flag"
17469 || test ! -s conftest.err'
17470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17471 (eval $ac_try) 2>&5
17472 ac_status=$?
17473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17474 (exit $ac_status); }; } &&
17475 { ac_try='test -s conftest$ac_exeext'
17476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17477 (eval $ac_try) 2>&5
17478 ac_status=$?
17479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17480 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017481 ac_cv_var_tzname=yes
17482else
Martin v. Löwis11437992002-04-12 09:54:03 +000017483 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017484sed 's/^/| /' conftest.$ac_ext >&5
17485
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017486ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017487fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017488rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017489 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000017490fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017491echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
17492echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017493 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017494
17495cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017496#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017497_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017498
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017499 fi
17500fi
17501
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017502echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
17503echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000017504if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
17505 echo $ECHO_N "(cached) $ECHO_C" >&6
17506else
17507 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017508/* confdefs.h. */
17509_ACEOF
17510cat confdefs.h >>conftest.$ac_ext
17511cat >>conftest.$ac_ext <<_ACEOF
17512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017513$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017514int
17515main ()
17516{
17517static struct stat ac_aggr;
17518if (ac_aggr.st_rdev)
17519return 0;
17520 ;
17521 return 0;
17522}
17523_ACEOF
17524rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017525if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17526 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017527 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017528 grep -v '^ *+' conftest.er1 >conftest.err
17529 rm -f conftest.er1
17530 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017531 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017532 (exit $ac_status); } &&
17533 { ac_try='test -z "$ac_c_werror_flag"
17534 || test ! -s conftest.err'
17535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17536 (eval $ac_try) 2>&5
17537 ac_status=$?
17538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17539 (exit $ac_status); }; } &&
17540 { ac_try='test -s conftest.$ac_objext'
17541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17542 (eval $ac_try) 2>&5
17543 ac_status=$?
17544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17545 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017546 ac_cv_member_struct_stat_st_rdev=yes
17547else
17548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017549sed 's/^/| /' conftest.$ac_ext >&5
17550
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017551cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017552/* confdefs.h. */
17553_ACEOF
17554cat confdefs.h >>conftest.$ac_ext
17555cat >>conftest.$ac_ext <<_ACEOF
17556/* end confdefs.h. */
17557$ac_includes_default
17558int
17559main ()
17560{
17561static struct stat ac_aggr;
17562if (sizeof ac_aggr.st_rdev)
17563return 0;
17564 ;
17565 return 0;
17566}
17567_ACEOF
17568rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017569if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17570 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000017571 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017572 grep -v '^ *+' conftest.er1 >conftest.err
17573 rm -f conftest.er1
17574 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017576 (exit $ac_status); } &&
17577 { ac_try='test -z "$ac_c_werror_flag"
17578 || test ! -s conftest.err'
17579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17580 (eval $ac_try) 2>&5
17581 ac_status=$?
17582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17583 (exit $ac_status); }; } &&
17584 { ac_try='test -s conftest.$ac_objext'
17585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17586 (eval $ac_try) 2>&5
17587 ac_status=$?
17588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17589 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017590 ac_cv_member_struct_stat_st_rdev=yes
17591else
17592 echo "$as_me: failed program was:" >&5
17593sed 's/^/| /' conftest.$ac_ext >&5
17594
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017595ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017596fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017597rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017598fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017599rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017600fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017601echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
17602echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000017603if test $ac_cv_member_struct_stat_st_rdev = yes; then
17604
17605cat >>confdefs.h <<_ACEOF
17606#define HAVE_STRUCT_STAT_ST_RDEV 1
17607_ACEOF
17608
17609
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017610fi
17611
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017612echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
17613echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000017614if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
17615 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017616else
Martin v. Löwis11437992002-04-12 09:54:03 +000017617 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017618/* confdefs.h. */
17619_ACEOF
17620cat confdefs.h >>conftest.$ac_ext
17621cat >>conftest.$ac_ext <<_ACEOF
17622/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017623$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017624int
17625main ()
17626{
17627static struct stat ac_aggr;
17628if (ac_aggr.st_blksize)
17629return 0;
17630 ;
17631 return 0;
17632}
17633_ACEOF
17634rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17636 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017637 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017638 grep -v '^ *+' conftest.er1 >conftest.err
17639 rm -f conftest.er1
17640 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017642 (exit $ac_status); } &&
17643 { ac_try='test -z "$ac_c_werror_flag"
17644 || test ! -s conftest.err'
17645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17646 (eval $ac_try) 2>&5
17647 ac_status=$?
17648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17649 (exit $ac_status); }; } &&
17650 { ac_try='test -s conftest.$ac_objext'
17651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17652 (eval $ac_try) 2>&5
17653 ac_status=$?
17654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17655 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017656 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000017657else
Martin v. Löwis11437992002-04-12 09:54:03 +000017658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017659sed 's/^/| /' conftest.$ac_ext >&5
17660
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017661cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017662/* confdefs.h. */
17663_ACEOF
17664cat confdefs.h >>conftest.$ac_ext
17665cat >>conftest.$ac_ext <<_ACEOF
17666/* end confdefs.h. */
17667$ac_includes_default
17668int
17669main ()
17670{
17671static struct stat ac_aggr;
17672if (sizeof ac_aggr.st_blksize)
17673return 0;
17674 ;
17675 return 0;
17676}
17677_ACEOF
17678rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017679if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17680 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000017681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017682 grep -v '^ *+' conftest.er1 >conftest.err
17683 rm -f conftest.er1
17684 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017686 (exit $ac_status); } &&
17687 { ac_try='test -z "$ac_c_werror_flag"
17688 || test ! -s conftest.err'
17689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17690 (eval $ac_try) 2>&5
17691 ac_status=$?
17692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17693 (exit $ac_status); }; } &&
17694 { ac_try='test -s conftest.$ac_objext'
17695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17696 (eval $ac_try) 2>&5
17697 ac_status=$?
17698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17699 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017700 ac_cv_member_struct_stat_st_blksize=yes
17701else
17702 echo "$as_me: failed program was:" >&5
17703sed 's/^/| /' conftest.$ac_ext >&5
17704
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017705ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000017706fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017707rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017708fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017709rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017710fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017711echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
17712echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000017713if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000017714
Martin v. Löwis11437992002-04-12 09:54:03 +000017715cat >>confdefs.h <<_ACEOF
17716#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
17717_ACEOF
17718
17719
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017720fi
17721
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017722echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
17723echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000017724if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
17725 echo $ECHO_N "(cached) $ECHO_C" >&6
17726else
17727 cat >conftest.$ac_ext <<_ACEOF
17728/* confdefs.h. */
17729_ACEOF
17730cat confdefs.h >>conftest.$ac_ext
17731cat >>conftest.$ac_ext <<_ACEOF
17732/* end confdefs.h. */
17733$ac_includes_default
17734int
17735main ()
17736{
17737static struct stat ac_aggr;
17738if (ac_aggr.st_flags)
17739return 0;
17740 ;
17741 return 0;
17742}
17743_ACEOF
17744rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017745if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17746 (eval $ac_compile) 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000017747 ac_status=$?
17748 grep -v '^ *+' conftest.er1 >conftest.err
17749 rm -f conftest.er1
17750 cat conftest.err >&5
17751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017752 (exit $ac_status); } &&
17753 { ac_try='test -z "$ac_c_werror_flag"
17754 || test ! -s conftest.err'
17755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17756 (eval $ac_try) 2>&5
17757 ac_status=$?
17758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17759 (exit $ac_status); }; } &&
17760 { ac_try='test -s conftest.$ac_objext'
17761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17762 (eval $ac_try) 2>&5
17763 ac_status=$?
17764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17765 (exit $ac_status); }; }; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000017766 ac_cv_member_struct_stat_st_flags=yes
17767else
17768 echo "$as_me: failed program was:" >&5
17769sed 's/^/| /' conftest.$ac_ext >&5
17770
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017771cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000017772/* confdefs.h. */
17773_ACEOF
17774cat confdefs.h >>conftest.$ac_ext
17775cat >>conftest.$ac_ext <<_ACEOF
17776/* end confdefs.h. */
17777$ac_includes_default
17778int
17779main ()
17780{
17781static struct stat ac_aggr;
17782if (sizeof ac_aggr.st_flags)
17783return 0;
17784 ;
17785 return 0;
17786}
17787_ACEOF
17788rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017789if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17790 (eval $ac_compile) 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000017791 ac_status=$?
17792 grep -v '^ *+' conftest.er1 >conftest.err
17793 rm -f conftest.er1
17794 cat conftest.err >&5
17795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017796 (exit $ac_status); } &&
17797 { ac_try='test -z "$ac_c_werror_flag"
17798 || test ! -s conftest.err'
17799 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17800 (eval $ac_try) 2>&5
17801 ac_status=$?
17802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17803 (exit $ac_status); }; } &&
17804 { ac_try='test -s conftest.$ac_objext'
17805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17806 (eval $ac_try) 2>&5
17807 ac_status=$?
17808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17809 (exit $ac_status); }; }; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000017810 ac_cv_member_struct_stat_st_flags=yes
17811else
17812 echo "$as_me: failed program was:" >&5
17813sed 's/^/| /' conftest.$ac_ext >&5
17814
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017815ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000017816fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017817rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000017818fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017819rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000017820fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017821echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
17822echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000017823if test $ac_cv_member_struct_stat_st_flags = yes; then
17824
17825cat >>confdefs.h <<_ACEOF
17826#define HAVE_STRUCT_STAT_ST_FLAGS 1
17827_ACEOF
17828
17829
17830fi
17831
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017832echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
17833echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017834if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
17835 echo $ECHO_N "(cached) $ECHO_C" >&6
17836else
17837 cat >conftest.$ac_ext <<_ACEOF
17838/* confdefs.h. */
17839_ACEOF
17840cat confdefs.h >>conftest.$ac_ext
17841cat >>conftest.$ac_ext <<_ACEOF
17842/* end confdefs.h. */
17843$ac_includes_default
17844int
17845main ()
17846{
17847static struct stat ac_aggr;
17848if (ac_aggr.st_gen)
17849return 0;
17850 ;
17851 return 0;
17852}
17853_ACEOF
17854rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017855if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17856 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017857 ac_status=$?
17858 grep -v '^ *+' conftest.er1 >conftest.err
17859 rm -f conftest.er1
17860 cat conftest.err >&5
17861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017862 (exit $ac_status); } &&
17863 { ac_try='test -z "$ac_c_werror_flag"
17864 || test ! -s conftest.err'
17865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17866 (eval $ac_try) 2>&5
17867 ac_status=$?
17868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17869 (exit $ac_status); }; } &&
17870 { ac_try='test -s conftest.$ac_objext'
17871 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17872 (eval $ac_try) 2>&5
17873 ac_status=$?
17874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17875 (exit $ac_status); }; }; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017876 ac_cv_member_struct_stat_st_gen=yes
17877else
17878 echo "$as_me: failed program was:" >&5
17879sed 's/^/| /' conftest.$ac_ext >&5
17880
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017881cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017882/* confdefs.h. */
17883_ACEOF
17884cat confdefs.h >>conftest.$ac_ext
17885cat >>conftest.$ac_ext <<_ACEOF
17886/* end confdefs.h. */
17887$ac_includes_default
17888int
17889main ()
17890{
17891static struct stat ac_aggr;
17892if (sizeof ac_aggr.st_gen)
17893return 0;
17894 ;
17895 return 0;
17896}
17897_ACEOF
17898rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017899if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17900 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017901 ac_status=$?
17902 grep -v '^ *+' conftest.er1 >conftest.err
17903 rm -f conftest.er1
17904 cat conftest.err >&5
17905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017906 (exit $ac_status); } &&
17907 { ac_try='test -z "$ac_c_werror_flag"
17908 || test ! -s conftest.err'
17909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17910 (eval $ac_try) 2>&5
17911 ac_status=$?
17912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17913 (exit $ac_status); }; } &&
17914 { ac_try='test -s conftest.$ac_objext'
17915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17916 (eval $ac_try) 2>&5
17917 ac_status=$?
17918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17919 (exit $ac_status); }; }; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017920 ac_cv_member_struct_stat_st_gen=yes
17921else
17922 echo "$as_me: failed program was:" >&5
17923sed 's/^/| /' conftest.$ac_ext >&5
17924
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017925ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017926fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017927rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017928fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017929rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017930fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017931echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
17932echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017933if test $ac_cv_member_struct_stat_st_gen = yes; then
17934
17935cat >>confdefs.h <<_ACEOF
17936#define HAVE_STRUCT_STAT_ST_GEN 1
17937_ACEOF
17938
17939
17940fi
17941
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017942echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
17943echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017944if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
17945 echo $ECHO_N "(cached) $ECHO_C" >&6
17946else
17947 cat >conftest.$ac_ext <<_ACEOF
17948/* confdefs.h. */
17949_ACEOF
17950cat confdefs.h >>conftest.$ac_ext
17951cat >>conftest.$ac_ext <<_ACEOF
17952/* end confdefs.h. */
17953$ac_includes_default
17954int
17955main ()
17956{
17957static struct stat ac_aggr;
17958if (ac_aggr.st_birthtime)
17959return 0;
17960 ;
17961 return 0;
17962}
17963_ACEOF
17964rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017965if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17966 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017967 ac_status=$?
17968 grep -v '^ *+' conftest.er1 >conftest.err
17969 rm -f conftest.er1
17970 cat conftest.err >&5
17971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017972 (exit $ac_status); } &&
17973 { ac_try='test -z "$ac_c_werror_flag"
17974 || test ! -s conftest.err'
17975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17976 (eval $ac_try) 2>&5
17977 ac_status=$?
17978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17979 (exit $ac_status); }; } &&
17980 { ac_try='test -s conftest.$ac_objext'
17981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17982 (eval $ac_try) 2>&5
17983 ac_status=$?
17984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17985 (exit $ac_status); }; }; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017986 ac_cv_member_struct_stat_st_birthtime=yes
17987else
17988 echo "$as_me: failed program was:" >&5
17989sed 's/^/| /' conftest.$ac_ext >&5
17990
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000017991cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000017992/* confdefs.h. */
17993_ACEOF
17994cat confdefs.h >>conftest.$ac_ext
17995cat >>conftest.$ac_ext <<_ACEOF
17996/* end confdefs.h. */
17997$ac_includes_default
17998int
17999main ()
18000{
18001static struct stat ac_aggr;
18002if (sizeof ac_aggr.st_birthtime)
18003return 0;
18004 ;
18005 return 0;
18006}
18007_ACEOF
18008rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018009if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18010 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018011 ac_status=$?
18012 grep -v '^ *+' conftest.er1 >conftest.err
18013 rm -f conftest.er1
18014 cat conftest.err >&5
18015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018016 (exit $ac_status); } &&
18017 { ac_try='test -z "$ac_c_werror_flag"
18018 || test ! -s conftest.err'
18019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18020 (eval $ac_try) 2>&5
18021 ac_status=$?
18022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18023 (exit $ac_status); }; } &&
18024 { ac_try='test -s conftest.$ac_objext'
18025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18026 (eval $ac_try) 2>&5
18027 ac_status=$?
18028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18029 (exit $ac_status); }; }; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018030 ac_cv_member_struct_stat_st_birthtime=yes
18031else
18032 echo "$as_me: failed program was:" >&5
18033sed 's/^/| /' conftest.$ac_ext >&5
18034
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018035ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018036fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018037rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018038fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018039rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018040fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018041echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
18042echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018043if test $ac_cv_member_struct_stat_st_birthtime = yes; then
18044
18045cat >>confdefs.h <<_ACEOF
18046#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
18047_ACEOF
18048
18049
18050fi
18051
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018052echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
18053echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018054if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
18055 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018056else
Martin v. Löwis11437992002-04-12 09:54:03 +000018057 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018058/* confdefs.h. */
18059_ACEOF
18060cat confdefs.h >>conftest.$ac_ext
18061cat >>conftest.$ac_ext <<_ACEOF
18062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018063$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018064int
18065main ()
18066{
18067static struct stat ac_aggr;
18068if (ac_aggr.st_blocks)
18069return 0;
18070 ;
18071 return 0;
18072}
18073_ACEOF
18074rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018075if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18076 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018077 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018078 grep -v '^ *+' conftest.er1 >conftest.err
18079 rm -f conftest.er1
18080 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018082 (exit $ac_status); } &&
18083 { ac_try='test -z "$ac_c_werror_flag"
18084 || test ! -s conftest.err'
18085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18086 (eval $ac_try) 2>&5
18087 ac_status=$?
18088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18089 (exit $ac_status); }; } &&
18090 { ac_try='test -s conftest.$ac_objext'
18091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18092 (eval $ac_try) 2>&5
18093 ac_status=$?
18094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18095 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018096 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018097else
Martin v. Löwis11437992002-04-12 09:54:03 +000018098 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018099sed 's/^/| /' conftest.$ac_ext >&5
18100
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018101cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018102/* confdefs.h. */
18103_ACEOF
18104cat confdefs.h >>conftest.$ac_ext
18105cat >>conftest.$ac_ext <<_ACEOF
18106/* end confdefs.h. */
18107$ac_includes_default
18108int
18109main ()
18110{
18111static struct stat ac_aggr;
18112if (sizeof ac_aggr.st_blocks)
18113return 0;
18114 ;
18115 return 0;
18116}
18117_ACEOF
18118rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018119if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18120 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018121 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018122 grep -v '^ *+' conftest.er1 >conftest.err
18123 rm -f conftest.er1
18124 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018126 (exit $ac_status); } &&
18127 { ac_try='test -z "$ac_c_werror_flag"
18128 || test ! -s conftest.err'
18129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18130 (eval $ac_try) 2>&5
18131 ac_status=$?
18132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18133 (exit $ac_status); }; } &&
18134 { ac_try='test -s conftest.$ac_objext'
18135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18136 (eval $ac_try) 2>&5
18137 ac_status=$?
18138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18139 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018140 ac_cv_member_struct_stat_st_blocks=yes
18141else
18142 echo "$as_me: failed program was:" >&5
18143sed 's/^/| /' conftest.$ac_ext >&5
18144
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018145ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018146fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018147rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018148fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018149rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018150fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018151echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
18152echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018153if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000018154
Martin v. Löwis11437992002-04-12 09:54:03 +000018155cat >>confdefs.h <<_ACEOF
18156#define HAVE_STRUCT_STAT_ST_BLOCKS 1
18157_ACEOF
18158
18159
18160cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018161#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018162_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018163
18164else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018165 case $LIBOBJS in
18166 "fileblocks.$ac_objext" | \
18167 *" fileblocks.$ac_objext" | \
18168 "fileblocks.$ac_objext "* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018169 *" fileblocks.$ac_objext "* ) ;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018170 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018171esac
18172
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018173fi
18174
Michael W. Hudson54241132001-12-07 15:38:26 +000018175
Martin v. Löwis11437992002-04-12 09:54:03 +000018176
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018177echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
18178echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018179if test "${ac_cv_header_time_altzone+set}" = set; then
18180 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018181else
Martin v. Löwis11437992002-04-12 09:54:03 +000018182 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018183/* confdefs.h. */
18184_ACEOF
18185cat confdefs.h >>conftest.$ac_ext
18186cat >>conftest.$ac_ext <<_ACEOF
18187/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018188#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018189int
18190main ()
18191{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018192return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000018193 ;
18194 return 0;
18195}
18196_ACEOF
18197rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018198if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18199 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018201 grep -v '^ *+' conftest.er1 >conftest.err
18202 rm -f conftest.er1
18203 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018205 (exit $ac_status); } &&
18206 { ac_try='test -z "$ac_c_werror_flag"
18207 || test ! -s conftest.err'
18208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18209 (eval $ac_try) 2>&5
18210 ac_status=$?
18211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18212 (exit $ac_status); }; } &&
18213 { ac_try='test -s conftest.$ac_objext'
18214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18215 (eval $ac_try) 2>&5
18216 ac_status=$?
18217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18218 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018219 ac_cv_header_time_altzone=yes
18220else
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
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018224ac_cv_header_time_altzone=no
18225fi
18226rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum7f43da71994-08-01 12:15:30 +000018227fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018228
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018229echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
18230echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018231if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018232
18233cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018234#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018235_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018236
18237fi
18238
Guido van Rossumda88dad1995-01-26 00:46:29 +000018239was_it_defined=no
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018240echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
18241echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018242cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018243/* confdefs.h. */
18244_ACEOF
18245cat confdefs.h >>conftest.$ac_ext
18246cat >>conftest.$ac_ext <<_ACEOF
18247/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018248
18249#include <sys/types.h>
18250#include <sys/select.h>
18251#include <sys/time.h>
18252
Martin v. Löwis11437992002-04-12 09:54:03 +000018253int
18254main ()
18255{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018256;
Martin v. Löwis11437992002-04-12 09:54:03 +000018257 ;
18258 return 0;
18259}
18260_ACEOF
18261rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018262if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18263 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018264 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018265 grep -v '^ *+' conftest.er1 >conftest.err
18266 rm -f conftest.er1
18267 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018269 (exit $ac_status); } &&
18270 { ac_try='test -z "$ac_c_werror_flag"
18271 || test ! -s conftest.err'
18272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18273 (eval $ac_try) 2>&5
18274 ac_status=$?
18275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18276 (exit $ac_status); }; } &&
18277 { ac_try='test -s conftest.$ac_objext'
18278 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18279 (eval $ac_try) 2>&5
18280 ac_status=$?
18281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18282 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018283
18284
18285cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018286#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018287_ACEOF
18288
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018289 was_it_defined=yes
18290
Guido van Rossumf78abae1997-01-21 22:02:36 +000018291else
Martin v. Löwis11437992002-04-12 09:54:03 +000018292 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018293sed 's/^/| /' conftest.$ac_ext >&5
18294
Thomas Wouters477c8d52006-05-27 19:21:47 +000018295fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018296rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18297echo "$as_me:$LINENO: result: $was_it_defined" >&5
18298echo "${ECHO_T}$was_it_defined" >&6
Thomas Wouters477c8d52006-05-27 19:21:47 +000018299
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018300echo "$as_me:$LINENO: checking for addrinfo" >&5
18301echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018302if test "${ac_cv_struct_addrinfo+set}" = set; then
18303 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018304else
Martin v. Löwis11437992002-04-12 09:54:03 +000018305 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018306/* confdefs.h. */
18307_ACEOF
18308cat confdefs.h >>conftest.$ac_ext
18309cat >>conftest.$ac_ext <<_ACEOF
18310/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018311
18312# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018313int
18314main ()
18315{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018316struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000018317 ;
18318 return 0;
18319}
18320_ACEOF
18321rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018322if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18323 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018325 grep -v '^ *+' conftest.er1 >conftest.err
18326 rm -f conftest.er1
18327 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018329 (exit $ac_status); } &&
18330 { ac_try='test -z "$ac_c_werror_flag"
18331 || test ! -s conftest.err'
18332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18333 (eval $ac_try) 2>&5
18334 ac_status=$?
18335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18336 (exit $ac_status); }; } &&
18337 { ac_try='test -s conftest.$ac_objext'
18338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18339 (eval $ac_try) 2>&5
18340 ac_status=$?
18341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18342 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018343 ac_cv_struct_addrinfo=yes
18344else
Martin v. Löwis11437992002-04-12 09:54:03 +000018345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018346sed 's/^/| /' conftest.$ac_ext >&5
18347
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018348ac_cv_struct_addrinfo=no
18349fi
18350rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018351fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018352
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018353echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
18354echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018355if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018356
18357cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018358#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018359_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018360
18361fi
18362
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018363echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
18364echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018365if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
18366 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018367else
Martin v. Löwis11437992002-04-12 09:54:03 +000018368 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018369/* confdefs.h. */
18370_ACEOF
18371cat confdefs.h >>conftest.$ac_ext
18372cat >>conftest.$ac_ext <<_ACEOF
18373/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018374
18375# include <sys/types.h>
18376# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018377int
18378main ()
18379{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018380struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000018381 ;
18382 return 0;
18383}
18384_ACEOF
18385rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018386if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18387 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018388 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018389 grep -v '^ *+' conftest.er1 >conftest.err
18390 rm -f conftest.er1
18391 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018393 (exit $ac_status); } &&
18394 { ac_try='test -z "$ac_c_werror_flag"
18395 || test ! -s conftest.err'
18396 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18397 (eval $ac_try) 2>&5
18398 ac_status=$?
18399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18400 (exit $ac_status); }; } &&
18401 { ac_try='test -s conftest.$ac_objext'
18402 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18403 (eval $ac_try) 2>&5
18404 ac_status=$?
18405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18406 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018407 ac_cv_struct_sockaddr_storage=yes
18408else
Martin v. Löwis11437992002-04-12 09:54:03 +000018409 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018410sed 's/^/| /' conftest.$ac_ext >&5
18411
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018412ac_cv_struct_sockaddr_storage=no
18413fi
18414rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018415fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018416
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018417echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
18418echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018419if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018420
18421cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018422#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018423_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018424
18425fi
18426
Guido van Rossum627b2d71993-12-24 10:39:16 +000018427# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000018428
Michael W. Hudson54241132001-12-07 15:38:26 +000018429
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018430echo "$as_me:$LINENO: checking whether char is unsigned" >&5
18431echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018432if test "${ac_cv_c_char_unsigned+set}" = set; then
18433 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000018434else
Martin v. Löwis11437992002-04-12 09:54:03 +000018435 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018436/* confdefs.h. */
18437_ACEOF
18438cat confdefs.h >>conftest.$ac_ext
18439cat >>conftest.$ac_ext <<_ACEOF
18440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018441$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018442int
18443main ()
18444{
18445static int test_array [1 - 2 * !(((char) -1) < 0)];
18446test_array [0] = 0
18447
18448 ;
18449 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000018450}
Martin v. Löwis11437992002-04-12 09:54:03 +000018451_ACEOF
18452rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018453if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18454 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018456 grep -v '^ *+' conftest.er1 >conftest.err
18457 rm -f conftest.er1
18458 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018460 (exit $ac_status); } &&
18461 { ac_try='test -z "$ac_c_werror_flag"
18462 || test ! -s conftest.err'
18463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18464 (eval $ac_try) 2>&5
18465 ac_status=$?
18466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18467 (exit $ac_status); }; } &&
18468 { ac_try='test -s conftest.$ac_objext'
18469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18470 (eval $ac_try) 2>&5
18471 ac_status=$?
18472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18473 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000018474 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018475else
18476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018477sed 's/^/| /' conftest.$ac_ext >&5
18478
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018479ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018480fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018481rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018482fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018483echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
18484echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018485if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018486 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018487#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018488_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018489
18490fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000018491
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018492echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
18493echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018494if test "${ac_cv_c_const+set}" = set; then
18495 echo $ECHO_N "(cached) $ECHO_C" >&6
18496else
18497 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018498/* confdefs.h. */
18499_ACEOF
18500cat confdefs.h >>conftest.$ac_ext
18501cat >>conftest.$ac_ext <<_ACEOF
18502/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018503
Martin v. Löwis11437992002-04-12 09:54:03 +000018504int
18505main ()
18506{
18507/* FIXME: Include the comments suggested by Paul. */
18508#ifndef __cplusplus
18509 /* Ultrix mips cc rejects this. */
18510 typedef int charset[2];
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018511 const charset x;
Martin v. Löwis11437992002-04-12 09:54:03 +000018512 /* SunOS 4.1.1 cc rejects this. */
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018513 char const *const *ccp;
18514 char **p;
Martin v. Löwis11437992002-04-12 09:54:03 +000018515 /* NEC SVR4.0.2 mips cc rejects this. */
18516 struct point {int x, y;};
18517 static struct point const zero = {0,0};
18518 /* AIX XL C 1.02.0.0 rejects this.
18519 It does not let you subtract one const X* pointer from another in
18520 an arm of an if-expression whose if-part is not a constant
18521 expression */
18522 const char *g = "string";
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018523 ccp = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018524 /* HPUX 7.0 cc rejects these. */
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018525 ++ccp;
18526 p = (char**) ccp;
18527 ccp = (char const *const *) p;
Martin v. Löwis11437992002-04-12 09:54:03 +000018528 { /* SCO 3.2v4 cc rejects this. */
18529 char *t;
18530 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018531
Martin v. Löwis11437992002-04-12 09:54:03 +000018532 *t++ = 0;
18533 }
18534 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
18535 int x[] = {25, 17};
18536 const int *foo = &x[0];
18537 ++foo;
18538 }
18539 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
18540 typedef const int *iptr;
18541 iptr p = 0;
18542 ++p;
18543 }
18544 { /* AIX XL C 1.02.0.0 rejects this saying
18545 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
18546 struct s { int j; const int *ap[3]; };
18547 struct s *b; b->j = 5;
18548 }
18549 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
18550 const int foo = 10;
18551 }
18552#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000018553
Martin v. Löwis11437992002-04-12 09:54:03 +000018554 ;
18555 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000018556}
Martin v. Löwis11437992002-04-12 09:54:03 +000018557_ACEOF
18558rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018559if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18560 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018562 grep -v '^ *+' conftest.er1 >conftest.err
18563 rm -f conftest.er1
18564 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018566 (exit $ac_status); } &&
18567 { ac_try='test -z "$ac_c_werror_flag"
18568 || test ! -s conftest.err'
18569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18570 (eval $ac_try) 2>&5
18571 ac_status=$?
18572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18573 (exit $ac_status); }; } &&
18574 { ac_try='test -s conftest.$ac_objext'
18575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18576 (eval $ac_try) 2>&5
18577 ac_status=$?
18578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18579 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018580 ac_cv_c_const=yes
18581else
Martin v. Löwis11437992002-04-12 09:54:03 +000018582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018583sed 's/^/| /' conftest.$ac_ext >&5
18584
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018585ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018586fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018587rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018588fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018589echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
18590echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018591if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018592
18593cat >>confdefs.h <<\_ACEOF
18594#define const
18595_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018596
18597fi
18598
Michael W. Hudson54241132001-12-07 15:38:26 +000018599
Guido van Rossumda88dad1995-01-26 00:46:29 +000018600works=no
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018601echo "$as_me:$LINENO: checking for working volatile" >&5
18602echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018603cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018604/* confdefs.h. */
18605_ACEOF
18606cat confdefs.h >>conftest.$ac_ext
18607cat >>conftest.$ac_ext <<_ACEOF
18608/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018609
Martin v. Löwis11437992002-04-12 09:54:03 +000018610int
18611main ()
18612{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018613volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000018614 ;
18615 return 0;
18616}
18617_ACEOF
18618rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18620 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018622 grep -v '^ *+' conftest.er1 >conftest.err
18623 rm -f conftest.er1
18624 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018626 (exit $ac_status); } &&
18627 { ac_try='test -z "$ac_c_werror_flag"
18628 || test ! -s conftest.err'
18629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18630 (eval $ac_try) 2>&5
18631 ac_status=$?
18632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18633 (exit $ac_status); }; } &&
18634 { ac_try='test -s conftest.$ac_objext'
18635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18636 (eval $ac_try) 2>&5
18637 ac_status=$?
18638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18639 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000018640 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018641else
Martin v. Löwis11437992002-04-12 09:54:03 +000018642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018643sed 's/^/| /' conftest.$ac_ext >&5
18644
Martin v. Löwis11437992002-04-12 09:54:03 +000018645
18646cat >>confdefs.h <<\_ACEOF
18647#define volatile
18648_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018649
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018650
Guido van Rossum627b2d71993-12-24 10:39:16 +000018651fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018652rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18653echo "$as_me:$LINENO: result: $works" >&5
18654echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000018655
Guido van Rossumda88dad1995-01-26 00:46:29 +000018656works=no
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018657echo "$as_me:$LINENO: checking for working signed char" >&5
18658echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018659cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018660/* confdefs.h. */
18661_ACEOF
18662cat confdefs.h >>conftest.$ac_ext
18663cat >>conftest.$ac_ext <<_ACEOF
18664/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000018665
Martin v. Löwis11437992002-04-12 09:54:03 +000018666int
18667main ()
18668{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018669signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000018670 ;
18671 return 0;
18672}
18673_ACEOF
18674rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018675if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18676 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018678 grep -v '^ *+' conftest.er1 >conftest.err
18679 rm -f conftest.er1
18680 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018682 (exit $ac_status); } &&
18683 { ac_try='test -z "$ac_c_werror_flag"
18684 || test ! -s conftest.err'
18685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18686 (eval $ac_try) 2>&5
18687 ac_status=$?
18688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18689 (exit $ac_status); }; } &&
18690 { ac_try='test -s conftest.$ac_objext'
18691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18692 (eval $ac_try) 2>&5
18693 ac_status=$?
18694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18695 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000018696 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000018697else
Martin v. Löwis11437992002-04-12 09:54:03 +000018698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018699sed 's/^/| /' conftest.$ac_ext >&5
18700
Martin v. Löwis11437992002-04-12 09:54:03 +000018701
18702cat >>confdefs.h <<\_ACEOF
18703#define signed
18704_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000018705
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018706
Guido van Rossum7f43da71994-08-01 12:15:30 +000018707fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018708rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18709echo "$as_me:$LINENO: result: $works" >&5
18710echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000018711
Guido van Rossumda88dad1995-01-26 00:46:29 +000018712have_prototypes=no
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018713echo "$as_me:$LINENO: checking for prototypes" >&5
18714echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018715cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018716/* confdefs.h. */
18717_ACEOF
18718cat confdefs.h >>conftest.$ac_ext
18719cat >>conftest.$ac_ext <<_ACEOF
18720/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018721int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018722int
18723main ()
18724{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018725return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000018726 ;
18727 return 0;
18728}
18729_ACEOF
18730rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018731if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18732 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018734 grep -v '^ *+' conftest.er1 >conftest.err
18735 rm -f conftest.er1
18736 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018738 (exit $ac_status); } &&
18739 { ac_try='test -z "$ac_c_werror_flag"
18740 || test ! -s conftest.err'
18741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18742 (eval $ac_try) 2>&5
18743 ac_status=$?
18744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18745 (exit $ac_status); }; } &&
18746 { ac_try='test -s conftest.$ac_objext'
18747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18748 (eval $ac_try) 2>&5
18749 ac_status=$?
18750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18751 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018752
18753
18754cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018755#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018756_ACEOF
18757
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018758 have_prototypes=yes
18759
Guido van Rossumf78abae1997-01-21 22:02:36 +000018760else
Martin v. Löwis11437992002-04-12 09:54:03 +000018761 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018762sed 's/^/| /' conftest.$ac_ext >&5
18763
Guido van Rossum7f43da71994-08-01 12:15:30 +000018764fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018765rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18766echo "$as_me:$LINENO: result: $have_prototypes" >&5
18767echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018768
Guido van Rossumda88dad1995-01-26 00:46:29 +000018769works=no
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018770echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
18771echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018772cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018773/* confdefs.h. */
18774_ACEOF
18775cat confdefs.h >>conftest.$ac_ext
18776cat >>conftest.$ac_ext <<_ACEOF
18777/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018778
18779#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000018780int foo(int x, ...) {
18781 va_list va;
18782 va_start(va, x);
18783 va_arg(va, int);
18784 va_arg(va, char *);
18785 va_arg(va, double);
18786 return 0;
18787}
Guido van Rossum7f43da71994-08-01 12:15:30 +000018788
Martin v. Löwis11437992002-04-12 09:54:03 +000018789int
18790main ()
18791{
Guido van Rossum90eea071996-08-30 20:58:57 +000018792return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000018793 ;
18794 return 0;
18795}
18796_ACEOF
18797rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018798if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18799 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018801 grep -v '^ *+' conftest.er1 >conftest.err
18802 rm -f conftest.er1
18803 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018805 (exit $ac_status); } &&
18806 { ac_try='test -z "$ac_c_werror_flag"
18807 || test ! -s conftest.err'
18808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18809 (eval $ac_try) 2>&5
18810 ac_status=$?
18811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18812 (exit $ac_status); }; } &&
18813 { ac_try='test -s conftest.$ac_objext'
18814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18815 (eval $ac_try) 2>&5
18816 ac_status=$?
18817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18818 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018819
18820
18821cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018822#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018823_ACEOF
18824
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018825 works=yes
18826
Guido van Rossumf78abae1997-01-21 22:02:36 +000018827else
Martin v. Löwis11437992002-04-12 09:54:03 +000018828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018829sed 's/^/| /' conftest.$ac_ext >&5
18830
Guido van Rossum627b2d71993-12-24 10:39:16 +000018831fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018832rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18833echo "$as_me:$LINENO: result: $works" >&5
18834echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018835
Martin v. Löwisd6320502004-08-12 13:45:08 +000018836# check for socketpair
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018837echo "$as_me:$LINENO: checking for socketpair" >&5
18838echo $ECHO_N "checking for socketpair... $ECHO_C" >&6
Martin v. Löwisd6320502004-08-12 13:45:08 +000018839cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000018840/* confdefs.h. */
18841_ACEOF
18842cat confdefs.h >>conftest.$ac_ext
18843cat >>conftest.$ac_ext <<_ACEOF
18844/* end confdefs.h. */
18845
18846#include <sys/types.h>
18847#include <sys/socket.h>
18848
18849int
18850main ()
18851{
18852void *x=socketpair
18853 ;
18854 return 0;
18855}
18856_ACEOF
18857rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018858if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18859 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000018860 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018861 grep -v '^ *+' conftest.er1 >conftest.err
18862 rm -f conftest.er1
18863 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000018864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018865 (exit $ac_status); } &&
18866 { ac_try='test -z "$ac_c_werror_flag"
18867 || test ! -s conftest.err'
18868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18869 (eval $ac_try) 2>&5
18870 ac_status=$?
18871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18872 (exit $ac_status); }; } &&
18873 { ac_try='test -s conftest.$ac_objext'
18874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18875 (eval $ac_try) 2>&5
18876 ac_status=$?
18877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18878 (exit $ac_status); }; }; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000018879
18880cat >>confdefs.h <<\_ACEOF
18881#define HAVE_SOCKETPAIR 1
18882_ACEOF
18883
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018884 echo "$as_me:$LINENO: result: yes" >&5
18885echo "${ECHO_T}yes" >&6
Martin v. Löwisd6320502004-08-12 13:45:08 +000018886else
18887 echo "$as_me: failed program was:" >&5
18888sed 's/^/| /' conftest.$ac_ext >&5
18889
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018890echo "$as_me:$LINENO: result: no" >&5
18891echo "${ECHO_T}no" >&6
Martin v. Löwisd6320502004-08-12 13:45:08 +000018892
18893fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018894rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000018895
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018896# check if sockaddr has sa_len member
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018897echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
18898echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018899cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018900/* confdefs.h. */
18901_ACEOF
18902cat confdefs.h >>conftest.$ac_ext
18903cat >>conftest.$ac_ext <<_ACEOF
18904/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018905#include <sys/types.h>
18906#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018907int
18908main ()
18909{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018910struct sockaddr x;
18911x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000018912 ;
18913 return 0;
18914}
18915_ACEOF
18916rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018917if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18918 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018920 grep -v '^ *+' conftest.er1 >conftest.err
18921 rm -f conftest.er1
18922 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018924 (exit $ac_status); } &&
18925 { ac_try='test -z "$ac_c_werror_flag"
18926 || test ! -s conftest.err'
18927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18928 (eval $ac_try) 2>&5
18929 ac_status=$?
18930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18931 (exit $ac_status); }; } &&
18932 { ac_try='test -s conftest.$ac_objext'
18933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18934 (eval $ac_try) 2>&5
18935 ac_status=$?
18936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18937 (exit $ac_status); }; }; then
18938 echo "$as_me:$LINENO: result: yes" >&5
18939echo "${ECHO_T}yes" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018940
18941cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018942#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018943_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018944
18945else
Martin v. Löwis11437992002-04-12 09:54:03 +000018946 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018947sed 's/^/| /' conftest.$ac_ext >&5
18948
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018949echo "$as_me:$LINENO: result: no" >&5
18950echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018951fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018952rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018953
Guido van Rossumda88dad1995-01-26 00:46:29 +000018954va_list_is_array=no
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018955echo "$as_me:$LINENO: checking whether va_list is an array" >&5
18956echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018957cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018958/* confdefs.h. */
18959_ACEOF
18960cat confdefs.h >>conftest.$ac_ext
18961cat >>conftest.$ac_ext <<_ACEOF
18962/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018963
18964#ifdef HAVE_STDARG_PROTOTYPES
18965#include <stdarg.h>
18966#else
18967#include <varargs.h>
18968#endif
18969
Martin v. Löwis11437992002-04-12 09:54:03 +000018970int
18971main ()
18972{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018973va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000018974 ;
18975 return 0;
18976}
18977_ACEOF
18978rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018979if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18980 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018982 grep -v '^ *+' conftest.er1 >conftest.err
18983 rm -f conftest.er1
18984 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000018986 (exit $ac_status); } &&
18987 { ac_try='test -z "$ac_c_werror_flag"
18988 || test ! -s conftest.err'
18989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18990 (eval $ac_try) 2>&5
18991 ac_status=$?
18992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18993 (exit $ac_status); }; } &&
18994 { ac_try='test -s conftest.$ac_objext'
18995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18996 (eval $ac_try) 2>&5
18997 ac_status=$?
18998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18999 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019000 :
19001else
Martin v. Löwis11437992002-04-12 09:54:03 +000019002 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019003sed 's/^/| /' conftest.$ac_ext >&5
19004
Martin v. Löwis11437992002-04-12 09:54:03 +000019005
19006
19007cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019008#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019009_ACEOF
19010
Guido van Rossumda88dad1995-01-26 00:46:29 +000019011 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019012
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019013fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019014rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19015echo "$as_me:$LINENO: result: $va_list_is_array" >&5
19016echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019017
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019018# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000019019
19020
19021
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019022echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
19023echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019024if test "${ac_cv_func_gethostbyname_r+set}" = set; then
19025 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019026else
Martin v. Löwis11437992002-04-12 09:54:03 +000019027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019028/* confdefs.h. */
19029_ACEOF
19030cat confdefs.h >>conftest.$ac_ext
19031cat >>conftest.$ac_ext <<_ACEOF
19032/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019033/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
19034 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19035#define gethostbyname_r innocuous_gethostbyname_r
19036
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019037/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019038 which can conflict with char gethostbyname_r (); below.
19039 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019040 <limits.h> exists even on freestanding compilers. */
19041
19042#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019043# include <limits.h>
19044#else
19045# include <assert.h>
19046#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019047
19048#undef gethostbyname_r
19049
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019050/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019051#ifdef __cplusplus
19052extern "C"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019053{
Martin v. Löwis11437992002-04-12 09:54:03 +000019054#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019055/* We use char because int might match the return type of a gcc2
19056 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019057char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019058/* The GNU C library defines this for functions which it implements
19059 to always fail with ENOSYS. Some functions are actually named
19060 something starting with __ and the normal name is an alias. */
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019061#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019062choke me
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019063#else
19064char (*f) () = gethostbyname_r;
19065#endif
19066#ifdef __cplusplus
19067}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019068#endif
19069
Skip Montanaro6dead952003-09-25 14:50:04 +000019070int
19071main ()
19072{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019073return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000019074 ;
19075 return 0;
19076}
19077_ACEOF
19078rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019079if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19080 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019082 grep -v '^ *+' conftest.er1 >conftest.err
19083 rm -f conftest.er1
19084 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019086 (exit $ac_status); } &&
19087 { ac_try='test -z "$ac_c_werror_flag"
19088 || test ! -s conftest.err'
19089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19090 (eval $ac_try) 2>&5
19091 ac_status=$?
19092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19093 (exit $ac_status); }; } &&
19094 { ac_try='test -s conftest$ac_exeext'
19095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19096 (eval $ac_try) 2>&5
19097 ac_status=$?
19098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19099 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019100 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019101else
Martin v. Löwis11437992002-04-12 09:54:03 +000019102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019103sed 's/^/| /' conftest.$ac_ext >&5
19104
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019105ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019106fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019107rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019108 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019109fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019110echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
19111echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019112if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019113
Martin v. Löwis11437992002-04-12 09:54:03 +000019114 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019115#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019116_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019117
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019118 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
19119echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019120 OLD_CFLAGS=$CFLAGS
19121 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019122 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019123/* confdefs.h. */
19124_ACEOF
19125cat confdefs.h >>conftest.$ac_ext
19126cat >>conftest.$ac_ext <<_ACEOF
19127/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019128
19129# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019130
Martin v. Löwis11437992002-04-12 09:54:03 +000019131int
19132main ()
19133{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019134
19135 char *name;
19136 struct hostent *he, *res;
19137 char buffer[2048];
19138 int buflen = 2048;
19139 int h_errnop;
19140
19141 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000019142
19143 ;
19144 return 0;
19145}
19146_ACEOF
19147rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019148if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19149 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019150 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019151 grep -v '^ *+' conftest.er1 >conftest.err
19152 rm -f conftest.er1
19153 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019155 (exit $ac_status); } &&
19156 { ac_try='test -z "$ac_c_werror_flag"
19157 || test ! -s conftest.err'
19158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19159 (eval $ac_try) 2>&5
19160 ac_status=$?
19161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19162 (exit $ac_status); }; } &&
19163 { ac_try='test -s conftest.$ac_objext'
19164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19165 (eval $ac_try) 2>&5
19166 ac_status=$?
19167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19168 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019169
19170 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019171#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019172_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019173
Martin v. Löwis11437992002-04-12 09:54:03 +000019174
19175cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019176#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019177_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019178
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019179 echo "$as_me:$LINENO: result: yes" >&5
19180echo "${ECHO_T}yes" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019181
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019182else
Martin v. Löwis11437992002-04-12 09:54:03 +000019183 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019184sed 's/^/| /' conftest.$ac_ext >&5
19185
Martin v. Löwis11437992002-04-12 09:54:03 +000019186
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019187 echo "$as_me:$LINENO: result: no" >&5
19188echo "${ECHO_T}no" >&6
19189 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
19190echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019191 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019192/* confdefs.h. */
19193_ACEOF
19194cat confdefs.h >>conftest.$ac_ext
19195cat >>conftest.$ac_ext <<_ACEOF
19196/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019197
19198# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019199
Martin v. Löwis11437992002-04-12 09:54:03 +000019200int
19201main ()
19202{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019203
19204 char *name;
19205 struct hostent *he;
19206 char buffer[2048];
19207 int buflen = 2048;
19208 int h_errnop;
19209
19210 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000019211
19212 ;
19213 return 0;
19214}
19215_ACEOF
19216rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019217if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19218 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019219 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019220 grep -v '^ *+' conftest.er1 >conftest.err
19221 rm -f conftest.er1
19222 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019224 (exit $ac_status); } &&
19225 { ac_try='test -z "$ac_c_werror_flag"
19226 || test ! -s conftest.err'
19227 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19228 (eval $ac_try) 2>&5
19229 ac_status=$?
19230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19231 (exit $ac_status); }; } &&
19232 { ac_try='test -s conftest.$ac_objext'
19233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19234 (eval $ac_try) 2>&5
19235 ac_status=$?
19236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19237 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019238
19239 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019240#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019241_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019242
Martin v. Löwis11437992002-04-12 09:54:03 +000019243
19244cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019245#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019246_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019247
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019248 echo "$as_me:$LINENO: result: yes" >&5
19249echo "${ECHO_T}yes" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019250
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019251else
Martin v. Löwis11437992002-04-12 09:54:03 +000019252 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019253sed 's/^/| /' conftest.$ac_ext >&5
19254
Martin v. Löwis11437992002-04-12 09:54:03 +000019255
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019256 echo "$as_me:$LINENO: result: no" >&5
19257echo "${ECHO_T}no" >&6
19258 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
19259echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019260 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019261/* confdefs.h. */
19262_ACEOF
19263cat confdefs.h >>conftest.$ac_ext
19264cat >>conftest.$ac_ext <<_ACEOF
19265/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019266
19267# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019268
Martin v. Löwis11437992002-04-12 09:54:03 +000019269int
19270main ()
19271{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019272
19273 char *name;
19274 struct hostent *he;
19275 struct hostent_data data;
19276
19277 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000019278
19279 ;
19280 return 0;
19281}
19282_ACEOF
19283rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019284if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19285 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019287 grep -v '^ *+' conftest.er1 >conftest.err
19288 rm -f conftest.er1
19289 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019291 (exit $ac_status); } &&
19292 { ac_try='test -z "$ac_c_werror_flag"
19293 || test ! -s conftest.err'
19294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19295 (eval $ac_try) 2>&5
19296 ac_status=$?
19297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19298 (exit $ac_status); }; } &&
19299 { ac_try='test -s conftest.$ac_objext'
19300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19301 (eval $ac_try) 2>&5
19302 ac_status=$?
19303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19304 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019305
19306 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019307#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019308_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019309
Martin v. Löwis11437992002-04-12 09:54:03 +000019310
19311cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019312#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019313_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019314
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019315 echo "$as_me:$LINENO: result: yes" >&5
19316echo "${ECHO_T}yes" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019317
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019318else
Martin v. Löwis11437992002-04-12 09:54:03 +000019319 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019320sed 's/^/| /' conftest.$ac_ext >&5
19321
Martin v. Löwis11437992002-04-12 09:54:03 +000019322
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019323 echo "$as_me:$LINENO: result: no" >&5
19324echo "${ECHO_T}no" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019325
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019326fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019327rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019328
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019329fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019330rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019331
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019332fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019333rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019334 CFLAGS=$OLD_CFLAGS
19335
19336else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019337
Martin v. Löwis11437992002-04-12 09:54:03 +000019338
19339for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000019340do
Martin v. Löwis11437992002-04-12 09:54:03 +000019341as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019342echo "$as_me:$LINENO: checking for $ac_func" >&5
19343echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19344if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019345 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019346else
Martin v. Löwis11437992002-04-12 09:54:03 +000019347 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019348/* confdefs.h. */
19349_ACEOF
19350cat confdefs.h >>conftest.$ac_ext
19351cat >>conftest.$ac_ext <<_ACEOF
19352/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019353/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19354 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19355#define $ac_func innocuous_$ac_func
19356
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019357/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019358 which can conflict with char $ac_func (); below.
19359 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019360 <limits.h> exists even on freestanding compilers. */
19361
19362#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019363# include <limits.h>
19364#else
19365# include <assert.h>
19366#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019367
19368#undef $ac_func
19369
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019370/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019371#ifdef __cplusplus
19372extern "C"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019373{
Martin v. Löwis11437992002-04-12 09:54:03 +000019374#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019375/* We use char because int might match the return type of a gcc2
19376 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019377char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019378/* The GNU C library defines this for functions which it implements
19379 to always fail with ENOSYS. Some functions are actually named
19380 something starting with __ and the normal name is an alias. */
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019381#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019382choke me
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019383#else
19384char (*f) () = $ac_func;
19385#endif
19386#ifdef __cplusplus
19387}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019388#endif
19389
Skip Montanaro6dead952003-09-25 14:50:04 +000019390int
19391main ()
19392{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019393return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000019394 ;
19395 return 0;
19396}
19397_ACEOF
19398rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019399if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19400 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019402 grep -v '^ *+' conftest.er1 >conftest.err
19403 rm -f conftest.er1
19404 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019406 (exit $ac_status); } &&
19407 { ac_try='test -z "$ac_c_werror_flag"
19408 || test ! -s conftest.err'
19409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19410 (eval $ac_try) 2>&5
19411 ac_status=$?
19412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19413 (exit $ac_status); }; } &&
19414 { ac_try='test -s conftest$ac_exeext'
19415 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19416 (eval $ac_try) 2>&5
19417 ac_status=$?
19418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19419 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019420 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019421else
Martin v. Löwis11437992002-04-12 09:54:03 +000019422 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019423sed 's/^/| /' conftest.$ac_ext >&5
19424
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019425eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019426fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019427rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019428 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019429fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019430echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
19431echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019432if test `eval echo '${'$as_ac_var'}'` = yes; then
19433 cat >>confdefs.h <<_ACEOF
19434#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19435_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019436
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019437fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019438done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019439
Michael W. Hudson54241132001-12-07 15:38:26 +000019440
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019441fi
19442
Michael W. Hudson54241132001-12-07 15:38:26 +000019443
19444
19445
19446
19447
19448
Guido van Rossum627b2d71993-12-24 10:39:16 +000019449# checks for system services
19450# (none yet)
19451
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019452# Linux requires this for correct f.p. operations
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019453echo "$as_me:$LINENO: checking for __fpu_control" >&5
19454echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019455if test "${ac_cv_func___fpu_control+set}" = set; then
19456 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019457else
Martin v. Löwis11437992002-04-12 09:54:03 +000019458 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019459/* confdefs.h. */
19460_ACEOF
19461cat confdefs.h >>conftest.$ac_ext
19462cat >>conftest.$ac_ext <<_ACEOF
19463/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019464/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
19465 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19466#define __fpu_control innocuous___fpu_control
19467
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019468/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019469 which can conflict with char __fpu_control (); below.
19470 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019471 <limits.h> exists even on freestanding compilers. */
19472
19473#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019474# include <limits.h>
19475#else
19476# include <assert.h>
19477#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019478
19479#undef __fpu_control
19480
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019481/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019482#ifdef __cplusplus
19483extern "C"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019484{
Martin v. Löwis11437992002-04-12 09:54:03 +000019485#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019486/* We use char because int might match the return type of a gcc2
19487 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019488char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019489/* The GNU C library defines this for functions which it implements
19490 to always fail with ENOSYS. Some functions are actually named
19491 something starting with __ and the normal name is an alias. */
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019492#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019493choke me
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019494#else
19495char (*f) () = __fpu_control;
19496#endif
19497#ifdef __cplusplus
19498}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019499#endif
19500
Skip Montanaro6dead952003-09-25 14:50:04 +000019501int
19502main ()
19503{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019504return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000019505 ;
19506 return 0;
19507}
19508_ACEOF
19509rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019510if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19511 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019512 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019513 grep -v '^ *+' conftest.er1 >conftest.err
19514 rm -f conftest.er1
19515 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019517 (exit $ac_status); } &&
19518 { ac_try='test -z "$ac_c_werror_flag"
19519 || test ! -s conftest.err'
19520 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19521 (eval $ac_try) 2>&5
19522 ac_status=$?
19523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19524 (exit $ac_status); }; } &&
19525 { ac_try='test -s conftest$ac_exeext'
19526 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19527 (eval $ac_try) 2>&5
19528 ac_status=$?
19529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19530 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019531 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019532else
Martin v. Löwis11437992002-04-12 09:54:03 +000019533 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019534sed 's/^/| /' conftest.$ac_ext >&5
19535
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019536ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019537fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019538rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019539 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019540fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019541echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
19542echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019543if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019544 :
19545else
Martin v. Löwis11437992002-04-12 09:54:03 +000019546
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019547echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
19548echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019549if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
19550 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019551else
Martin v. Löwis11437992002-04-12 09:54:03 +000019552 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019553LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019554cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019555/* confdefs.h. */
19556_ACEOF
19557cat confdefs.h >>conftest.$ac_ext
19558cat >>conftest.$ac_ext <<_ACEOF
19559/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019560
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019561/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019562#ifdef __cplusplus
19563extern "C"
19564#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019565/* We use char because int might match the return type of a gcc2
19566 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019567char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019568int
19569main ()
19570{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019571__fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019572 ;
19573 return 0;
19574}
19575_ACEOF
19576rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019577if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19578 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019579 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019580 grep -v '^ *+' conftest.er1 >conftest.err
19581 rm -f conftest.er1
19582 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019584 (exit $ac_status); } &&
19585 { ac_try='test -z "$ac_c_werror_flag"
19586 || test ! -s conftest.err'
19587 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19588 (eval $ac_try) 2>&5
19589 ac_status=$?
19590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19591 (exit $ac_status); }; } &&
19592 { ac_try='test -s conftest$ac_exeext'
19593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19594 (eval $ac_try) 2>&5
19595 ac_status=$?
19596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19597 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019598 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019599else
Martin v. Löwis11437992002-04-12 09:54:03 +000019600 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019601sed 's/^/| /' conftest.$ac_ext >&5
19602
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019603ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019604fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019605rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019606 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019607LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019608fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019609echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
19610echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019611if test $ac_cv_lib_ieee___fpu_control = yes; then
19612 cat >>confdefs.h <<_ACEOF
19613#define HAVE_LIBIEEE 1
19614_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019615
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019616 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019617
Guido van Rossum627b2d71993-12-24 10:39:16 +000019618fi
19619
Michael W. Hudson54241132001-12-07 15:38:26 +000019620
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019621fi
19622
Michael W. Hudson54241132001-12-07 15:38:26 +000019623
Guido van Rossum7f253911997-05-09 02:42:48 +000019624# Check for --with-fpectl
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019625echo "$as_me:$LINENO: checking for --with-fpectl" >&5
19626echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019627
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019628# Check whether --with-fpectl or --without-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000019629if test "${with_fpectl+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019630 withval="$with_fpectl"
19631
Guido van Rossum7f253911997-05-09 02:42:48 +000019632if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000019633then
19634
19635cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000019636#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019637_ACEOF
19638
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019639 echo "$as_me:$LINENO: result: yes" >&5
19640echo "${ECHO_T}yes" >&6
19641else echo "$as_me:$LINENO: result: no" >&5
19642echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000019643fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019644else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019645 echo "$as_me:$LINENO: result: no" >&5
19646echo "${ECHO_T}no" >&6
19647fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000019648
Guido van Rossum7f43da71994-08-01 12:15:30 +000019649# check for --with-libm=...
19650
Guido van Rossum563e7081996-09-10 18:20:48 +000019651case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000019652Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000019653*) LIBM=-lm
19654esac
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019655echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
19656echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019657
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019658# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019659if test "${with_libm+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019660 withval="$with_libm"
19661
Guido van Rossum7f253911997-05-09 02:42:48 +000019662if test "$withval" = no
19663then LIBM=
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019664 echo "$as_me:$LINENO: result: force LIBM empty" >&5
19665echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000019666elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000019667then LIBM=$withval
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019668 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
19669echo "${ECHO_T}set LIBM=\"$withval\"" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019670else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
19671echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
19672 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019673fi
Guido van Rossum7f253911997-05-09 02:42:48 +000019674else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019675 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
19676echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
19677fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000019678
19679# check for --with-libc=...
19680
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019681echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
19682echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019683
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019684# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019685if test "${with_libc+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019686 withval="$with_libc"
19687
Guido van Rossum7f253911997-05-09 02:42:48 +000019688if test "$withval" = no
19689then LIBC=
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019690 echo "$as_me:$LINENO: result: force LIBC empty" >&5
19691echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000019692elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000019693then LIBC=$withval
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019694 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
19695echo "${ECHO_T}set LIBC=\"$withval\"" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019696else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
19697echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
19698 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019699fi
Guido van Rossum7f253911997-05-09 02:42:48 +000019700else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019701 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
19702echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
19703fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000019704
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019705# check for hypot() in math library
19706LIBS_SAVE=$LIBS
19707LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000019708
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019709for ac_func in hypot
19710do
Martin v. Löwis11437992002-04-12 09:54:03 +000019711as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019712echo "$as_me:$LINENO: checking for $ac_func" >&5
19713echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19714if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019715 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019716else
Martin v. Löwis11437992002-04-12 09:54:03 +000019717 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019718/* confdefs.h. */
19719_ACEOF
19720cat confdefs.h >>conftest.$ac_ext
19721cat >>conftest.$ac_ext <<_ACEOF
19722/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019723/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19724 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19725#define $ac_func innocuous_$ac_func
19726
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019727/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019728 which can conflict with char $ac_func (); below.
19729 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019730 <limits.h> exists even on freestanding compilers. */
19731
19732#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019733# include <limits.h>
19734#else
19735# include <assert.h>
19736#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019737
19738#undef $ac_func
19739
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019740/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019741#ifdef __cplusplus
19742extern "C"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019743{
Martin v. Löwis11437992002-04-12 09:54:03 +000019744#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019745/* We use char because int might match the return type of a gcc2
19746 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019747char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019748/* The GNU C library defines this for functions which it implements
19749 to always fail with ENOSYS. Some functions are actually named
19750 something starting with __ and the normal name is an alias. */
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019751#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019752choke me
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019753#else
19754char (*f) () = $ac_func;
19755#endif
19756#ifdef __cplusplus
19757}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019758#endif
19759
Skip Montanaro6dead952003-09-25 14:50:04 +000019760int
19761main ()
19762{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019763return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000019764 ;
19765 return 0;
19766}
19767_ACEOF
19768rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019769if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19770 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019772 grep -v '^ *+' conftest.er1 >conftest.err
19773 rm -f conftest.er1
19774 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019776 (exit $ac_status); } &&
19777 { ac_try='test -z "$ac_c_werror_flag"
19778 || test ! -s conftest.err'
19779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19780 (eval $ac_try) 2>&5
19781 ac_status=$?
19782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19783 (exit $ac_status); }; } &&
19784 { ac_try='test -s conftest$ac_exeext'
19785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19786 (eval $ac_try) 2>&5
19787 ac_status=$?
19788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19789 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019790 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000019791else
Martin v. Löwis11437992002-04-12 09:54:03 +000019792 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019793sed 's/^/| /' conftest.$ac_ext >&5
19794
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019795eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019796fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019797rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019798 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019799fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019800echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
19801echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019802if test `eval echo '${'$as_ac_var'}'` = yes; then
19803 cat >>confdefs.h <<_ACEOF
19804#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19805_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019806
Michael W. Hudson54241132001-12-07 15:38:26 +000019807else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019808 case $LIBOBJS in
19809 "$ac_func.$ac_objext" | \
19810 *" $ac_func.$ac_objext" | \
19811 "$ac_func.$ac_objext "* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019812 *" $ac_func.$ac_objext "* ) ;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019813 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019814esac
19815
Guido van Rossum2b3ac691996-08-30 15:18:41 +000019816fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000019817done
19818
Michael W. Hudson54241132001-12-07 15:38:26 +000019819
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019820LIBS=$LIBS_SAVE
19821
Guido van Rossumef2255b2000-03-10 22:30:29 +000019822# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000019823if test "${ac_cv_header_wchar_h+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019824 echo "$as_me:$LINENO: checking for wchar.h" >&5
19825echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019826if test "${ac_cv_header_wchar_h+set}" = set; then
19827 echo $ECHO_N "(cached) $ECHO_C" >&6
19828fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019829echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
19830echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000019831else
Martin v. Löwis11437992002-04-12 09:54:03 +000019832 # Is the header compilable?
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019833echo "$as_me:$LINENO: checking wchar.h usability" >&5
19834echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019835cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019836/* confdefs.h. */
19837_ACEOF
19838cat confdefs.h >>conftest.$ac_ext
19839cat >>conftest.$ac_ext <<_ACEOF
19840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019841$ac_includes_default
19842#include <wchar.h>
19843_ACEOF
19844rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019845if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19846 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019847 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019848 grep -v '^ *+' conftest.er1 >conftest.err
19849 rm -f conftest.er1
19850 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019851 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019852 (exit $ac_status); } &&
19853 { ac_try='test -z "$ac_c_werror_flag"
19854 || test ! -s conftest.err'
19855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19856 (eval $ac_try) 2>&5
19857 ac_status=$?
19858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19859 (exit $ac_status); }; } &&
19860 { ac_try='test -s conftest.$ac_objext'
19861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19862 (eval $ac_try) 2>&5
19863 ac_status=$?
19864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19865 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019866 ac_header_compiler=yes
19867else
19868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019869sed 's/^/| /' conftest.$ac_ext >&5
19870
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019871ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019872fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019873rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19874echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
19875echo "${ECHO_T}$ac_header_compiler" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019876
19877# Is the header present?
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019878echo "$as_me:$LINENO: checking wchar.h presence" >&5
19879echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019880cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019881/* confdefs.h. */
19882_ACEOF
19883cat confdefs.h >>conftest.$ac_ext
19884cat >>conftest.$ac_ext <<_ACEOF
19885/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000019886#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019887_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019888if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19889 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019890 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000019891 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000019892 rm -f conftest.er1
19893 cat conftest.err >&5
19894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019895 (exit $ac_status); } >/dev/null; then
19896 if test -s conftest.err; then
19897 ac_cpp_err=$ac_c_preproc_warn_flag
19898 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
19899 else
19900 ac_cpp_err=
19901 fi
19902else
19903 ac_cpp_err=yes
19904fi
19905if test -z "$ac_cpp_err"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019906 ac_header_preproc=yes
19907else
19908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019909sed 's/^/| /' conftest.$ac_ext >&5
19910
Martin v. Löwis11437992002-04-12 09:54:03 +000019911 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000019912fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019913rm -f conftest.err conftest.$ac_ext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019914echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
19915echo "${ECHO_T}$ac_header_preproc" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019916
19917# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019918case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
19919 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000019920 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
19921echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000019922 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
19923echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
19924 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019925 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019926 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019927 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
19928echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000019929 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
19930echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
19931 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
19932echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
19933 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
19934echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019935 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
19936echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000019937 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
19938echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019939 (
19940 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000019941## ------------------------------------------------ ##
19942## Report this to http://www.python.org/python-bugs ##
19943## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000019944_ASBOX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019945 ) |
19946 sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000019947 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019948esac
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019949echo "$as_me:$LINENO: checking for wchar.h" >&5
19950echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019951if test "${ac_cv_header_wchar_h+set}" = set; then
19952 echo $ECHO_N "(cached) $ECHO_C" >&6
19953else
19954 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000019955fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019956echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
19957echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019958
19959fi
19960if test $ac_cv_header_wchar_h = yes; then
19961
19962
19963cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000019964#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019965_ACEOF
19966
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019967 wchar_h="yes"
19968
Guido van Rossumef2255b2000-03-10 22:30:29 +000019969else
Martin v. Löwis11437992002-04-12 09:54:03 +000019970 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000019971
19972fi
19973
Michael W. Hudson54241132001-12-07 15:38:26 +000019974
Martin v. Löwis11437992002-04-12 09:54:03 +000019975
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000019976# determine wchar_t size
19977if test "$wchar_h" = yes
19978then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019979 echo "$as_me:$LINENO: checking for wchar_t" >&5
19980echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019981if test "${ac_cv_type_wchar_t+set}" = set; then
19982 echo $ECHO_N "(cached) $ECHO_C" >&6
19983else
19984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019985/* confdefs.h. */
19986_ACEOF
19987cat confdefs.h >>conftest.$ac_ext
19988cat >>conftest.$ac_ext <<_ACEOF
19989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019990#include <wchar.h>
19991
Martin v. Löwis11437992002-04-12 09:54:03 +000019992int
19993main ()
19994{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019995if ((wchar_t *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000019996 return 0;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000019997if (sizeof (wchar_t))
Martin v. Löwis11437992002-04-12 09:54:03 +000019998 return 0;
19999 ;
20000 return 0;
20001}
20002_ACEOF
20003rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020004if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20005 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020007 grep -v '^ *+' conftest.er1 >conftest.err
20008 rm -f conftest.er1
20009 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020011 (exit $ac_status); } &&
20012 { ac_try='test -z "$ac_c_werror_flag"
20013 || test ! -s conftest.err'
20014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20015 (eval $ac_try) 2>&5
20016 ac_status=$?
20017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20018 (exit $ac_status); }; } &&
20019 { ac_try='test -s conftest.$ac_objext'
20020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20021 (eval $ac_try) 2>&5
20022 ac_status=$?
20023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20024 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020025 ac_cv_type_wchar_t=yes
20026else
20027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020028sed 's/^/| /' conftest.$ac_ext >&5
20029
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020030ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020031fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020032rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020033fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020034echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
20035echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020036
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020037echo "$as_me:$LINENO: checking size of wchar_t" >&5
20038echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020039if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20040 echo $ECHO_N "(cached) $ECHO_C" >&6
20041else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020042 if test "$ac_cv_type_wchar_t" = yes; then
20043 # The cast to unsigned long works around a bug in the HP C Compiler
20044 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20045 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20046 # This bug is HP SR number 8606223364.
Martin v. Löwis11437992002-04-12 09:54:03 +000020047 if test "$cross_compiling" = yes; then
20048 # Depending upon the size, compute the lo and hi bounds.
20049cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020050/* confdefs.h. */
20051_ACEOF
20052cat confdefs.h >>conftest.$ac_ext
20053cat >>conftest.$ac_ext <<_ACEOF
20054/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020055#include <wchar.h>
20056
Martin v. Löwis11437992002-04-12 09:54:03 +000020057int
20058main ()
20059{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020060static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020061test_array [0] = 0
20062
20063 ;
20064 return 0;
20065}
20066_ACEOF
20067rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020068if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20069 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020071 grep -v '^ *+' conftest.er1 >conftest.err
20072 rm -f conftest.er1
20073 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020075 (exit $ac_status); } &&
20076 { ac_try='test -z "$ac_c_werror_flag"
20077 || test ! -s conftest.err'
20078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20079 (eval $ac_try) 2>&5
20080 ac_status=$?
20081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20082 (exit $ac_status); }; } &&
20083 { ac_try='test -s conftest.$ac_objext'
20084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20085 (eval $ac_try) 2>&5
20086 ac_status=$?
20087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20088 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020089 ac_lo=0 ac_mid=0
20090 while :; do
20091 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020092/* confdefs.h. */
20093_ACEOF
20094cat confdefs.h >>conftest.$ac_ext
20095cat >>conftest.$ac_ext <<_ACEOF
20096/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020097#include <wchar.h>
20098
Martin v. Löwis11437992002-04-12 09:54:03 +000020099int
20100main ()
20101{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020102static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020103test_array [0] = 0
20104
20105 ;
20106 return 0;
20107}
20108_ACEOF
20109rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020110if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20111 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020112 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020113 grep -v '^ *+' conftest.er1 >conftest.err
20114 rm -f conftest.er1
20115 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020117 (exit $ac_status); } &&
20118 { ac_try='test -z "$ac_c_werror_flag"
20119 || test ! -s conftest.err'
20120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20121 (eval $ac_try) 2>&5
20122 ac_status=$?
20123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20124 (exit $ac_status); }; } &&
20125 { ac_try='test -s conftest.$ac_objext'
20126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20127 (eval $ac_try) 2>&5
20128 ac_status=$?
20129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20130 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020131 ac_hi=$ac_mid; break
20132else
20133 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020134sed 's/^/| /' conftest.$ac_ext >&5
20135
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020136ac_lo=`expr $ac_mid + 1`
20137 if test $ac_lo -le $ac_mid; then
20138 ac_lo= ac_hi=
20139 break
20140 fi
20141 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000020142fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020143rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020144 done
20145else
20146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020147sed 's/^/| /' conftest.$ac_ext >&5
20148
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020150/* confdefs.h. */
20151_ACEOF
20152cat confdefs.h >>conftest.$ac_ext
20153cat >>conftest.$ac_ext <<_ACEOF
20154/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020155#include <wchar.h>
20156
Martin v. Löwis11437992002-04-12 09:54:03 +000020157int
20158main ()
20159{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020160static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020161test_array [0] = 0
20162
20163 ;
20164 return 0;
20165}
20166_ACEOF
20167rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020168if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20169 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020170 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020171 grep -v '^ *+' conftest.er1 >conftest.err
20172 rm -f conftest.er1
20173 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020175 (exit $ac_status); } &&
20176 { ac_try='test -z "$ac_c_werror_flag"
20177 || test ! -s conftest.err'
20178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20179 (eval $ac_try) 2>&5
20180 ac_status=$?
20181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20182 (exit $ac_status); }; } &&
20183 { ac_try='test -s conftest.$ac_objext'
20184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20185 (eval $ac_try) 2>&5
20186 ac_status=$?
20187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20188 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020189 ac_hi=-1 ac_mid=-1
20190 while :; do
20191 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020192/* confdefs.h. */
20193_ACEOF
20194cat confdefs.h >>conftest.$ac_ext
20195cat >>conftest.$ac_ext <<_ACEOF
20196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020197#include <wchar.h>
20198
Martin v. Löwis11437992002-04-12 09:54:03 +000020199int
20200main ()
20201{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020202static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020203test_array [0] = 0
20204
20205 ;
20206 return 0;
20207}
20208_ACEOF
20209rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020210if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20211 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020213 grep -v '^ *+' conftest.er1 >conftest.err
20214 rm -f conftest.er1
20215 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020217 (exit $ac_status); } &&
20218 { ac_try='test -z "$ac_c_werror_flag"
20219 || test ! -s conftest.err'
20220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20221 (eval $ac_try) 2>&5
20222 ac_status=$?
20223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20224 (exit $ac_status); }; } &&
20225 { ac_try='test -s conftest.$ac_objext'
20226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20227 (eval $ac_try) 2>&5
20228 ac_status=$?
20229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20230 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020231 ac_lo=$ac_mid; break
20232else
20233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020234sed 's/^/| /' conftest.$ac_ext >&5
20235
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020236ac_hi=`expr '(' $ac_mid ')' - 1`
20237 if test $ac_mid -le $ac_hi; then
20238 ac_lo= ac_hi=
20239 break
20240 fi
20241 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000020242fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020243rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020244 done
20245else
20246 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020247sed 's/^/| /' conftest.$ac_ext >&5
20248
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020249ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000020250fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020251rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020252fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020253rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020254# Binary search between lo and hi bounds.
20255while test "x$ac_lo" != "x$ac_hi"; do
20256 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20257 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020258/* confdefs.h. */
20259_ACEOF
20260cat confdefs.h >>conftest.$ac_ext
20261cat >>conftest.$ac_ext <<_ACEOF
20262/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020263#include <wchar.h>
20264
Martin v. Löwis11437992002-04-12 09:54:03 +000020265int
20266main ()
20267{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020268static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020269test_array [0] = 0
20270
20271 ;
20272 return 0;
20273}
20274_ACEOF
20275rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020276if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20277 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020279 grep -v '^ *+' conftest.er1 >conftest.err
20280 rm -f conftest.er1
20281 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020282 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020283 (exit $ac_status); } &&
20284 { ac_try='test -z "$ac_c_werror_flag"
20285 || test ! -s conftest.err'
20286 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20287 (eval $ac_try) 2>&5
20288 ac_status=$?
20289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20290 (exit $ac_status); }; } &&
20291 { ac_try='test -s conftest.$ac_objext'
20292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20293 (eval $ac_try) 2>&5
20294 ac_status=$?
20295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20296 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020297 ac_hi=$ac_mid
20298else
20299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020300sed 's/^/| /' conftest.$ac_ext >&5
20301
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020302ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000020303fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020304rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020305done
20306case $ac_lo in
20307?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020308'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000020309See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020310echo "$as_me: error: cannot compute sizeof (wchar_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000020311See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020312 { (exit 1); exit 1; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020313esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020314else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020315 if test "$cross_compiling" = yes; then
20316 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20317See \`config.log' for more details." >&5
20318echo "$as_me: error: cannot run test program while cross compiling
20319See \`config.log' for more details." >&2;}
20320 { (exit 1); exit 1; }; }
20321else
Martin v. Löwis11437992002-04-12 09:54:03 +000020322 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020323/* confdefs.h. */
20324_ACEOF
20325cat confdefs.h >>conftest.$ac_ext
20326cat >>conftest.$ac_ext <<_ACEOF
20327/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020328#include <wchar.h>
20329
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020330long longval () { return (long) (sizeof (wchar_t)); }
20331unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000020332#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020333#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020334int
20335main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020336{
Martin v. Löwis11437992002-04-12 09:54:03 +000020337
20338 FILE *f = fopen ("conftest.val", "w");
20339 if (! f)
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020340 exit (1);
20341 if (((long) (sizeof (wchar_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000020342 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020343 long i = longval ();
20344 if (i != ((long) (sizeof (wchar_t))))
20345 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +000020346 fprintf (f, "%ld\n", i);
20347 }
20348 else
20349 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020350 unsigned long i = ulongval ();
20351 if (i != ((long) (sizeof (wchar_t))))
20352 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +000020353 fprintf (f, "%lu\n", i);
20354 }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020355 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020356
20357 ;
20358 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000020359}
Martin v. Löwis11437992002-04-12 09:54:03 +000020360_ACEOF
20361rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020362if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20363 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020364 ac_status=$?
20365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20366 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20368 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020369 ac_status=$?
20370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20371 (exit $ac_status); }; }; then
20372 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000020373else
Martin v. Löwis11437992002-04-12 09:54:03 +000020374 echo "$as_me: program exited with status $ac_status" >&5
20375echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020376sed 's/^/| /' conftest.$ac_ext >&5
20377
Martin v. Löwis11437992002-04-12 09:54:03 +000020378( exit $ac_status )
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020379{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000020380See \`config.log' for more details." >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020381echo "$as_me: error: cannot compute sizeof (wchar_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000020382See \`config.log' for more details." >&2;}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020383 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020384fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020385rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20386fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020387fi
20388rm -f conftest.val
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020389else
20390 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000020391fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020392fi
20393echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
20394echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020395cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020396#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000020397_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020398
Michael W. Hudson54241132001-12-07 15:38:26 +000020399
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020400fi
20401
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020402echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
20403echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020404have_ucs4_tcl=no
20405cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020406/* confdefs.h. */
20407_ACEOF
20408cat confdefs.h >>conftest.$ac_ext
20409cat >>conftest.$ac_ext <<_ACEOF
20410/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020411
20412#include <tcl.h>
20413#if TCL_UTF_MAX != 6
20414# error "NOT UCS4_TCL"
20415#endif
20416int
20417main ()
20418{
20419
20420 ;
20421 return 0;
20422}
20423_ACEOF
20424rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020425if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20426 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020427 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020428 grep -v '^ *+' conftest.er1 >conftest.err
20429 rm -f conftest.er1
20430 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020432 (exit $ac_status); } &&
20433 { ac_try='test -z "$ac_c_werror_flag"
20434 || test ! -s conftest.err'
20435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20436 (eval $ac_try) 2>&5
20437 ac_status=$?
20438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20439 (exit $ac_status); }; } &&
20440 { ac_try='test -s conftest.$ac_objext'
20441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20442 (eval $ac_try) 2>&5
20443 ac_status=$?
20444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20445 (exit $ac_status); }; }; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020446
20447
20448cat >>confdefs.h <<\_ACEOF
20449#define HAVE_UCS4_TCL 1
20450_ACEOF
20451
20452 have_ucs4_tcl=yes
20453
20454else
20455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020456sed 's/^/| /' conftest.$ac_ext >&5
20457
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020458fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020459rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20460echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
20461echo "${ECHO_T}$have_ucs4_tcl" >&6
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020462
Skip Montanaro6dead952003-09-25 14:50:04 +000020463# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020464if test "$wchar_h" = yes
20465then
20466 # check whether wchar_t is signed or not
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020467 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
20468echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020469 if test "${ac_cv_wchar_t_signed+set}" = set; then
20470 echo $ECHO_N "(cached) $ECHO_C" >&6
20471else
20472
20473 if test "$cross_compiling" = yes; then
20474 ac_cv_wchar_t_signed=yes
20475else
20476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020477/* confdefs.h. */
20478_ACEOF
20479cat confdefs.h >>conftest.$ac_ext
20480cat >>conftest.$ac_ext <<_ACEOF
20481/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020482
20483 #include <wchar.h>
20484 int main()
20485 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000020486 /* Success: exit code 0 */
20487 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020488 }
20489
20490_ACEOF
20491rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020492if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20493 (eval $ac_link) 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020494 ac_status=$?
20495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20496 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20498 (eval $ac_try) 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020499 ac_status=$?
20500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20501 (exit $ac_status); }; }; then
20502 ac_cv_wchar_t_signed=yes
20503else
20504 echo "$as_me: program exited with status $ac_status" >&5
20505echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020506sed 's/^/| /' conftest.$ac_ext >&5
20507
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020508( exit $ac_status )
20509ac_cv_wchar_t_signed=no
20510fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020511rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20512fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020513fi
20514
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020515 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
20516echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020517fi
20518
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020519echo "$as_me:$LINENO: checking what type to use for unicode" >&5
20520echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
20521# Check whether --enable-unicode or --disable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020522if test "${enable_unicode+set}" = set; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020523 enableval="$enable_unicode"
20524
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020525else
20526 enable_unicode=yes
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020527fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020528
20529if test $enable_unicode = yes
20530then
Martin v. Löwisfd917792001-06-27 20:22:04 +000020531 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020532 case "$have_ucs4_tcl" in
20533 yes) enable_unicode="ucs4"
20534 ;;
20535 *) enable_unicode="ucs2"
20536 ;;
20537 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020538fi
20539
Martin v. Löwis0036cba2002-04-12 09:58:45 +000020540
20541
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020542case "$enable_unicode" in
20543ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000020544 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020545#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000020546_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020547
20548 ;;
20549ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000020550 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020551#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000020552_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020553
20554 ;;
20555esac
20556
Michael W. Hudson54241132001-12-07 15:38:26 +000020557
Martin v. Löwis11437992002-04-12 09:54:03 +000020558
20559
Martin v. Löwis0036cba2002-04-12 09:58:45 +000020560
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020561if test "$enable_unicode" = "no"
20562then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000020563 UNICODE_OBJS=""
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020564 echo "$as_me:$LINENO: result: not used" >&5
20565echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020566else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000020567 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000020568
20569cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020570#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020571_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020572
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020573
20574 # wchar_t is only usable if it maps to an unsigned type
20575 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000020576 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020577 then
20578 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020579
Martin v. Löwis11437992002-04-12 09:54:03 +000020580cat >>confdefs.h <<\_ACEOF
20581#define HAVE_USABLE_WCHAR_T 1
20582_ACEOF
20583
20584 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020585#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000020586_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020587
20588 elif test "$ac_cv_sizeof_short" = "$unicode_size"
20589 then
20590 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000020591 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020592#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000020593_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020594
20595 elif test "$ac_cv_sizeof_long" = "$unicode_size"
20596 then
20597 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000020598 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020599#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000020600_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020601
20602 else
20603 PY_UNICODE_TYPE="no type found"
20604 fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020605 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
20606echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020607fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020608
20609# check for endianness
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020610echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
20611echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020612if test "${ac_cv_c_bigendian+set}" = set; then
20613 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000020614else
Martin v. Löwis11437992002-04-12 09:54:03 +000020615 # See if sys/param.h defines the BYTE_ORDER macro.
20616cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020617/* confdefs.h. */
20618_ACEOF
20619cat confdefs.h >>conftest.$ac_ext
20620cat >>conftest.$ac_ext <<_ACEOF
20621/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000020622#include <sys/types.h>
20623#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000020624
Martin v. Löwis11437992002-04-12 09:54:03 +000020625int
20626main ()
20627{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020628#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
Guido van Rossumef2255b2000-03-10 22:30:29 +000020629 bogus endian macros
20630#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020631
20632 ;
20633 return 0;
20634}
20635_ACEOF
20636rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020637if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20638 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020639 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020640 grep -v '^ *+' conftest.er1 >conftest.err
20641 rm -f conftest.er1
20642 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020644 (exit $ac_status); } &&
20645 { ac_try='test -z "$ac_c_werror_flag"
20646 || test ! -s conftest.err'
20647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20648 (eval $ac_try) 2>&5
20649 ac_status=$?
20650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20651 (exit $ac_status); }; } &&
20652 { ac_try='test -s conftest.$ac_objext'
20653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20654 (eval $ac_try) 2>&5
20655 ac_status=$?
20656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20657 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000020658 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000020659cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020660/* confdefs.h. */
20661_ACEOF
20662cat confdefs.h >>conftest.$ac_ext
20663cat >>conftest.$ac_ext <<_ACEOF
20664/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000020665#include <sys/types.h>
20666#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000020667
Martin v. Löwis11437992002-04-12 09:54:03 +000020668int
20669main ()
20670{
Guido van Rossumef2255b2000-03-10 22:30:29 +000020671#if BYTE_ORDER != BIG_ENDIAN
20672 not big endian
20673#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020674
20675 ;
20676 return 0;
20677}
20678_ACEOF
20679rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020680if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20681 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020683 grep -v '^ *+' conftest.er1 >conftest.err
20684 rm -f conftest.er1
20685 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020687 (exit $ac_status); } &&
20688 { ac_try='test -z "$ac_c_werror_flag"
20689 || test ! -s conftest.err'
20690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20691 (eval $ac_try) 2>&5
20692 ac_status=$?
20693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20694 (exit $ac_status); }; } &&
20695 { ac_try='test -s conftest.$ac_objext'
20696 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20697 (eval $ac_try) 2>&5
20698 ac_status=$?
20699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20700 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000020701 ac_cv_c_bigendian=yes
20702else
Martin v. Löwis11437992002-04-12 09:54:03 +000020703 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020704sed 's/^/| /' conftest.$ac_ext >&5
20705
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020706ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000020707fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020708rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000020709else
Martin v. Löwis11437992002-04-12 09:54:03 +000020710 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020711sed 's/^/| /' conftest.$ac_ext >&5
20712
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020713# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000020714if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020715 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000020716 ac_cv_c_bigendian=unknown
20717 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020718/* confdefs.h. */
20719_ACEOF
20720cat confdefs.h >>conftest.$ac_ext
20721cat >>conftest.$ac_ext <<_ACEOF
20722/* end confdefs.h. */
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020723short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
20724short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000020725void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020726short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
20727short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000020728void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020729int
20730main ()
20731{
20732 _ascii (); _ebcdic ();
20733 ;
20734 return 0;
20735}
20736_ACEOF
20737rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020738if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20739 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020741 grep -v '^ *+' conftest.er1 >conftest.err
20742 rm -f conftest.er1
20743 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020745 (exit $ac_status); } &&
20746 { ac_try='test -z "$ac_c_werror_flag"
20747 || test ! -s conftest.err'
20748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20749 (eval $ac_try) 2>&5
20750 ac_status=$?
20751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20752 (exit $ac_status); }; } &&
20753 { ac_try='test -s conftest.$ac_objext'
20754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20755 (eval $ac_try) 2>&5
20756 ac_status=$?
20757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20758 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020759 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020760 ac_cv_c_bigendian=yes
20761fi
Skip Montanaro6dead952003-09-25 14:50:04 +000020762if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020763 if test "$ac_cv_c_bigendian" = unknown; then
20764 ac_cv_c_bigendian=no
20765 else
20766 # finding both strings is unlikely to happen, but who knows?
20767 ac_cv_c_bigendian=unknown
20768 fi
20769fi
20770else
20771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020772sed 's/^/| /' conftest.$ac_ext >&5
20773
Martin v. Löwis11437992002-04-12 09:54:03 +000020774fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020775rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020776else
20777 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020778/* confdefs.h. */
20779_ACEOF
20780cat confdefs.h >>conftest.$ac_ext
20781cat >>conftest.$ac_ext <<_ACEOF
20782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020783int
20784main ()
20785{
Guido van Rossumef2255b2000-03-10 22:30:29 +000020786 /* Are we little or big endian? From Harbison&Steele. */
20787 union
20788 {
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020789 long l;
20790 char c[sizeof (long)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000020791 } u;
20792 u.l = 1;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020793 exit (u.c[sizeof (long) - 1] == 1);
Guido van Rossumef2255b2000-03-10 22:30:29 +000020794}
Martin v. Löwis11437992002-04-12 09:54:03 +000020795_ACEOF
20796rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020797if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20798 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020799 ac_status=$?
20800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20801 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20803 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020804 ac_status=$?
20805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20806 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000020807 ac_cv_c_bigendian=no
20808else
Martin v. Löwis11437992002-04-12 09:54:03 +000020809 echo "$as_me: program exited with status $ac_status" >&5
20810echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020811sed 's/^/| /' conftest.$ac_ext >&5
20812
Martin v. Löwis11437992002-04-12 09:54:03 +000020813( exit $ac_status )
20814ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000020815fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020816rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000020817fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020818fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020819rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020820fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020821echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
20822echo "${ECHO_T}$ac_cv_c_bigendian" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020823case $ac_cv_c_bigendian in
20824 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000020825
Martin v. Löwis11437992002-04-12 09:54:03 +000020826cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000020827#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020828_ACEOF
20829 ;;
20830 no)
20831 ;;
20832 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000020833 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000020834presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020835echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000020836presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
20837 { (exit 1); exit 1; }; } ;;
20838esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000020839
Michael W. Hudson54241132001-12-07 15:38:26 +000020840
Thomas Wouters477c8d52006-05-27 19:21:47 +000020841
20842
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020843# Check whether right shifting a negative integer extends the sign bit
20844# or fills with zeros (like the Cray J90, according to Tim Peters).
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020845echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
20846echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020847if test "${ac_cv_rshift_extends_sign+set}" = set; then
20848 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000020849else
Martin v. Löwis11437992002-04-12 09:54:03 +000020850
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020851if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000020852 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020853else
Martin v. Löwis11437992002-04-12 09:54:03 +000020854 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020855/* confdefs.h. */
20856_ACEOF
20857cat confdefs.h >>conftest.$ac_ext
20858cat >>conftest.$ac_ext <<_ACEOF
20859/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020860
20861int main()
20862{
Vladimir Marangozova6180282000-07-12 05:05:06 +000020863 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020864}
20865
Martin v. Löwis11437992002-04-12 09:54:03 +000020866_ACEOF
20867rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020868if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20869 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020870 ac_status=$?
20871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20872 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20874 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020875 ac_status=$?
20876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20877 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000020878 ac_cv_rshift_extends_sign=yes
20879else
Martin v. Löwis11437992002-04-12 09:54:03 +000020880 echo "$as_me: program exited with status $ac_status" >&5
20881echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020882sed 's/^/| /' conftest.$ac_ext >&5
20883
Martin v. Löwis11437992002-04-12 09:54:03 +000020884( exit $ac_status )
20885ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000020886fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020887rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20888fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000020889fi
20890
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020891echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
20892echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000020893if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020894then
Martin v. Löwis11437992002-04-12 09:54:03 +000020895
20896cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020897#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020898_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020899
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020900fi
20901
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020902# check for getc_unlocked and related locking functions
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020903echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
20904echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020905if test "${ac_cv_have_getc_unlocked+set}" = set; then
20906 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020907else
Martin v. Löwis11437992002-04-12 09:54:03 +000020908
20909cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020910/* confdefs.h. */
20911_ACEOF
20912cat confdefs.h >>conftest.$ac_ext
20913cat >>conftest.$ac_ext <<_ACEOF
20914/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020915#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020916int
20917main ()
20918{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020919
20920 FILE *f = fopen("/dev/null", "r");
20921 flockfile(f);
20922 getc_unlocked(f);
20923 funlockfile(f);
20924
Martin v. Löwis11437992002-04-12 09:54:03 +000020925 ;
20926 return 0;
20927}
20928_ACEOF
20929rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020930if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20931 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020932 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020933 grep -v '^ *+' conftest.er1 >conftest.err
20934 rm -f conftest.er1
20935 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020937 (exit $ac_status); } &&
20938 { ac_try='test -z "$ac_c_werror_flag"
20939 || test ! -s conftest.err'
20940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20941 (eval $ac_try) 2>&5
20942 ac_status=$?
20943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20944 (exit $ac_status); }; } &&
20945 { ac_try='test -s conftest$ac_exeext'
20946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20947 (eval $ac_try) 2>&5
20948 ac_status=$?
20949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20950 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020951 ac_cv_have_getc_unlocked=yes
20952else
Martin v. Löwis11437992002-04-12 09:54:03 +000020953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020954sed 's/^/| /' conftest.$ac_ext >&5
20955
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020956ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020957fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020958rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020959 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020960fi
20961
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020962echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
20963echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020964if test "$ac_cv_have_getc_unlocked" = yes
20965then
Martin v. Löwis11437992002-04-12 09:54:03 +000020966
20967cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020968#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020969_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000020970
20971fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000020972
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020973# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000020974# save the value of LIBS so we don't actually link Python with readline
20975LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020976
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020977echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
20978echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020979if test "${ac_cv_lib_readline_readline+set}" = set; then
20980 echo $ECHO_N "(cached) $ECHO_C" >&6
20981else
20982 ac_check_lib_save_LIBS=$LIBS
20983LIBS="-lreadline $LIBS"
20984cat >conftest.$ac_ext <<_ACEOF
20985/* confdefs.h. */
20986_ACEOF
20987cat confdefs.h >>conftest.$ac_ext
20988cat >>conftest.$ac_ext <<_ACEOF
20989/* end confdefs.h. */
20990
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020991/* Override any gcc2 internal prototype to avoid an error. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020992#ifdef __cplusplus
20993extern "C"
20994#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000020995/* We use char because int might match the return type of a gcc2
20996 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000020997char readline ();
20998int
20999main ()
21000{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021001readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021002 ;
21003 return 0;
21004}
21005_ACEOF
21006rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021007if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21008 (eval $ac_link) 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021009 ac_status=$?
21010 grep -v '^ *+' conftest.er1 >conftest.err
21011 rm -f conftest.er1
21012 cat conftest.err >&5
21013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021014 (exit $ac_status); } &&
21015 { ac_try='test -z "$ac_c_werror_flag"
21016 || test ! -s conftest.err'
21017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21018 (eval $ac_try) 2>&5
21019 ac_status=$?
21020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21021 (exit $ac_status); }; } &&
21022 { ac_try='test -s conftest$ac_exeext'
21023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21024 (eval $ac_try) 2>&5
21025 ac_status=$?
21026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21027 (exit $ac_status); }; }; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021028 ac_cv_lib_readline_readline=yes
21029else
21030 echo "$as_me: failed program was:" >&5
21031sed 's/^/| /' conftest.$ac_ext >&5
21032
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021033ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021034fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021035rm -f conftest.err conftest.$ac_objext \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021036 conftest$ac_exeext conftest.$ac_ext
21037LIBS=$ac_check_lib_save_LIBS
21038fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021039echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
21040echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021041if test $ac_cv_lib_readline_readline = yes; then
21042 cat >>confdefs.h <<_ACEOF
21043#define HAVE_LIBREADLINE 1
21044_ACEOF
21045
21046 LIBS="-lreadline $LIBS"
21047
21048fi
21049
21050if test "$ac_cv_have_readline_readline" = no
21051then
21052
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021053echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
21054echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021055if test "${ac_cv_lib_termcap_readline+set}" = set; then
21056 echo $ECHO_N "(cached) $ECHO_C" >&6
21057else
21058 ac_check_lib_save_LIBS=$LIBS
21059LIBS="-ltermcap $LIBS"
21060cat >conftest.$ac_ext <<_ACEOF
21061/* confdefs.h. */
21062_ACEOF
21063cat confdefs.h >>conftest.$ac_ext
21064cat >>conftest.$ac_ext <<_ACEOF
21065/* end confdefs.h. */
21066
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021067/* Override any gcc2 internal prototype to avoid an error. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021068#ifdef __cplusplus
21069extern "C"
21070#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021071/* We use char because int might match the return type of a gcc2
21072 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021073char readline ();
21074int
21075main ()
21076{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021077readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021078 ;
21079 return 0;
21080}
21081_ACEOF
21082rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021083if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21084 (eval $ac_link) 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021085 ac_status=$?
21086 grep -v '^ *+' conftest.er1 >conftest.err
21087 rm -f conftest.er1
21088 cat conftest.err >&5
21089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021090 (exit $ac_status); } &&
21091 { ac_try='test -z "$ac_c_werror_flag"
21092 || test ! -s conftest.err'
21093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21094 (eval $ac_try) 2>&5
21095 ac_status=$?
21096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21097 (exit $ac_status); }; } &&
21098 { ac_try='test -s conftest$ac_exeext'
21099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21100 (eval $ac_try) 2>&5
21101 ac_status=$?
21102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21103 (exit $ac_status); }; }; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021104 ac_cv_lib_termcap_readline=yes
21105else
21106 echo "$as_me: failed program was:" >&5
21107sed 's/^/| /' conftest.$ac_ext >&5
21108
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021109ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021110fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021111rm -f conftest.err conftest.$ac_objext \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021112 conftest$ac_exeext conftest.$ac_ext
21113LIBS=$ac_check_lib_save_LIBS
21114fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021115echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
21116echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021117if test $ac_cv_lib_termcap_readline = yes; then
21118 cat >>confdefs.h <<_ACEOF
21119#define HAVE_LIBTERMCAP 1
21120_ACEOF
21121
21122 LIBS="-ltermcap $LIBS"
21123
21124fi
21125
21126fi
21127
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021128# check for readline 2.1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021129echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
21130echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021131if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
21132 echo $ECHO_N "(cached) $ECHO_C" >&6
21133else
21134 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021135LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021136cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021137/* confdefs.h. */
21138_ACEOF
21139cat confdefs.h >>conftest.$ac_ext
21140cat >>conftest.$ac_ext <<_ACEOF
21141/* end confdefs.h. */
21142
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021143/* Override any gcc2 internal prototype to avoid an error. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021144#ifdef __cplusplus
21145extern "C"
21146#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021147/* We use char because int might match the return type of a gcc2
21148 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021149char rl_callback_handler_install ();
21150int
21151main ()
21152{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021153rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021154 ;
21155 return 0;
21156}
21157_ACEOF
21158rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021159if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21160 (eval $ac_link) 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021162 grep -v '^ *+' conftest.er1 >conftest.err
21163 rm -f conftest.er1
21164 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021166 (exit $ac_status); } &&
21167 { ac_try='test -z "$ac_c_werror_flag"
21168 || test ! -s conftest.err'
21169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21170 (eval $ac_try) 2>&5
21171 ac_status=$?
21172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21173 (exit $ac_status); }; } &&
21174 { ac_try='test -s conftest$ac_exeext'
21175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21176 (eval $ac_try) 2>&5
21177 ac_status=$?
21178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21179 (exit $ac_status); }; }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021180 ac_cv_lib_readline_rl_callback_handler_install=yes
21181else
21182 echo "$as_me: failed program was:" >&5
21183sed 's/^/| /' conftest.$ac_ext >&5
21184
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021185ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021186fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021187rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021188 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021189LIBS=$ac_check_lib_save_LIBS
21190fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021191echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
21192echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021193if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
21194
21195cat >>confdefs.h <<\_ACEOF
21196#define HAVE_RL_CALLBACK 1
21197_ACEOF
21198
21199fi
21200
21201
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021202# check for readline 2.2
21203cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021204/* confdefs.h. */
21205_ACEOF
21206cat confdefs.h >>conftest.$ac_ext
21207cat >>conftest.$ac_ext <<_ACEOF
21208/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021209#include <readline/readline.h>
21210_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021211if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21212 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021213 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021214 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021215 rm -f conftest.er1
21216 cat conftest.err >&5
21217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021218 (exit $ac_status); } >/dev/null; then
21219 if test -s conftest.err; then
21220 ac_cpp_err=$ac_c_preproc_warn_flag
21221 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
21222 else
21223 ac_cpp_err=
21224 fi
21225else
21226 ac_cpp_err=yes
21227fi
21228if test -z "$ac_cpp_err"; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021229 have_readline=yes
21230else
21231 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021232sed 's/^/| /' conftest.$ac_ext >&5
21233
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021234 have_readline=no
21235fi
21236rm -f conftest.err conftest.$ac_ext
21237if test $have_readline = yes
21238then
21239 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021240/* confdefs.h. */
21241_ACEOF
21242cat confdefs.h >>conftest.$ac_ext
21243cat >>conftest.$ac_ext <<_ACEOF
21244/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021245#include <readline/readline.h>
21246
21247_ACEOF
21248if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000021249 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021250
21251cat >>confdefs.h <<\_ACEOF
21252#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
21253_ACEOF
21254
21255fi
21256rm -f conftest*
21257
21258fi
21259
Martin v. Löwis0daad592001-09-30 21:09:59 +000021260# check for readline 4.0
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021261echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
21262echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021263if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
21264 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000021265else
Martin v. Löwis11437992002-04-12 09:54:03 +000021266 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021267LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021268cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021269/* confdefs.h. */
21270_ACEOF
21271cat confdefs.h >>conftest.$ac_ext
21272cat >>conftest.$ac_ext <<_ACEOF
21273/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021274
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021275/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021276#ifdef __cplusplus
21277extern "C"
21278#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021279/* We use char because int might match the return type of a gcc2
21280 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021281char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021282int
21283main ()
21284{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021285rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021286 ;
21287 return 0;
21288}
21289_ACEOF
21290rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021291if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21292 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021294 grep -v '^ *+' conftest.er1 >conftest.err
21295 rm -f conftest.er1
21296 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021298 (exit $ac_status); } &&
21299 { ac_try='test -z "$ac_c_werror_flag"
21300 || test ! -s conftest.err'
21301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21302 (eval $ac_try) 2>&5
21303 ac_status=$?
21304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21305 (exit $ac_status); }; } &&
21306 { ac_try='test -s conftest$ac_exeext'
21307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21308 (eval $ac_try) 2>&5
21309 ac_status=$?
21310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21311 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021312 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000021313else
Martin v. Löwis11437992002-04-12 09:54:03 +000021314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021315sed 's/^/| /' conftest.$ac_ext >&5
21316
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021317ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000021318fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021319rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021320 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021321LIBS=$ac_check_lib_save_LIBS
21322fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021323echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
21324echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021325if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021326
Martin v. Löwis11437992002-04-12 09:54:03 +000021327cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000021328#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021329_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000021330
Martin v. Löwis0daad592001-09-30 21:09:59 +000021331fi
21332
Michael W. Hudson54241132001-12-07 15:38:26 +000021333
Martin v. Löwis0daad592001-09-30 21:09:59 +000021334# check for readline 4.2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021335echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
21336echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021337if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
21338 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000021339else
Martin v. Löwis11437992002-04-12 09:54:03 +000021340 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021341LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021342cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021343/* confdefs.h. */
21344_ACEOF
21345cat confdefs.h >>conftest.$ac_ext
21346cat >>conftest.$ac_ext <<_ACEOF
21347/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021348
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021349/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021350#ifdef __cplusplus
21351extern "C"
21352#endif
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021353/* We use char because int might match the return type of a gcc2
21354 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021355char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021356int
21357main ()
21358{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021359rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021360 ;
21361 return 0;
21362}
21363_ACEOF
21364rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021365if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21366 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021368 grep -v '^ *+' conftest.er1 >conftest.err
21369 rm -f conftest.er1
21370 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021372 (exit $ac_status); } &&
21373 { ac_try='test -z "$ac_c_werror_flag"
21374 || test ! -s conftest.err'
21375 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21376 (eval $ac_try) 2>&5
21377 ac_status=$?
21378 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21379 (exit $ac_status); }; } &&
21380 { ac_try='test -s conftest$ac_exeext'
21381 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21382 (eval $ac_try) 2>&5
21383 ac_status=$?
21384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21385 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021386 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000021387else
Martin v. Löwis11437992002-04-12 09:54:03 +000021388 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021389sed 's/^/| /' conftest.$ac_ext >&5
21390
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021391ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000021392fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021393rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021394 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021395LIBS=$ac_check_lib_save_LIBS
21396fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021397echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
21398echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021399if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021400
Martin v. Löwis11437992002-04-12 09:54:03 +000021401cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000021402#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021403_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000021404
Guido van Rossum353ae582001-07-10 16:45:32 +000021405fi
21406
Jack Jansendd19cf82001-12-06 22:36:17 +000021407
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021408# also in readline 4.2
21409cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021410/* confdefs.h. */
21411_ACEOF
21412cat confdefs.h >>conftest.$ac_ext
21413cat >>conftest.$ac_ext <<_ACEOF
21414/* end confdefs.h. */
21415#include <readline/readline.h>
21416_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021417if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21418 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021419 ac_status=$?
21420 grep -v '^ *+' conftest.er1 >conftest.err
21421 rm -f conftest.er1
21422 cat conftest.err >&5
21423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021424 (exit $ac_status); } >/dev/null; then
21425 if test -s conftest.err; then
21426 ac_cpp_err=$ac_c_preproc_warn_flag
21427 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
21428 else
21429 ac_cpp_err=
21430 fi
21431else
21432 ac_cpp_err=yes
21433fi
21434if test -z "$ac_cpp_err"; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021435 have_readline=yes
21436else
21437 echo "$as_me: failed program was:" >&5
21438sed 's/^/| /' conftest.$ac_ext >&5
21439
21440 have_readline=no
21441fi
21442rm -f conftest.err conftest.$ac_ext
21443if test $have_readline = yes
21444then
21445 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021446/* confdefs.h. */
21447_ACEOF
21448cat confdefs.h >>conftest.$ac_ext
21449cat >>conftest.$ac_ext <<_ACEOF
21450/* end confdefs.h. */
21451#include <readline/readline.h>
21452
21453_ACEOF
21454if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21455 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
21456
21457cat >>confdefs.h <<\_ACEOF
21458#define HAVE_RL_CATCH_SIGNAL 1
21459_ACEOF
21460
21461fi
21462rm -f conftest*
21463
21464fi
21465
Martin v. Löwis82bca632006-02-10 20:49:30 +000021466# End of readline checks: restore LIBS
21467LIBS=$LIBS_no_readline
21468
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021469echo "$as_me:$LINENO: checking for broken nice()" >&5
21470echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021471if test "${ac_cv_broken_nice+set}" = set; then
21472 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000021473else
Martin v. Löwis11437992002-04-12 09:54:03 +000021474
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021475if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000021476 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021477else
Martin v. Löwis11437992002-04-12 09:54:03 +000021478 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021479/* confdefs.h. */
21480_ACEOF
21481cat confdefs.h >>conftest.$ac_ext
21482cat >>conftest.$ac_ext <<_ACEOF
21483/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021484
21485int main()
21486{
21487 int val1 = nice(1);
21488 if (val1 != -1 && val1 == nice(2))
21489 exit(0);
21490 exit(1);
21491}
21492
Martin v. Löwis11437992002-04-12 09:54:03 +000021493_ACEOF
21494rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021495if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21496 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021497 ac_status=$?
21498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21499 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21501 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021502 ac_status=$?
21503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21504 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021505 ac_cv_broken_nice=yes
21506else
Martin v. Löwis11437992002-04-12 09:54:03 +000021507 echo "$as_me: program exited with status $ac_status" >&5
21508echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021509sed 's/^/| /' conftest.$ac_ext >&5
21510
Martin v. Löwis11437992002-04-12 09:54:03 +000021511( exit $ac_status )
21512ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021513fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021514rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21515fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021516fi
21517
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021518echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
21519echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021520if test "$ac_cv_broken_nice" = yes
21521then
Martin v. Löwis11437992002-04-12 09:54:03 +000021522
21523cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021524#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021525_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021526
21527fi
21528
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021529echo "$as_me:$LINENO: checking for broken poll()" >&5
21530echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021531if test "$cross_compiling" = yes; then
21532 ac_cv_broken_poll=no
21533else
21534 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021535/* confdefs.h. */
21536_ACEOF
21537cat confdefs.h >>conftest.$ac_ext
21538cat >>conftest.$ac_ext <<_ACEOF
21539/* end confdefs.h. */
21540
21541#include <poll.h>
21542
21543int main (void)
21544 {
21545 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
21546
21547 close (42);
21548
21549 int poll_test = poll (&poll_struct, 1, 0);
21550
21551 if (poll_test < 0)
21552 {
21553 exit(0);
21554 }
21555 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
21556 {
21557 exit(0);
21558 }
21559 else
21560 {
21561 exit(1);
21562 }
21563 }
21564
21565_ACEOF
21566rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021567if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21568 (eval $ac_link) 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021569 ac_status=$?
21570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21571 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21573 (eval $ac_try) 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021574 ac_status=$?
21575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21576 (exit $ac_status); }; }; then
21577 ac_cv_broken_poll=yes
21578else
21579 echo "$as_me: program exited with status $ac_status" >&5
21580echo "$as_me: failed program was:" >&5
21581sed 's/^/| /' conftest.$ac_ext >&5
21582
21583( exit $ac_status )
21584ac_cv_broken_poll=no
21585fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021586rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021587fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021588echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
21589echo "${ECHO_T}$ac_cv_broken_poll" >&6
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021590if test "$ac_cv_broken_poll" = yes
21591then
21592
21593cat >>confdefs.h <<\_ACEOF
21594#define HAVE_BROKEN_POLL 1
21595_ACEOF
21596
21597fi
21598
Brett Cannon43802422005-02-10 20:48:03 +000021599# 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 +000021600# (which is not required by ISO C or UNIX spec) and/or if we support
21601# tzname[]
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021602echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21603echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000021604if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
21605 echo $ECHO_N "(cached) $ECHO_C" >&6
21606else
21607 cat >conftest.$ac_ext <<_ACEOF
21608/* confdefs.h. */
21609_ACEOF
21610cat confdefs.h >>conftest.$ac_ext
21611cat >>conftest.$ac_ext <<_ACEOF
21612/* end confdefs.h. */
21613#include <sys/types.h>
21614#include <$ac_cv_struct_tm>
21615
21616
21617int
21618main ()
21619{
21620static struct tm ac_aggr;
21621if (ac_aggr.tm_zone)
21622return 0;
21623 ;
21624 return 0;
21625}
21626_ACEOF
21627rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021628if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21629 (eval $ac_compile) 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000021630 ac_status=$?
21631 grep -v '^ *+' conftest.er1 >conftest.err
21632 rm -f conftest.er1
21633 cat conftest.err >&5
21634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021635 (exit $ac_status); } &&
21636 { ac_try='test -z "$ac_c_werror_flag"
21637 || test ! -s conftest.err'
21638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21639 (eval $ac_try) 2>&5
21640 ac_status=$?
21641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21642 (exit $ac_status); }; } &&
21643 { ac_try='test -s conftest.$ac_objext'
21644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21645 (eval $ac_try) 2>&5
21646 ac_status=$?
21647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21648 (exit $ac_status); }; }; then
Brett Cannon43802422005-02-10 20:48:03 +000021649 ac_cv_member_struct_tm_tm_zone=yes
21650else
21651 echo "$as_me: failed program was:" >&5
21652sed 's/^/| /' conftest.$ac_ext >&5
21653
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021654cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000021655/* confdefs.h. */
21656_ACEOF
21657cat confdefs.h >>conftest.$ac_ext
21658cat >>conftest.$ac_ext <<_ACEOF
21659/* end confdefs.h. */
21660#include <sys/types.h>
21661#include <$ac_cv_struct_tm>
21662
21663
21664int
21665main ()
21666{
21667static struct tm ac_aggr;
21668if (sizeof ac_aggr.tm_zone)
21669return 0;
21670 ;
21671 return 0;
21672}
21673_ACEOF
21674rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021675if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21676 (eval $ac_compile) 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000021677 ac_status=$?
21678 grep -v '^ *+' conftest.er1 >conftest.err
21679 rm -f conftest.er1
21680 cat conftest.err >&5
21681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021682 (exit $ac_status); } &&
21683 { ac_try='test -z "$ac_c_werror_flag"
21684 || test ! -s conftest.err'
21685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21686 (eval $ac_try) 2>&5
21687 ac_status=$?
21688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21689 (exit $ac_status); }; } &&
21690 { ac_try='test -s conftest.$ac_objext'
21691 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21692 (eval $ac_try) 2>&5
21693 ac_status=$?
21694 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21695 (exit $ac_status); }; }; then
Brett Cannon43802422005-02-10 20:48:03 +000021696 ac_cv_member_struct_tm_tm_zone=yes
21697else
21698 echo "$as_me: failed program was:" >&5
21699sed 's/^/| /' conftest.$ac_ext >&5
21700
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021701ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000021702fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021703rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000021704fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021705rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000021706fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021707echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21708echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
Brett Cannon43802422005-02-10 20:48:03 +000021709if test $ac_cv_member_struct_tm_tm_zone = yes; then
21710
21711cat >>confdefs.h <<_ACEOF
21712#define HAVE_STRUCT_TM_TM_ZONE 1
21713_ACEOF
21714
21715
21716fi
21717
21718if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21719
21720cat >>confdefs.h <<\_ACEOF
21721#define HAVE_TM_ZONE 1
21722_ACEOF
21723
21724else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021725 echo "$as_me:$LINENO: checking for tzname" >&5
21726echo $ECHO_N "checking for tzname... $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000021727if test "${ac_cv_var_tzname+set}" = set; then
21728 echo $ECHO_N "(cached) $ECHO_C" >&6
21729else
21730 cat >conftest.$ac_ext <<_ACEOF
21731/* confdefs.h. */
21732_ACEOF
21733cat confdefs.h >>conftest.$ac_ext
21734cat >>conftest.$ac_ext <<_ACEOF
21735/* end confdefs.h. */
21736#include <time.h>
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021737#ifndef tzname /* For SGI. */
21738extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Brett Cannon43802422005-02-10 20:48:03 +000021739#endif
21740
21741int
21742main ()
21743{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021744atoi(*tzname);
Brett Cannon43802422005-02-10 20:48:03 +000021745 ;
21746 return 0;
21747}
21748_ACEOF
21749rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021750if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21751 (eval $ac_link) 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000021752 ac_status=$?
21753 grep -v '^ *+' conftest.er1 >conftest.err
21754 rm -f conftest.er1
21755 cat conftest.err >&5
21756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021757 (exit $ac_status); } &&
21758 { ac_try='test -z "$ac_c_werror_flag"
21759 || test ! -s conftest.err'
21760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21761 (eval $ac_try) 2>&5
21762 ac_status=$?
21763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21764 (exit $ac_status); }; } &&
21765 { ac_try='test -s conftest$ac_exeext'
21766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21767 (eval $ac_try) 2>&5
21768 ac_status=$?
21769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21770 (exit $ac_status); }; }; then
Brett Cannon43802422005-02-10 20:48:03 +000021771 ac_cv_var_tzname=yes
21772else
21773 echo "$as_me: failed program was:" >&5
21774sed 's/^/| /' conftest.$ac_ext >&5
21775
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021776ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000021777fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021778rm -f conftest.err conftest.$ac_objext \
Brett Cannon43802422005-02-10 20:48:03 +000021779 conftest$ac_exeext conftest.$ac_ext
21780fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021781echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21782echo "${ECHO_T}$ac_cv_var_tzname" >&6
Brett Cannon43802422005-02-10 20:48:03 +000021783 if test $ac_cv_var_tzname = yes; then
21784
21785cat >>confdefs.h <<\_ACEOF
21786#define HAVE_TZNAME 1
21787_ACEOF
21788
21789 fi
21790fi
21791
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021792
Martin v. Löwis1d459062005-03-14 21:23:33 +000021793# check tzset(3) exists and works like we expect it to
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021794echo "$as_me:$LINENO: checking for working tzset()" >&5
21795echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021796if test "${ac_cv_working_tzset+set}" = set; then
21797 echo $ECHO_N "(cached) $ECHO_C" >&6
21798else
21799
21800if test "$cross_compiling" = yes; then
21801 ac_cv_working_tzset=no
21802else
21803 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021804/* confdefs.h. */
21805_ACEOF
21806cat confdefs.h >>conftest.$ac_ext
21807cat >>conftest.$ac_ext <<_ACEOF
21808/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021809
21810#include <stdlib.h>
21811#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000021812#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000021813
21814#if HAVE_TZNAME
21815extern char *tzname[];
21816#endif
21817
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021818int main()
21819{
Brett Cannon18367812003-09-19 00:59:16 +000021820 /* Note that we need to ensure that not only does tzset(3)
21821 do 'something' with localtime, but it works as documented
21822 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000021823 This includes making sure that tzname is set properly if
21824 tm->tm_zone does not exist since it is the alternative way
21825 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000021826
21827 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000021828 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000021829 */
21830
Martin v. Löwis1d459062005-03-14 21:23:33 +000021831 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000021832 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
21833
Neal Norwitz7f2588c2003-04-11 15:35:53 +000021834 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021835 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000021836 if (localtime(&groundhogday)->tm_hour != 0)
21837 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000021838#if HAVE_TZNAME
21839 /* For UTC, tzname[1] is sometimes "", sometimes " " */
21840 if (strcmp(tzname[0], "UTC") ||
21841 (tzname[1][0] != 0 && tzname[1][0] != ' '))
21842 exit(1);
21843#endif
Brett Cannon18367812003-09-19 00:59:16 +000021844
Neal Norwitz7f2588c2003-04-11 15:35:53 +000021845 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021846 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000021847 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021848 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000021849#if HAVE_TZNAME
21850 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
21851 exit(1);
21852#endif
Brett Cannon18367812003-09-19 00:59:16 +000021853
21854 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
21855 tzset();
21856 if (localtime(&groundhogday)->tm_hour != 11)
21857 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000021858#if HAVE_TZNAME
21859 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
21860 exit(1);
21861#endif
21862
21863#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000021864 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
21865 exit(1);
21866 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
21867 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000021868#endif
Brett Cannon18367812003-09-19 00:59:16 +000021869
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021870 exit(0);
21871}
21872
21873_ACEOF
21874rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021875if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21876 (eval $ac_link) 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021877 ac_status=$?
21878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21879 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21881 (eval $ac_try) 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021882 ac_status=$?
21883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21884 (exit $ac_status); }; }; then
21885 ac_cv_working_tzset=yes
21886else
21887 echo "$as_me: program exited with status $ac_status" >&5
21888echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021889sed 's/^/| /' conftest.$ac_ext >&5
21890
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021891( exit $ac_status )
21892ac_cv_working_tzset=no
21893fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021894rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21895fi
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021896fi
21897
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021898echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
21899echo "${ECHO_T}$ac_cv_working_tzset" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000021900if test "$ac_cv_working_tzset" = yes
21901then
21902
21903cat >>confdefs.h <<\_ACEOF
21904#define HAVE_WORKING_TZSET 1
21905_ACEOF
21906
21907fi
21908
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021909# Look for subsecond timestamps in struct stat
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021910echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
21911echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021912if test "${ac_cv_stat_tv_nsec+set}" = set; then
21913 echo $ECHO_N "(cached) $ECHO_C" >&6
21914else
21915 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021916/* confdefs.h. */
21917_ACEOF
21918cat confdefs.h >>conftest.$ac_ext
21919cat >>conftest.$ac_ext <<_ACEOF
21920/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021921#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021922int
21923main ()
21924{
21925
21926struct stat st;
21927st.st_mtim.tv_nsec = 1;
21928
21929 ;
21930 return 0;
21931}
21932_ACEOF
21933rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021934if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21935 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021937 grep -v '^ *+' conftest.er1 >conftest.err
21938 rm -f conftest.er1
21939 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021941 (exit $ac_status); } &&
21942 { ac_try='test -z "$ac_c_werror_flag"
21943 || test ! -s conftest.err'
21944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21945 (eval $ac_try) 2>&5
21946 ac_status=$?
21947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21948 (exit $ac_status); }; } &&
21949 { ac_try='test -s conftest.$ac_objext'
21950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21951 (eval $ac_try) 2>&5
21952 ac_status=$?
21953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21954 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000021955 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021956else
21957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021958sed 's/^/| /' conftest.$ac_ext >&5
21959
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021960ac_cv_stat_tv_nsec=no
21961fi
21962rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021963fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021964
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021965echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
21966echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000021967if test "$ac_cv_stat_tv_nsec" = yes
21968then
21969
21970cat >>confdefs.h <<\_ACEOF
21971#define HAVE_STAT_TV_NSEC 1
21972_ACEOF
21973
21974fi
21975
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021976# Look for BSD style subsecond timestamps in struct stat
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000021977echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
21978echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021979if test "${ac_cv_stat_tv_nsec2+set}" = set; then
21980 echo $ECHO_N "(cached) $ECHO_C" >&6
21981else
21982 cat >conftest.$ac_ext <<_ACEOF
21983/* confdefs.h. */
21984_ACEOF
21985cat confdefs.h >>conftest.$ac_ext
21986cat >>conftest.$ac_ext <<_ACEOF
21987/* end confdefs.h. */
21988#include <sys/stat.h>
21989int
21990main ()
21991{
21992
21993struct stat st;
21994st.st_mtimespec.tv_nsec = 1;
21995
21996 ;
21997 return 0;
21998}
21999_ACEOF
22000rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022001if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22002 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022003 ac_status=$?
22004 grep -v '^ *+' conftest.er1 >conftest.err
22005 rm -f conftest.er1
22006 cat conftest.err >&5
22007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022008 (exit $ac_status); } &&
22009 { ac_try='test -z "$ac_c_werror_flag"
22010 || test ! -s conftest.err'
22011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22012 (eval $ac_try) 2>&5
22013 ac_status=$?
22014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22015 (exit $ac_status); }; } &&
22016 { ac_try='test -s conftest.$ac_objext'
22017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22018 (eval $ac_try) 2>&5
22019 ac_status=$?
22020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22021 (exit $ac_status); }; }; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022022 ac_cv_stat_tv_nsec2=yes
22023else
22024 echo "$as_me: failed program was:" >&5
22025sed 's/^/| /' conftest.$ac_ext >&5
22026
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022027ac_cv_stat_tv_nsec2=no
22028fi
22029rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022030fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022031
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022032echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
22033echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022034if test "$ac_cv_stat_tv_nsec2" = yes
22035then
22036
22037cat >>confdefs.h <<\_ACEOF
22038#define HAVE_STAT_TV_NSEC2 1
22039_ACEOF
22040
22041fi
22042
Jack Jansen666b1e72001-10-31 12:11:48 +000022043# On HP/UX 11.0, mvwdelch is a block with a return statement
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022044echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
22045echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022046if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
22047 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000022048else
Martin v. Löwis11437992002-04-12 09:54:03 +000022049 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022050/* confdefs.h. */
22051_ACEOF
22052cat confdefs.h >>conftest.$ac_ext
22053cat >>conftest.$ac_ext <<_ACEOF
22054/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000022055#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022056int
22057main ()
22058{
Jack Jansen666b1e72001-10-31 12:11:48 +000022059
22060 int rtn;
22061 rtn = mvwdelch(0,0,0);
22062
Martin v. Löwis11437992002-04-12 09:54:03 +000022063 ;
22064 return 0;
22065}
22066_ACEOF
22067rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022068if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22069 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022071 grep -v '^ *+' conftest.er1 >conftest.err
22072 rm -f conftest.er1
22073 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022075 (exit $ac_status); } &&
22076 { ac_try='test -z "$ac_c_werror_flag"
22077 || test ! -s conftest.err'
22078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22079 (eval $ac_try) 2>&5
22080 ac_status=$?
22081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22082 (exit $ac_status); }; } &&
22083 { ac_try='test -s conftest.$ac_objext'
22084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22085 (eval $ac_try) 2>&5
22086 ac_status=$?
22087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22088 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000022089 ac_cv_mvwdelch_is_expression=yes
22090else
Martin v. Löwis11437992002-04-12 09:54:03 +000022091 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022092sed 's/^/| /' conftest.$ac_ext >&5
22093
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022094ac_cv_mvwdelch_is_expression=no
22095fi
22096rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000022097fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022098
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022099echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
22100echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000022101
22102if test "$ac_cv_mvwdelch_is_expression" = yes
22103then
Martin v. Löwis11437992002-04-12 09:54:03 +000022104
22105cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000022106#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022107_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000022108
22109fi
22110
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022111echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
22112echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022113if test "${ac_cv_window_has_flags+set}" = set; then
22114 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000022115else
Martin v. Löwis11437992002-04-12 09:54:03 +000022116 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022117/* confdefs.h. */
22118_ACEOF
22119cat confdefs.h >>conftest.$ac_ext
22120cat >>conftest.$ac_ext <<_ACEOF
22121/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000022122#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022123int
22124main ()
22125{
Jack Jansen666b1e72001-10-31 12:11:48 +000022126
22127 WINDOW *w;
22128 w->_flags = 0;
22129
Martin v. Löwis11437992002-04-12 09:54:03 +000022130 ;
22131 return 0;
22132}
22133_ACEOF
22134rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022135if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22136 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022138 grep -v '^ *+' conftest.er1 >conftest.err
22139 rm -f conftest.er1
22140 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022142 (exit $ac_status); } &&
22143 { ac_try='test -z "$ac_c_werror_flag"
22144 || test ! -s conftest.err'
22145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22146 (eval $ac_try) 2>&5
22147 ac_status=$?
22148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22149 (exit $ac_status); }; } &&
22150 { ac_try='test -s conftest.$ac_objext'
22151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22152 (eval $ac_try) 2>&5
22153 ac_status=$?
22154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22155 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000022156 ac_cv_window_has_flags=yes
22157else
Martin v. Löwis11437992002-04-12 09:54:03 +000022158 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022159sed 's/^/| /' conftest.$ac_ext >&5
22160
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022161ac_cv_window_has_flags=no
22162fi
22163rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000022164fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022165
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022166echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
22167echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000022168
Jack Jansen666b1e72001-10-31 12:11:48 +000022169
22170if test "$ac_cv_window_has_flags" = yes
22171then
Martin v. Löwis11437992002-04-12 09:54:03 +000022172
22173cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000022174#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022175_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000022176
22177fi
22178
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022179echo "$as_me:$LINENO: checking for is_term_resized" >&5
22180echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022181cat >conftest.$ac_ext <<_ACEOF
22182/* confdefs.h. */
22183_ACEOF
22184cat confdefs.h >>conftest.$ac_ext
22185cat >>conftest.$ac_ext <<_ACEOF
22186/* end confdefs.h. */
22187#include <curses.h>
22188int
22189main ()
22190{
22191void *x=is_term_resized
22192 ;
22193 return 0;
22194}
22195_ACEOF
22196rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022197if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22198 (eval $ac_compile) 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022199 ac_status=$?
22200 grep -v '^ *+' conftest.er1 >conftest.err
22201 rm -f conftest.er1
22202 cat conftest.err >&5
22203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022204 (exit $ac_status); } &&
22205 { ac_try='test -z "$ac_c_werror_flag"
22206 || test ! -s conftest.err'
22207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22208 (eval $ac_try) 2>&5
22209 ac_status=$?
22210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22211 (exit $ac_status); }; } &&
22212 { ac_try='test -s conftest.$ac_objext'
22213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22214 (eval $ac_try) 2>&5
22215 ac_status=$?
22216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22217 (exit $ac_status); }; }; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000022218
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022219cat >>confdefs.h <<\_ACEOF
22220#define HAVE_CURSES_IS_TERM_RESIZED 1
22221_ACEOF
22222
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022223 echo "$as_me:$LINENO: result: yes" >&5
22224echo "${ECHO_T}yes" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022225else
22226 echo "$as_me: failed program was:" >&5
22227sed 's/^/| /' conftest.$ac_ext >&5
22228
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022229echo "$as_me:$LINENO: result: no" >&5
22230echo "${ECHO_T}no" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022231
22232fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022233rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022234
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022235echo "$as_me:$LINENO: checking for resize_term" >&5
22236echo $ECHO_N "checking for resize_term... $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022237cat >conftest.$ac_ext <<_ACEOF
22238/* confdefs.h. */
22239_ACEOF
22240cat confdefs.h >>conftest.$ac_ext
22241cat >>conftest.$ac_ext <<_ACEOF
22242/* end confdefs.h. */
22243#include <curses.h>
22244int
22245main ()
22246{
22247void *x=resize_term
22248 ;
22249 return 0;
22250}
22251_ACEOF
22252rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022253if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22254 (eval $ac_compile) 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022255 ac_status=$?
22256 grep -v '^ *+' conftest.er1 >conftest.err
22257 rm -f conftest.er1
22258 cat conftest.err >&5
22259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022260 (exit $ac_status); } &&
22261 { ac_try='test -z "$ac_c_werror_flag"
22262 || test ! -s conftest.err'
22263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22264 (eval $ac_try) 2>&5
22265 ac_status=$?
22266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22267 (exit $ac_status); }; } &&
22268 { ac_try='test -s conftest.$ac_objext'
22269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22270 (eval $ac_try) 2>&5
22271 ac_status=$?
22272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22273 (exit $ac_status); }; }; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022274
22275cat >>confdefs.h <<\_ACEOF
22276#define HAVE_CURSES_RESIZE_TERM 1
22277_ACEOF
22278
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022279 echo "$as_me:$LINENO: result: yes" >&5
22280echo "${ECHO_T}yes" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022281else
22282 echo "$as_me: failed program was:" >&5
22283sed 's/^/| /' conftest.$ac_ext >&5
22284
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022285echo "$as_me:$LINENO: result: no" >&5
22286echo "${ECHO_T}no" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022287
22288fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022289rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022290
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022291echo "$as_me:$LINENO: checking for resizeterm" >&5
22292echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022293cat >conftest.$ac_ext <<_ACEOF
22294/* confdefs.h. */
22295_ACEOF
22296cat confdefs.h >>conftest.$ac_ext
22297cat >>conftest.$ac_ext <<_ACEOF
22298/* end confdefs.h. */
22299#include <curses.h>
22300int
22301main ()
22302{
22303void *x=resizeterm
22304 ;
22305 return 0;
22306}
22307_ACEOF
22308rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22310 (eval $ac_compile) 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022311 ac_status=$?
22312 grep -v '^ *+' conftest.er1 >conftest.err
22313 rm -f conftest.er1
22314 cat conftest.err >&5
22315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022316 (exit $ac_status); } &&
22317 { ac_try='test -z "$ac_c_werror_flag"
22318 || test ! -s conftest.err'
22319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22320 (eval $ac_try) 2>&5
22321 ac_status=$?
22322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22323 (exit $ac_status); }; } &&
22324 { ac_try='test -s conftest.$ac_objext'
22325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22326 (eval $ac_try) 2>&5
22327 ac_status=$?
22328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22329 (exit $ac_status); }; }; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022330
22331cat >>confdefs.h <<\_ACEOF
22332#define HAVE_CURSES_RESIZETERM 1
22333_ACEOF
22334
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022335 echo "$as_me:$LINENO: result: yes" >&5
22336echo "${ECHO_T}yes" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022337else
22338 echo "$as_me: failed program was:" >&5
22339sed 's/^/| /' conftest.$ac_ext >&5
22340
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022341echo "$as_me:$LINENO: result: no" >&5
22342echo "${ECHO_T}no" >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022343
22344fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022345rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters0e3f5912006-08-11 14:57:12 +000022346
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022347echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
22348echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000022349
22350if test -r /dev/ptmx
22351then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022352 echo "$as_me:$LINENO: result: yes" >&5
22353echo "${ECHO_T}yes" >&6
Martin v. Löwis24a880b2002-12-31 12:55:15 +000022354
22355cat >>confdefs.h <<\_ACEOF
22356#define HAVE_DEV_PTMX 1
22357_ACEOF
22358
Thomas Wouters89f507f2006-12-13 04:49:30 +000022359else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022360 echo "$as_me:$LINENO: result: no" >&5
22361echo "${ECHO_T}no" >&6
Martin v. Löwis24a880b2002-12-31 12:55:15 +000022362fi
22363
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022364echo "$as_me:$LINENO: checking for /dev/ptc" >&5
22365echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000022366
22367if test -r /dev/ptc
22368then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022369 echo "$as_me:$LINENO: result: yes" >&5
22370echo "${ECHO_T}yes" >&6
Neal Norwitz865400f2003-03-21 01:42:58 +000022371
22372cat >>confdefs.h <<\_ACEOF
22373#define HAVE_DEV_PTC 1
22374_ACEOF
22375
Thomas Wouters89f507f2006-12-13 04:49:30 +000022376else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022377 echo "$as_me:$LINENO: result: no" >&5
22378echo "${ECHO_T}no" >&6
Neal Norwitz865400f2003-03-21 01:42:58 +000022379fi
22380
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022381echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
22382echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6
Thomas Wouters477c8d52006-05-27 19:21:47 +000022383if test "$cross_compiling" = yes; then
22384 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
22385See \`config.log' for more details." >&5
22386echo "$as_me: error: cannot run test program while cross compiling
22387See \`config.log' for more details." >&2;}
22388 { (exit 1); exit 1; }; }
22389else
22390 cat >conftest.$ac_ext <<_ACEOF
22391/* confdefs.h. */
22392_ACEOF
22393cat confdefs.h >>conftest.$ac_ext
22394cat >>conftest.$ac_ext <<_ACEOF
22395/* end confdefs.h. */
22396#include <stdio.h>
22397#include <stddef.h>
22398#include <string.h>
22399
22400int main()
22401{
Thomas Wouters89f507f2006-12-13 04:49:30 +000022402 char buffer[256];
22403
22404#ifdef HAVE_SSIZE_T
22405typedef ssize_t Py_ssize_t;
22406#elif SIZEOF_VOID_P == SIZEOF_LONG
22407typedef long Py_ssize_t;
22408#else
22409typedef int Py_ssize_t;
22410#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000022411
22412 if(sprintf(buffer, "%zd", (size_t)123) < 0)
22413 return 1;
22414
Thomas Wouters89f507f2006-12-13 04:49:30 +000022415 if (strcmp(buffer, "123"))
22416 return 1;
22417
22418 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
22419 return 1;
22420
22421 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000022422 return 1;
22423
22424 return 0;
22425}
22426_ACEOF
22427rm -f conftest$ac_exeext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022428if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22429 (eval $ac_link) 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000022430 ac_status=$?
22431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22432 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22434 (eval $ac_try) 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000022435 ac_status=$?
22436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22437 (exit $ac_status); }; }; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022438 echo "$as_me:$LINENO: result: yes" >&5
22439echo "${ECHO_T}yes" >&6
Thomas Wouters477c8d52006-05-27 19:21:47 +000022440
22441cat >>confdefs.h <<\_ACEOF
22442#define PY_FORMAT_SIZE_T "z"
22443_ACEOF
22444
22445else
22446 echo "$as_me: program exited with status $ac_status" >&5
22447echo "$as_me: failed program was:" >&5
22448sed 's/^/| /' conftest.$ac_ext >&5
22449
22450( exit $ac_status )
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022451echo "$as_me:$LINENO: result: no" >&5
22452echo "${ECHO_T}no" >&6
Thomas Wouters477c8d52006-05-27 19:21:47 +000022453fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022454rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000022455fi
22456
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022457echo "$as_me:$LINENO: checking for socklen_t" >&5
22458echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022459if test "${ac_cv_type_socklen_t+set}" = set; then
22460 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000022461else
Martin v. Löwis11437992002-04-12 09:54:03 +000022462 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022463/* confdefs.h. */
22464_ACEOF
22465cat confdefs.h >>conftest.$ac_ext
22466cat >>conftest.$ac_ext <<_ACEOF
22467/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000022468
22469#ifdef HAVE_SYS_TYPES_H
22470#include <sys/types.h>
22471#endif
22472#ifdef HAVE_SYS_SOCKET_H
22473#include <sys/socket.h>
22474#endif
22475
22476
Martin v. Löwis11437992002-04-12 09:54:03 +000022477int
22478main ()
22479{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022480if ((socklen_t *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022481 return 0;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022482if (sizeof (socklen_t))
Martin v. Löwis11437992002-04-12 09:54:03 +000022483 return 0;
22484 ;
22485 return 0;
22486}
22487_ACEOF
22488rm -f conftest.$ac_objext
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22490 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022491 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022492 grep -v '^ *+' conftest.er1 >conftest.err
22493 rm -f conftest.er1
22494 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022496 (exit $ac_status); } &&
22497 { ac_try='test -z "$ac_c_werror_flag"
22498 || test ! -s conftest.err'
22499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22500 (eval $ac_try) 2>&5
22501 ac_status=$?
22502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22503 (exit $ac_status); }; } &&
22504 { ac_try='test -s conftest.$ac_objext'
22505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22506 (eval $ac_try) 2>&5
22507 ac_status=$?
22508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22509 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000022510 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000022511else
Martin v. Löwis11437992002-04-12 09:54:03 +000022512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022513sed 's/^/| /' conftest.$ac_ext >&5
22514
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022515ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000022516fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022517rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022518fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022519echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
22520echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022521if test $ac_cv_type_socklen_t = yes; then
22522 :
22523else
Guido van Rossum95713eb2000-05-18 20:53:31 +000022524
Martin v. Löwis01c04012002-11-11 14:58:44 +000022525cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000022526#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000022527_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000022528
22529fi
22530
Michael W. Hudson54241132001-12-07 15:38:26 +000022531
Michael W. Hudson54241132001-12-07 15:38:26 +000022532
22533
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000022534for h in `(cd $srcdir;echo Python/thread_*.h)`
22535do
22536 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
22537done
22538
Michael W. Hudson54241132001-12-07 15:38:26 +000022539
Neal Norwitzd24499d2005-12-18 21:36:39 +000022540SRCDIRS="Parser Grammar Objects Python Modules Mac"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022541echo "$as_me:$LINENO: checking for build directories" >&5
22542echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000022543for dir in $SRCDIRS; do
22544 if test ! -d $dir; then
22545 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000022546 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000022547done
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022548echo "$as_me:$LINENO: result: done" >&5
22549echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000022550
Guido van Rossum627b2d71993-12-24 10:39:16 +000022551# generate output files
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022552 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000022553
Martin v. Löwis11437992002-04-12 09:54:03 +000022554cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022555# This file is a shell script that caches the results of configure
22556# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000022557# scripts and configure runs, see configure's option --config-cache.
22558# It is not useful on other systems. If it contains results you don't
22559# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022560#
Martin v. Löwis11437992002-04-12 09:54:03 +000022561# config.status only pays attention to the cache file if you give it
22562# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022563#
Skip Montanaro6dead952003-09-25 14:50:04 +000022564# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000022565# loading this file, other *unset* `ac_cv_foo' will be assigned the
22566# following values.
22567
22568_ACEOF
22569
Guido van Rossumf78abae1997-01-21 22:02:36 +000022570# The following way of writing the cache mishandles newlines in values,
22571# but we know of no workaround that is simple, portable, and efficient.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022572# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022573# Ultrix sh set writes to stderr and can't be redirected directly,
22574# and sets the high bit in the cache file unless we assign to the vars.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022575{
Martin v. Löwis11437992002-04-12 09:54:03 +000022576 (set) 2>&1 |
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022577 case `(ac_space=' '; set | grep ac_space) 2>&1` in
22578 *ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000022579 # `set' does not quote correctly, so add quotes (double-quote
22580 # substitution turns \\\\ into \\, and sed turns \\ into \).
22581 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022582 "s/'/'\\\\''/g;
22583 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022584 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022585 *)
22586 # `set' quotes correctly as required by POSIX, so do not add quotes.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022587 sed -n \
22588 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000022589 ;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022590 esac;
22591} |
Martin v. Löwis11437992002-04-12 09:54:03 +000022592 sed '
22593 t clear
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022594 : clear
Martin v. Löwis11437992002-04-12 09:54:03 +000022595 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22596 t end
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022597 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22598 : end' >>confcache
22599if diff $cache_file confcache >/dev/null 2>&1; then :; else
22600 if test -w $cache_file; then
22601 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
Martin v. Löwis11437992002-04-12 09:54:03 +000022602 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022603 else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022604 echo "not updating unwritable cache $cache_file"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022605 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022606fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022607rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000022608
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022609test "x$prefix" = xNONE && prefix=$ac_default_prefix
22610# Let make expand exec_prefix.
22611test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000022612
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022613# VPATH may cause trouble with some makes, so we remove $(srcdir),
22614# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22615# trailing colons and then remove the whole line if VPATH becomes empty
22616# (actually we leave an empty line to preserve line numbers).
22617if test "x$srcdir" = x.; then
22618 ac_vpsub='/^[ ]*VPATH[ ]*=/{
22619s/:*\$(srcdir):*/:/;
22620s/:*\${srcdir}:*/:/;
22621s/:*@srcdir@:*/:/;
22622s/^\([^=]*=[ ]*\):*/\1/;
22623s/:*$//;
22624s/^[^=]*=[ ]*$//;
22625}'
22626fi
22627
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022628DEFS=-DHAVE_CONFIG_H
22629
Skip Montanaro6dead952003-09-25 14:50:04 +000022630ac_libobjs=
22631ac_ltlibobjs=
22632for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22633 # 1. Remove the extension, and $U if already installed.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022634 ac_i=`echo "$ac_i" |
22635 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
22636 # 2. Add them.
22637 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
22638 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000022639done
22640LIBOBJS=$ac_libobjs
22641
22642LTLIBOBJS=$ac_ltlibobjs
22643
22644
Martin v. Löwis11437992002-04-12 09:54:03 +000022645
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022646: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000022647ac_clean_files_save=$ac_clean_files
22648ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22649{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
22650echo "$as_me: creating $CONFIG_STATUS" >&6;}
22651cat >$CONFIG_STATUS <<_ACEOF
22652#! $SHELL
22653# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000022654# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022655# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000022656# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000022657
Martin v. Löwis11437992002-04-12 09:54:03 +000022658debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000022659ac_cs_recheck=false
22660ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000022661SHELL=\${CONFIG_SHELL-$SHELL}
22662_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000022663
Martin v. Löwis11437992002-04-12 09:54:03 +000022664cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000022665## --------------------- ##
22666## M4sh Initialization. ##
22667## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000022668
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022669# Be Bourne compatible
Martin v. Löwis11437992002-04-12 09:54:03 +000022670if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22671 emulate sh
22672 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000022673 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22674 # is contrary to our usage. Disable this feature.
22675 alias -g '${1+"$@"}'='"$@"'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022676elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22677 set -o posix
22678fi
22679DUALCASE=1; export DUALCASE # for MKS sh
Thomas Wouters89f507f2006-12-13 04:49:30 +000022680
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022681# Support unset when possible.
22682if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
22683 as_unset=unset
22684else
22685 as_unset=false
Michael W. Hudson54241132001-12-07 15:38:26 +000022686fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000022687
22688
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022689# Work around bugs in pre-3.0 UWIN ksh.
22690$as_unset ENV MAIL MAILPATH
22691PS1='$ '
22692PS2='> '
22693PS4='+ '
22694
22695# NLS nuisances.
22696for as_var in \
22697 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22698 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22699 LC_TELEPHONE LC_TIME
22700do
22701 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
22702 eval $as_var=C; export $as_var
22703 else
22704 $as_unset $as_var
22705 fi
22706done
22707
22708# Required to use basename.
22709if expr a : '\(a\)' >/dev/null 2>&1; then
22710 as_expr=expr
22711else
22712 as_expr=false
22713fi
22714
22715if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22716 as_basename=basename
22717else
22718 as_basename=false
22719fi
Michael W. Hudson54241132001-12-07 15:38:26 +000022720
Michael W. Hudson54241132001-12-07 15:38:26 +000022721
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022722# Name of the executable.
22723as_me=`$as_basename "$0" ||
22724$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22725 X"$0" : 'X\(//\)$' \| \
22726 X"$0" : 'X\(/\)$' \| \
22727 . : '\(.\)' 2>/dev/null ||
22728echo X/"$0" |
22729 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22730 /^X\/\(\/\/\)$/{ s//\1/; q; }
22731 /^X\/\(\/\).*/{ s//\1/; q; }
22732 s/.*/./; q'`
22733
22734
22735# PATH needs CR, and LINENO needs CR and PATH.
Martin v. Löwis11437992002-04-12 09:54:03 +000022736# Avoid depending upon Character Ranges.
22737as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22738as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22739as_cr_Letters=$as_cr_letters$as_cr_LETTERS
22740as_cr_digits='0123456789'
22741as_cr_alnum=$as_cr_Letters$as_cr_digits
22742
22743# The user is always right.
22744if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022745 echo "#! /bin/sh" >conf$$.sh
22746 echo "exit 0" >>conf$$.sh
22747 chmod +x conf$$.sh
22748 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022749 PATH_SEPARATOR=';'
22750 else
22751 PATH_SEPARATOR=:
22752 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000022753 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000022754fi
22755
22756
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022757 as_lineno_1=$LINENO
22758 as_lineno_2=$LINENO
22759 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
22760 test "x$as_lineno_1" != "x$as_lineno_2" &&
22761 test "x$as_lineno_3" = "x$as_lineno_2" || {
22762 # Find who we are. Look in the path if we contain no path at all
22763 # relative or not.
22764 case $0 in
22765 *[\\/]* ) as_myself=$0 ;;
22766 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000022767for as_dir in $PATH
22768do
22769 IFS=$as_save_IFS
22770 test -z "$as_dir" && as_dir=.
22771 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
22772done
22773
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022774 ;;
22775 esac
22776 # We did not find ourselves, most probably we were run as `sh COMMAND'
22777 # in which case we are not to be found in the path.
22778 if test "x$as_myself" = x; then
22779 as_myself=$0
Thomas Wouters477c8d52006-05-27 19:21:47 +000022780 fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022781 if test ! -f "$as_myself"; then
22782 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
22783echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
22784 { (exit 1); exit 1; }; }
22785 fi
22786 case $CONFIG_SHELL in
22787 '')
22788 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22789for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
22790do
22791 IFS=$as_save_IFS
22792 test -z "$as_dir" && as_dir=.
22793 for as_base in sh bash ksh sh5; do
22794 case $as_dir in
22795 /*)
22796 if ("$as_dir/$as_base" -c '
Martin v. Löwis11437992002-04-12 09:54:03 +000022797 as_lineno_1=$LINENO
22798 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022799 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
Martin v. Löwis11437992002-04-12 09:54:03 +000022800 test "x$as_lineno_1" != "x$as_lineno_2" &&
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022801 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
22802 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
22803 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
22804 CONFIG_SHELL=$as_dir/$as_base
22805 export CONFIG_SHELL
22806 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
22807 fi;;
22808 esac
22809 done
22810done
22811;;
22812 esac
Jack Jansendd19cf82001-12-06 22:36:17 +000022813
Martin v. Löwis11437992002-04-12 09:54:03 +000022814 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
22815 # uniformly replaced by the line number. The first 'sed' inserts a
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022816 # line-number line before each line; the second 'sed' does the real
22817 # work. The second script uses 'N' to pair each line-number line
22818 # with the numbered line, and appends trailing '-' during
22819 # substitution so that $LINENO is not a special case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000022820 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022821 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
22822 sed '=' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000022823 sed '
22824 N
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022825 s,$,-,
22826 : loop
22827 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
Martin v. Löwis11437992002-04-12 09:54:03 +000022828 t loop
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022829 s,-$,,
22830 s,^['$as_cr_digits']*\n,,
Martin v. Löwis11437992002-04-12 09:54:03 +000022831 ' >$as_me.lineno &&
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022832 chmod +x $as_me.lineno ||
22833 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
22834echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022835 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000022836
Martin v. Löwis11437992002-04-12 09:54:03 +000022837 # Don't try to exec as it changes $[0], causing all sort of problems
22838 # (the dirname of $[0] is not the place where we might find the
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022839 # original and so on. Autoconf is especially sensible to this).
22840 . ./$as_me.lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000022841 # Exit status is that of the last command.
22842 exit
22843}
22844
22845
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022846case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
22847 *c*,-n*) ECHO_N= ECHO_C='
22848' ECHO_T=' ' ;;
22849 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
22850 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022851esac
22852
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022853if expr a : '\(a\)' >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022854 as_expr=expr
22855else
22856 as_expr=false
22857fi
22858
22859rm -f conf$$ conf$$.exe conf$$.file
22860echo >conf$$.file
22861if ln -s conf$$.file conf$$ 2>/dev/null; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022862 # We could just check for DJGPP; but this test a) works b) is more generic
22863 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22864 if test -f conf$$.exe; then
22865 # Don't use ln at all; we don't have any links
Martin v. Löwis11437992002-04-12 09:54:03 +000022866 as_ln_s='cp -p'
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022867 else
22868 as_ln_s='ln -s'
22869 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022870elif ln conf$$.file conf$$ 2>/dev/null; then
22871 as_ln_s=ln
22872else
22873 as_ln_s='cp -p'
22874fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022875rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwis11437992002-04-12 09:54:03 +000022876
Skip Montanaro6dead952003-09-25 14:50:04 +000022877if mkdir -p . 2>/dev/null; then
22878 as_mkdir_p=:
22879else
Skip Montanarof0d5f792004-08-15 14:08:23 +000022880 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000022881 as_mkdir_p=false
22882fi
22883
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022884as_executable_p="test -f"
Martin v. Löwis11437992002-04-12 09:54:03 +000022885
22886# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022887as_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 +000022888
22889# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000022890as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000022891
22892
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022893# IFS
22894# We need space, tab and new line, in precisely that order.
22895as_nl='
22896'
22897IFS=" $as_nl"
22898
22899# CDPATH.
22900$as_unset CDPATH
22901
Martin v. Löwis11437992002-04-12 09:54:03 +000022902exec 6>&1
22903
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022904# Open the log real soon, to keep \$[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000022905# report actual input values of CONFIG_FILES etc. instead of their
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022906# values after options handling. Logging --version etc. is OK.
22907exec 5>>config.log
22908{
22909 echo
22910 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
22911## Running $as_me. ##
22912_ASBOX
22913} >&5
22914cat >&5 <<_CSEOF
22915
Guido van Rossum0c4eb622006-03-30 16:19:24 +000022916This file was extended by python $as_me 3.0, which was
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022917generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000022918
22919 CONFIG_FILES = $CONFIG_FILES
22920 CONFIG_HEADERS = $CONFIG_HEADERS
22921 CONFIG_LINKS = $CONFIG_LINKS
22922 CONFIG_COMMANDS = $CONFIG_COMMANDS
22923 $ $0 $@
22924
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022925_CSEOF
22926echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
22927echo >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022928_ACEOF
22929
22930# Files that config.status was made for.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022931if test -n "$ac_config_files"; then
22932 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22933fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022934
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022935if test -n "$ac_config_headers"; then
22936 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22937fi
22938
22939if test -n "$ac_config_links"; then
22940 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22941fi
22942
22943if test -n "$ac_config_commands"; then
22944 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22945fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022946
22947cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022948
Martin v. Löwis11437992002-04-12 09:54:03 +000022949ac_cs_usage="\
22950\`$as_me' instantiates files from templates according to the
22951current configuration.
22952
22953Usage: $0 [OPTIONS] [FILE]...
22954
22955 -h, --help print this help, then exit
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022956 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000022957 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000022958 -d, --debug don't remove temporary files
22959 --recheck update $as_me by reconfiguring in the same conditions
22960 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000022961 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000022962 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000022963 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000022964
22965Configuration files:
22966$config_files
22967
22968Configuration headers:
22969$config_headers
22970
22971Report bugs to <bug-autoconf@gnu.org>."
Thomas Wouters477c8d52006-05-27 19:21:47 +000022972_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022973
Martin v. Löwis11437992002-04-12 09:54:03 +000022974cat >>$CONFIG_STATUS <<_ACEOF
22975ac_cs_version="\\
Guido van Rossum0c4eb622006-03-30 16:19:24 +000022976python config.status 3.0
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022977configured by $0, generated by GNU Autoconf 2.59,
22978 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000022979
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022980Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000022981This config.status script is free software; the Free Software Foundation
22982gives unlimited permission to copy, distribute and modify it."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022983srcdir=$srcdir
22984INSTALL="$INSTALL"
Martin v. Löwis11437992002-04-12 09:54:03 +000022985_ACEOF
22986
22987cat >>$CONFIG_STATUS <<\_ACEOF
22988# If no file are specified by the user, then we need to provide default
22989# value. By we need to know if files were specified by the user.
22990ac_need_defaults=:
22991while test $# != 0
22992do
22993 case $1 in
22994 --*=*)
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022995 ac_option=`expr "x$1" : 'x\([^=]*\)='`
22996 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000022997 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000022998 ;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000022999 -*)
Skip Montanaro6dead952003-09-25 14:50:04 +000023000 ac_option=$1
23001 ac_optarg=$2
23002 ac_shift=shift
23003 ;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023004 *) # This is not an option, so the user has probably given explicit
23005 # arguments.
23006 ac_option=$1
23007 ac_need_defaults=false;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023008 esac
23009
Skip Montanaro6dead952003-09-25 14:50:04 +000023010 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000023011 # Handling of the options.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023012_ACEOF
23013cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023014 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23015 ac_cs_recheck=: ;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023016 --version | --vers* | -V )
23017 echo "$ac_cs_version"; exit 0 ;;
23018 --he | --h)
23019 # Conflict between --help and --header
23020 { { echo "$as_me:$LINENO: error: ambiguous option: $1
23021Try \`$0 --help' for more information." >&5
23022echo "$as_me: error: ambiguous option: $1
23023Try \`$0 --help' for more information." >&2;}
23024 { (exit 1); exit 1; }; };;
23025 --help | --hel | -h )
23026 echo "$ac_cs_usage"; exit 0 ;;
23027 --debug | --d* | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000023028 debug=: ;;
23029 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000023030 $ac_shift
23031 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000023032 ac_need_defaults=false;;
23033 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000023034 $ac_shift
23035 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000023036 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000023037 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23038 | -silent | --silent | --silen | --sile | --sil | --si | --s)
23039 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023040
23041 # This is an error.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023042 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
23043Try \`$0 --help' for more information." >&5
23044echo "$as_me: error: unrecognized option: $1
23045Try \`$0 --help' for more information." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023046 { (exit 1); exit 1; }; } ;;
23047
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023048 *) ac_config_targets="$ac_config_targets $1" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023049
23050 esac
23051 shift
23052done
23053
Skip Montanaro6dead952003-09-25 14:50:04 +000023054ac_configure_extra_args=
23055
23056if $ac_cs_silent; then
23057 exec 6>/dev/null
23058 ac_configure_extra_args="$ac_configure_extra_args --silent"
23059fi
23060
23061_ACEOF
23062cat >>$CONFIG_STATUS <<_ACEOF
23063if \$ac_cs_recheck; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023064 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23065 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000023066fi
23067
Martin v. Löwis11437992002-04-12 09:54:03 +000023068_ACEOF
23069
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023070
23071
23072
Martin v. Löwis11437992002-04-12 09:54:03 +000023073
23074cat >>$CONFIG_STATUS <<\_ACEOF
23075for ac_config_target in $ac_config_targets
23076do
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023077 case "$ac_config_target" in
23078 # Handling of arguments.
23079 "Mac/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
23080 "Mac/PythonLauncher/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
23081 "Mac/IDLE/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
23082 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
23083 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
23084 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023085 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23086echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23087 { (exit 1); exit 1; }; };;
23088 esac
23089done
23090
23091# If the user did not use the arguments to specify the items to instantiate,
23092# then the envvar interface is used. Set only those that are not.
23093# We use the long form for the default assignment because of an extremely
23094# bizarre bug on SunOS 4.1.3.
23095if $ac_need_defaults; then
23096 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23097 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23098fi
23099
Skip Montanaro6dead952003-09-25 14:50:04 +000023100# Have a temporary directory for convenience. Make it in the build tree
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023101# simply because there is no reason to put it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000023102# creating and moving files from /tmp can sometimes cause problems.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023103# Create a temporary directory, and hook for its removal unless debugging.
Martin v. Löwis11437992002-04-12 09:54:03 +000023104$debug ||
23105{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023106 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000023107 trap '{ (exit 1); exit 1; }' 1 2 13 15
23108}
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023109
Martin v. Löwis11437992002-04-12 09:54:03 +000023110# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000023111
Martin v. Löwis11437992002-04-12 09:54:03 +000023112{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023113 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000023114 test -n "$tmp" && test -d "$tmp"
23115} ||
23116{
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023117 tmp=./confstat$$-$RANDOM
23118 (umask 077 && mkdir $tmp)
Martin v. Löwis11437992002-04-12 09:54:03 +000023119} ||
23120{
Skip Montanaro6dead952003-09-25 14:50:04 +000023121 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000023122 { (exit 1); exit 1; }
23123}
23124
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023125_ACEOF
23126
23127cat >>$CONFIG_STATUS <<_ACEOF
23128
Martin v. Löwis11437992002-04-12 09:54:03 +000023129#
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023130# CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000023131#
23132
23133# No need to generate the scripts if there are no CONFIG_FILES.
23134# This happens for instance when ./config.status config.h
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023135if test -n "\$CONFIG_FILES"; then
23136 # Protect against being on the right side of a sed subst in config.status.
23137 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23138 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23139s,@SHELL@,$SHELL,;t t
23140s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23141s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23142s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23143s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23144s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23145s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23146s,@exec_prefix@,$exec_prefix,;t t
23147s,@prefix@,$prefix,;t t
23148s,@program_transform_name@,$program_transform_name,;t t
23149s,@bindir@,$bindir,;t t
23150s,@sbindir@,$sbindir,;t t
23151s,@libexecdir@,$libexecdir,;t t
23152s,@datadir@,$datadir,;t t
23153s,@sysconfdir@,$sysconfdir,;t t
23154s,@sharedstatedir@,$sharedstatedir,;t t
23155s,@localstatedir@,$localstatedir,;t t
23156s,@libdir@,$libdir,;t t
23157s,@includedir@,$includedir,;t t
23158s,@oldincludedir@,$oldincludedir,;t t
23159s,@infodir@,$infodir,;t t
23160s,@mandir@,$mandir,;t t
23161s,@build_alias@,$build_alias,;t t
23162s,@host_alias@,$host_alias,;t t
23163s,@target_alias@,$target_alias,;t t
23164s,@DEFS@,$DEFS,;t t
23165s,@ECHO_C@,$ECHO_C,;t t
23166s,@ECHO_N@,$ECHO_N,;t t
23167s,@ECHO_T@,$ECHO_T,;t t
23168s,@LIBS@,$LIBS,;t t
23169s,@VERSION@,$VERSION,;t t
23170s,@SOVERSION@,$SOVERSION,;t t
23171s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
23172s,@UNIVERSALSDK@,$UNIVERSALSDK,;t t
23173s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
23174s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
23175s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
23176s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
23177s,@FRAMEWORKINSTALLFIRST@,$FRAMEWORKINSTALLFIRST,;t t
23178s,@FRAMEWORKINSTALLLAST@,$FRAMEWORKINSTALLLAST,;t t
23179s,@FRAMEWORKALTINSTALLFIRST@,$FRAMEWORKALTINSTALLFIRST,;t t
23180s,@FRAMEWORKALTINSTALLLAST@,$FRAMEWORKALTINSTALLLAST,;t t
23181s,@FRAMEWORKUNIXTOOLSPREFIX@,$FRAMEWORKUNIXTOOLSPREFIX,;t t
23182s,@MACHDEP@,$MACHDEP,;t t
23183s,@SGI_ABI@,$SGI_ABI,;t t
23184s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
23185s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
23186s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t
23187s,@EXPORT_MACOSX_DEPLOYMENT_TARGET@,$EXPORT_MACOSX_DEPLOYMENT_TARGET,;t t
23188s,@CC@,$CC,;t t
23189s,@CFLAGS@,$CFLAGS,;t t
23190s,@LDFLAGS@,$LDFLAGS,;t t
23191s,@CPPFLAGS@,$CPPFLAGS,;t t
23192s,@ac_ct_CC@,$ac_ct_CC,;t t
23193s,@EXEEXT@,$EXEEXT,;t t
23194s,@OBJEXT@,$OBJEXT,;t t
23195s,@CXX@,$CXX,;t t
23196s,@MAINCC@,$MAINCC,;t t
23197s,@CPP@,$CPP,;t t
23198s,@EGREP@,$EGREP,;t t
23199s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
23200s,@LIBRARY@,$LIBRARY,;t t
23201s,@LDLIBRARY@,$LDLIBRARY,;t t
23202s,@DLLLIBRARY@,$DLLLIBRARY,;t t
23203s,@BLDLIBRARY@,$BLDLIBRARY,;t t
23204s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
23205s,@INSTSONAME@,$INSTSONAME,;t t
23206s,@RUNSHARED@,$RUNSHARED,;t t
23207s,@LINKCC@,$LINKCC,;t t
23208s,@RANLIB@,$RANLIB,;t t
23209s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23210s,@AR@,$AR,;t t
23211s,@SVNVERSION@,$SVNVERSION,;t t
23212s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23213s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23214s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23215s,@LN@,$LN,;t t
23216s,@OPT@,$OPT,;t t
23217s,@BASECFLAGS@,$BASECFLAGS,;t t
23218s,@OTHER_LIBTOOL_OPT@,$OTHER_LIBTOOL_OPT,;t t
23219s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
23220s,@SO@,$SO,;t t
23221s,@LDSHARED@,$LDSHARED,;t t
23222s,@BLDSHARED@,$BLDSHARED,;t t
23223s,@CCSHARED@,$CCSHARED,;t t
23224s,@LINKFORSHARED@,$LINKFORSHARED,;t t
23225s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
23226s,@SHLIBS@,$SHLIBS,;t t
23227s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
23228s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
23229s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
23230s,@LDLAST@,$LDLAST,;t t
23231s,@THREADOBJ@,$THREADOBJ,;t t
23232s,@DLINCLDIR@,$DLINCLDIR,;t t
23233s,@DYNLOADFILE@,$DYNLOADFILE,;t t
23234s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
23235s,@TRUE@,$TRUE,;t t
23236s,@LIBOBJS@,$LIBOBJS,;t t
23237s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
23238s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
23239s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
23240s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
23241s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
23242s,@LIBM@,$LIBM,;t t
23243s,@LIBC@,$LIBC,;t t
23244s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
23245s,@THREADHEADERS@,$THREADHEADERS,;t t
23246s,@SRCDIRS@,$SRCDIRS,;t t
23247s,@LTLIBOBJS@,$LTLIBOBJS,;t t
23248CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023249
23250_ACEOF
23251
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023252 cat >>$CONFIG_STATUS <<\_ACEOF
23253 # Split the substitutions into bite-sized pieces for seds with
23254 # small command number limits, like on Digital OSF/1 and HP-UX.
23255 ac_max_sed_lines=48
23256 ac_sed_frag=1 # Number of current file.
23257 ac_beg=1 # First line for current file.
23258 ac_end=$ac_max_sed_lines # Line after last line for current file.
23259 ac_more_lines=:
23260 ac_sed_cmds=
23261 while $ac_more_lines; do
23262 if test $ac_beg -gt 1; then
23263 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23264 else
23265 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23266 fi
23267 if test ! -s $tmp/subs.frag; then
23268 ac_more_lines=false
23269 else
23270 # The purpose of the label and of the branching condition is to
23271 # speed up the sed processing (if there are no `@' at all, there
23272 # is no need to browse any of the substitutions).
23273 # These are the two extra sed commands mentioned above.
23274 (echo ':t
23275 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23276 if test -z "$ac_sed_cmds"; then
23277 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23278 else
23279 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23280 fi
23281 ac_sed_frag=`expr $ac_sed_frag + 1`
23282 ac_beg=$ac_end
23283 ac_end=`expr $ac_end + $ac_max_sed_lines`
23284 fi
23285 done
23286 if test -z "$ac_sed_cmds"; then
23287 ac_sed_cmds=cat
Martin v. Löwis11437992002-04-12 09:54:03 +000023288 fi
23289fi # test -n "$CONFIG_FILES"
23290
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023291_ACEOF
23292cat >>$CONFIG_STATUS <<\_ACEOF
23293for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23294 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23295 case $ac_file in
23296 - | *:- | *:-:* ) # input from stdin
23297 cat >$tmp/stdin
23298 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23299 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23300 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23301 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23302 * ) ac_file_in=$ac_file.in ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023303 esac
23304
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023305 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23306 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000023307$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023308 X"$ac_file" : 'X\(//\)[^/]' \| \
23309 X"$ac_file" : 'X\(//\)$' \| \
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023310 X"$ac_file" : 'X\(/\)' \| \
23311 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000023312echo X"$ac_file" |
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023313 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23314 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23315 /^X\(\/\/\)$/{ s//\1/; q; }
23316 /^X\(\/\).*/{ s//\1/; q; }
23317 s/.*/./; q'`
23318 { if $as_mkdir_p; then
23319 mkdir -p "$ac_dir"
23320 else
23321 as_dir="$ac_dir"
Skip Montanaro6dead952003-09-25 14:50:04 +000023322 as_dirs=
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023323 while test ! -d "$as_dir"; do
23324 as_dirs="$as_dir $as_dirs"
23325 as_dir=`(dirname "$as_dir") 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000023326$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023327 X"$as_dir" : 'X\(//\)[^/]' \| \
23328 X"$as_dir" : 'X\(//\)$' \| \
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023329 X"$as_dir" : 'X\(/\)' \| \
23330 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000023331echo X"$as_dir" |
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023332 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23333 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23334 /^X\(\/\/\)$/{ s//\1/; q; }
23335 /^X\(\/\).*/{ s//\1/; q; }
23336 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000023337 done
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023338 test ! -n "$as_dirs" || mkdir $as_dirs
23339 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23340echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000023341 { (exit 1); exit 1; }; }; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023342
Martin v. Löwis11437992002-04-12 09:54:03 +000023343 ac_builddir=.
23344
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023345if test "$ac_dir" != .; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023346 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023347 # A "../" for each directory in $ac_dir_suffix.
23348 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23349else
23350 ac_dir_suffix= ac_top_builddir=
23351fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023352
23353case $srcdir in
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023354 .) # No --srcdir option. We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000023355 ac_srcdir=.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023356 if test -z "$ac_top_builddir"; then
23357 ac_top_srcdir=.
23358 else
23359 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23360 fi ;;
23361 [\\/]* | ?:[\\/]* ) # Absolute path.
Martin v. Löwis11437992002-04-12 09:54:03 +000023362 ac_srcdir=$srcdir$ac_dir_suffix;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023363 ac_top_srcdir=$srcdir ;;
23364 *) # Relative path.
23365 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23366 ac_top_srcdir=$ac_top_builddir$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023367esac
Skip Montanarof0d5f792004-08-15 14:08:23 +000023368
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023369# Do not use `cd foo && pwd` to compute absolute paths, because
23370# the directories may not exist.
23371case `pwd` in
23372.) ac_abs_builddir="$ac_dir";;
23373*)
23374 case "$ac_dir" in
23375 .) ac_abs_builddir=`pwd`;;
23376 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23377 *) ac_abs_builddir=`pwd`/"$ac_dir";;
23378 esac;;
23379esac
23380case $ac_abs_builddir in
23381.) ac_abs_top_builddir=${ac_top_builddir}.;;
23382*)
23383 case ${ac_top_builddir}. in
23384 .) ac_abs_top_builddir=$ac_abs_builddir;;
23385 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23386 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23387 esac;;
23388esac
23389case $ac_abs_builddir in
23390.) ac_abs_srcdir=$ac_srcdir;;
23391*)
23392 case $ac_srcdir in
23393 .) ac_abs_srcdir=$ac_abs_builddir;;
23394 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23395 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23396 esac;;
23397esac
23398case $ac_abs_builddir in
23399.) ac_abs_top_srcdir=$ac_top_srcdir;;
23400*)
23401 case $ac_top_srcdir in
23402 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23403 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23404 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23405 esac;;
23406esac
Martin v. Löwis11437992002-04-12 09:54:03 +000023407
23408
23409 case $INSTALL in
23410 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023411 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023412 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000023413
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023414 if test x"$ac_file" != x-; then
23415 { echo "$as_me:$LINENO: creating $ac_file" >&5
23416echo "$as_me: creating $ac_file" >&6;}
23417 rm -f "$ac_file"
23418 fi
23419 # Let's still pretend it is `configure' which instantiates (i.e., don't
23420 # use $as_me), people would be surprised to read:
23421 # /* config.h. Generated by config.status. */
23422 if test x"$ac_file" = x-; then
23423 configure_input=
23424 else
23425 configure_input="$ac_file. "
23426 fi
23427 configure_input=$configure_input"Generated from `echo $ac_file_in |
23428 sed 's,.*/,,'` by configure."
Thomas Wouters477c8d52006-05-27 19:21:47 +000023429
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023430 # First look for the input files in the build tree, otherwise in the
23431 # src tree.
23432 ac_file_inputs=`IFS=:
23433 for f in $ac_file_in; do
23434 case $f in
23435 -) echo $tmp/stdin ;;
23436 [\\/$]*)
23437 # Absolute (can't be DOS-style, as IFS=:)
23438 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23439echo "$as_me: error: cannot find input file: $f" >&2;}
23440 { (exit 1); exit 1; }; }
23441 echo "$f";;
23442 *) # Relative
23443 if test -f "$f"; then
23444 # Build tree
23445 echo "$f"
23446 elif test -f "$srcdir/$f"; then
23447 # Source tree
23448 echo "$srcdir/$f"
23449 else
23450 # /dev/null tree
23451 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23452echo "$as_me: error: cannot find input file: $f" >&2;}
23453 { (exit 1); exit 1; }; }
23454 fi;;
23455 esac
23456 done` || { (exit 1); exit 1; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000023457_ACEOF
23458cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023459 sed "$ac_vpsub
23460$extrasub
23461_ACEOF
23462cat >>$CONFIG_STATUS <<\_ACEOF
23463:t
23464/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023465s,@configure_input@,$configure_input,;t t
23466s,@srcdir@,$ac_srcdir,;t t
23467s,@abs_srcdir@,$ac_abs_srcdir,;t t
23468s,@top_srcdir@,$ac_top_srcdir,;t t
23469s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23470s,@builddir@,$ac_builddir,;t t
23471s,@abs_builddir@,$ac_abs_builddir,;t t
23472s,@top_builddir@,$ac_top_builddir,;t t
23473s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
23474s,@INSTALL@,$ac_INSTALL,;t t
23475" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23476 rm -f $tmp/stdin
23477 if test x"$ac_file" != x-; then
23478 mv $tmp/out $ac_file
23479 else
23480 cat $tmp/out
23481 rm -f $tmp/out
23482 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023483
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023484done
23485_ACEOF
23486cat >>$CONFIG_STATUS <<\_ACEOF
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023487
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023488#
23489# CONFIG_HEADER section.
23490#
23491
23492# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23493# NAME is the cpp macro being defined and VALUE is the value it is being given.
23494#
23495# ac_d sets the value in "#define NAME VALUE" lines.
23496ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
23497ac_dB='[ ].*$,\1#\2'
23498ac_dC=' '
23499ac_dD=',;t'
23500# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23501ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23502ac_uB='$,\1#\2define\3'
23503ac_uC=' '
23504ac_uD=',;t'
23505
23506for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23507 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000023508 case $ac_file in
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023509 - | *:- | *:-:* ) # input from stdin
23510 cat >$tmp/stdin
23511 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23512 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23513 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23514 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23515 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023516 esac
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023517
23518 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
23519echo "$as_me: creating $ac_file" >&6;}
23520
23521 # First look for the input files in the build tree, otherwise in the
23522 # src tree.
23523 ac_file_inputs=`IFS=:
23524 for f in $ac_file_in; do
23525 case $f in
23526 -) echo $tmp/stdin ;;
23527 [\\/$]*)
23528 # Absolute (can't be DOS-style, as IFS=:)
23529 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23530echo "$as_me: error: cannot find input file: $f" >&2;}
23531 { (exit 1); exit 1; }; }
23532 # Do quote $f, to prevent DOS paths from being IFS'd.
23533 echo "$f";;
23534 *) # Relative
23535 if test -f "$f"; then
23536 # Build tree
23537 echo "$f"
23538 elif test -f "$srcdir/$f"; then
23539 # Source tree
23540 echo "$srcdir/$f"
23541 else
23542 # /dev/null tree
23543 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23544echo "$as_me: error: cannot find input file: $f" >&2;}
23545 { (exit 1); exit 1; }; }
23546 fi;;
23547 esac
23548 done` || { (exit 1); exit 1; }
23549 # Remove the trailing spaces.
23550 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
23551
Martin v. Löwis11437992002-04-12 09:54:03 +000023552_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023553
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023554# Transform confdefs.h into two sed scripts, `conftest.defines' and
23555# `conftest.undefs', that substitutes the proper values into
23556# config.h.in to produce config.h. The first handles `#define'
23557# templates, and the second `#undef' templates.
23558# And first: Protect against being on the right side of a sed subst in
23559# config.status. Protect against being in an unquoted here document
23560# in config.status.
23561rm -f conftest.defines conftest.undefs
23562# Using a here document instead of a string reduces the quoting nightmare.
23563# Putting comments in sed scripts is not portable.
23564#
23565# `end' is used to avoid that the second main sed command (meant for
23566# 0-ary CPP macros) applies to n-ary macro definitions.
23567# See the Autoconf documentation for `clear'.
23568cat >confdef2sed.sed <<\_ACEOF
23569s/[\\&,]/\\&/g
23570s,[\\$`],\\&,g
23571t clear
23572: clear
23573s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
23574t end
23575s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
23576: end
23577_ACEOF
23578# If some macros were called several times there might be several times
23579# the same #defines, which is useless. Nevertheless, we may not want to
23580# sort them, since we want the *last* AC-DEFINE to be honored.
23581uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
23582sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
23583rm -f confdef2sed.sed
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023584
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023585# This sed command replaces #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023586# example, in the case of _POSIX_SOURCE, which is predefined and required
23587# on some systems where configure will not decide to define it.
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023588cat >>conftest.undefs <<\_ACEOF
23589s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000023590_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023591
23592# Break up conftest.defines because some shells have a limit on the size
23593# of here documents, and old seds have small limits too (100 cmds).
23594echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
23595echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
23596echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
23597echo ' :' >>$CONFIG_STATUS
23598rm -f conftest.tail
23599while grep . conftest.defines >/dev/null
23600do
23601 # Write a limited-size here document to $tmp/defines.sed.
23602 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
23603 # Speed up: don't consider the non `#define' lines.
23604 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
23605 # Work around the forget-to-reset-the-flag bug.
23606 echo 't clr' >>$CONFIG_STATUS
23607 echo ': clr' >>$CONFIG_STATUS
23608 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000023609 echo 'CEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023610 sed -f $tmp/defines.sed $tmp/in >$tmp/out
23611 rm -f $tmp/in
23612 mv $tmp/out $tmp/in
23613' >>$CONFIG_STATUS
23614 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000023615 rm -f conftest.defines
23616 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000023617done
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023618rm -f conftest.defines
23619echo ' fi # grep' >>$CONFIG_STATUS
23620echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000023621
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023622# Break up conftest.undefs because some shells have a limit on the size
23623# of here documents, and old seds have small limits too (100 cmds).
23624echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
23625rm -f conftest.tail
23626while grep . conftest.undefs >/dev/null
23627do
23628 # Write a limited-size here document to $tmp/undefs.sed.
23629 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
23630 # Speed up: don't consider the non `#undef'
23631 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
23632 # Work around the forget-to-reset-the-flag bug.
23633 echo 't clr' >>$CONFIG_STATUS
23634 echo ': clr' >>$CONFIG_STATUS
23635 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
23636 echo 'CEOF
23637 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
23638 rm -f $tmp/in
23639 mv $tmp/out $tmp/in
23640' >>$CONFIG_STATUS
23641 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
23642 rm -f conftest.undefs
23643 mv conftest.tail conftest.undefs
23644done
23645rm -f conftest.undefs
23646
Martin v. Löwis11437992002-04-12 09:54:03 +000023647cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023648 # Let's still pretend it is `configure' which instantiates (i.e., don't
23649 # use $as_me), people would be surprised to read:
23650 # /* config.h. Generated by config.status. */
23651 if test x"$ac_file" = x-; then
23652 echo "/* Generated by configure. */" >$tmp/config.h
23653 else
23654 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
23655 fi
23656 cat $tmp/in >>$tmp/config.h
23657 rm -f $tmp/in
Martin v. Löwis11437992002-04-12 09:54:03 +000023658 if test x"$ac_file" != x-; then
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023659 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023660 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
23661echo "$as_me: $ac_file is unchanged" >&6;}
23662 else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023663 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23664$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23665 X"$ac_file" : 'X\(//\)[^/]' \| \
23666 X"$ac_file" : 'X\(//\)$' \| \
23667 X"$ac_file" : 'X\(/\)' \| \
23668 . : '\(.\)' 2>/dev/null ||
23669echo X"$ac_file" |
23670 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23671 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23672 /^X\(\/\/\)$/{ s//\1/; q; }
23673 /^X\(\/\).*/{ s//\1/; q; }
23674 s/.*/./; q'`
23675 { if $as_mkdir_p; then
23676 mkdir -p "$ac_dir"
23677 else
23678 as_dir="$ac_dir"
23679 as_dirs=
23680 while test ! -d "$as_dir"; do
23681 as_dirs="$as_dir $as_dirs"
23682 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23683$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23684 X"$as_dir" : 'X\(//\)[^/]' \| \
23685 X"$as_dir" : 'X\(//\)$' \| \
23686 X"$as_dir" : 'X\(/\)' \| \
23687 . : '\(.\)' 2>/dev/null ||
23688echo X"$as_dir" |
23689 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23690 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23691 /^X\(\/\/\)$/{ s//\1/; q; }
23692 /^X\(\/\).*/{ s//\1/; q; }
23693 s/.*/./; q'`
23694 done
23695 test ! -n "$as_dirs" || mkdir $as_dirs
23696 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23697echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23698 { (exit 1); exit 1; }; }; }
23699
Martin v. Löwis11437992002-04-12 09:54:03 +000023700 rm -f $ac_file
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023701 mv $tmp/config.h $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000023702 fi
23703 else
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023704 cat $tmp/config.h
23705 rm -f $tmp/config.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023706 fi
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023707done
23708_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000023709
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000023710cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000023711
Martin v. Löwis11437992002-04-12 09:54:03 +000023712{ (exit 0); exit 0; }
23713_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023714chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000023715ac_clean_files=$ac_clean_files_save
23716
23717
23718# configure is writing to config.log, and then calls config.status.
23719# config.status does its own redirection, appending to config.log.
23720# Unfortunately, on DOS this fails, as config.log is still kept open
23721# by configure, so config.status won't be able to write to it; its
23722# output is simply discarded. So we exec the FD to /dev/null,
23723# effectively closing config.log, so it can be properly (re)opened and
23724# appended to by config.status. When coming back to configure, we
23725# need to make the FD available again.
23726if test "$no_create" != yes; then
23727 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000023728 ac_config_status_args=
23729 test "$silent" = yes &&
23730 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000023731 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000023732 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000023733 exec 5>>config.log
23734 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23735 # would make configure fail if this is the last instruction.
23736 $ac_cs_success || { (exit 1); exit 1; }
23737fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000023738
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000023739
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000023740echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000023741if test ! -f Modules/Setup
23742then
23743 cp $srcdir/Modules/Setup.dist Modules/Setup
23744fi
23745
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000023746echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000023747if test ! -f Modules/Setup.local
23748then
23749 echo "# Edit this file for local setup changes" >Modules/Setup.local
23750fi
23751
23752echo "creating Makefile"
23753$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
23754 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000023755 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000023756mv config.c Modules