blob: 42835be6de3e21c00038a690e4bb8e2cab02571b [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Skip Montanaro89e975f2007-08-22 19:05:21 +00002# From configure.in Revision: 56636 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Skip Montanaro89e975f2007-08-22 19:05:21 +00004# Generated by GNU Autoconf 2.59 for python 2.6.
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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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
Brett Cannon19fab762007-06-02 03:02:29 +000026
Skip Montanaro89e975f2007-08-22 19:05:21 +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
33
Skip Montanaro6dead952003-09-25 14:50:04 +000034
Skip Montanaro89e975f2007-08-22 19:05:21 +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
67
Skip Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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
134for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
135do
136 IFS=$as_save_IFS
137 test -z "$as_dir" && as_dir=.
Skip Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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
Brett Cannon19fab762007-06-02 03:02:29 +0000155done
Skip Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +0000174 s,-$,,
175 s,^['$as_cr_digits']*\n,,
Martin v. Löwis11437992002-04-12 09:54:03 +0000176 ' >$as_me.lineno &&
Skip Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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'
Neal Norwitz9be57322006-08-18 05:39:20 +0000273PACKAGE_VERSION='2.6'
274PACKAGE_STRING='python 2.6'
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 Montanaro89e975f2007-08-22 19:05:21 +0000281#if HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000282# include <sys/types.h>
283#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +0000284#if HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000285# include <sys/stat.h>
286#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +0000287#if STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000288# include <stdlib.h>
289# include <stddef.h>
290#else
Skip Montanaro89e975f2007-08-22 19:05:21 +0000291# if HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000292# include <stdlib.h>
293# endif
294#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +0000301#if HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000302# include <strings.h>
303#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +0000304#if HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000305# include <inttypes.h>
Skip Montanaro89e975f2007-08-22 19:05:21 +0000306#else
307# if HAVE_STDINT_H
308# include <stdint.h>
309# endif
Martin v. Löwis11437992002-04-12 09:54:03 +0000310#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +0000311#if HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000312# include <unistd.h>
313#endif"
314
Skip Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +0000346datadir='${prefix}/share'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000347sysconfdir='${prefix}/etc'
348sharedstatedir='${prefix}/com'
349localstatedir='${prefix}/var'
Skip Montanaro89e975f2007-08-22 19:05:21 +0000350libdir='${exec_prefix}/lib'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000351includedir='${prefix}/include'
352oldincludedir='/usr/include'
Skip Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +0000392 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000393 ac_prev=datadir ;;
Skip Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +0000661# Be sure to have absolute paths.
662for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000663do
Skip Montanaro89e975f2007-08-22 19:05:21 +0000664 eval ac_val=$`echo $ac_var`
Martin v. Löwis11437992002-04-12 09:54:03 +0000665 case $ac_val in
Skip Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +0000716 X"$0" : 'X\(/\)' \| \
717 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000718echo X"$0" |
Skip Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +0000738 fi
Brett Cannon19fab762007-06-02 03:02:29 +0000739fi
Skip Montanaro89e975f2007-08-22 19:05:21 +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
Neal Norwitz9be57322006-08-18 05:39:20 +0000784\`configure' configures python 2.6 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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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
Neal Norwitz9be57322006-08-18 05:39:20 +0000841 short | recursive ) echo "Configuration of python 2.6:";;
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]
Ronald Oussoren988117f2006-04-29 11:31:35 +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
Martin v. Löwis0f48d982006-04-14 14:34:26 +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
Martin v. Löwis9176fc12006-04-11 11:12:43 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +0000906 test -d $ac_dir || continue
Martin v. Löwis11437992002-04-12 09:54:03 +0000907 ac_builddir=.
908
Skip Montanaro89e975f2007-08-22 19:05:21 +0000909if test "$ac_dir" != .; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000910 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Skip Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +0000918 .) # No --srcdir option. We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +0000919 ac_srcdir=.
Skip Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +0000986 fi
987 cd $ac_popdir
Martin v. Löwis11437992002-04-12 09:54:03 +0000988 done
989fi
990
Skip Montanaro89e975f2007-08-22 19:05:21 +0000991test -n "$ac_init_help" && exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +0000992if $ac_init_version; then
993 cat <<\_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +0000994python configure 2.6
Skip Montanaro89e975f2007-08-22 19:05:21 +0000995generated by GNU Autoconf 2.59
Martin v. Löwis11437992002-04-12 09:54:03 +0000996
Skip Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +00001001 exit 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001002fi
Skip Montanaro89e975f2007-08-22 19:05:21 +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
Neal Norwitz9be57322006-08-18 05:39:20 +00001008It was created by python $as_me 2.6, which was
Skip Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +00001127{
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 (set) 2>&1 |
Skip Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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
Neal Norwitz9be57322006-08-18 05:39:20 +00001360VERSION=2.6
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
Martin v. Löwis76760b02007-07-31 19:57:56 +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 Montanaro89e975f2007-08-22 19:05:21 +00001413# Check whether --enable-universalsdk or --disable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001414if test "${enable_universalsdk+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00001415 enableval="$enable_universalsdk"
1416
Ronald Oussoren988117f2006-04-29 11:31:35 +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
1431
1432else
1433
1434 UNIVERSALSDK=
1435 enable_universalsdk=
1436
Skip Montanaro89e975f2007-08-22 19:05:21 +00001437fi;
Ronald Oussoren988117f2006-04-29 11:31:35 +00001438
1439
Skip Montanaro89e975f2007-08-22 19:05:21 +00001440# Check whether --enable-framework or --disable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00001441if test "${enable_framework+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +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=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001454 FRAMEWORKINSTALLFIRST=
1455 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001456 FRAMEWORKALTINSTALLFIRST=
1457 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001458 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
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001470 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
1471 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5b787322006-06-06 19:50:24 +00001472 FRAMEWORKALTINSTALLFIRST="${FRAMEWORKINSTALLFIRST} bininstall maninstall"
1473 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001474 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
Ronald Oussoren836b0392006-05-14 19:56:34 +00001480
1481 # Add makefiles for Mac specific code to the list of output
1482 # files:
Skip Montanaro89e975f2007-08-22 19:05:21 +00001483 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001484
Skip Montanaro89e975f2007-08-22 19:05:21 +00001485 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00001486
Skip Montanaro89e975f2007-08-22 19:05:21 +00001487 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +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=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001497 FRAMEWORKINSTALLFIRST=
1498 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00001499 FRAMEWORKALTINSTALLFIRST=
1500 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00001501 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 Montanaro89e975f2007-08-22 19:05:21 +00001508fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001509
1510
1511
1512
Jack Jansene578a632001-08-15 01:27:14 +00001513
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00001514
1515
Ronald Oussoren5b787322006-06-06 19:50:24 +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 Montanaro89e975f2007-08-22 19:05:21 +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.
Neal Norwitz4bc2c092006-09-05 02:57:01 +00001564 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001565 define_xopen_source=no;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00001566 # 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)
1570 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 ;;
Neal Norwitze8fb9922006-04-04 05:32:17 +00001600 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
1601 # disables platform specific features beyond repair.
Martin v. Löwisa0588362006-04-04 06:03:50 +00001602 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
Neal Norwitz7659f0f2006-06-12 02:09:03 +00001603 # has no effect, don't bother defining them
Ronald Oussorenc95f7562006-08-09 14:56:33 +00001604 Darwin/[789].*)
Neal Norwitze8fb9922006-04-04 05:32:17 +00001605 define_xopen_source=no
1606 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00001607
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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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
Ronald Oussoren988117f2006-04-29 11:31:35 +00001703
Jack Jansen6b08a402004-06-03 12:41:45 +00001704CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001737 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001738 case $BE_HOST_CPU in
1739 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001740 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001741 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001742 BASECFLAGS="$BASECFLAGS -export pragma"
1743 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001744 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001745 ;;
1746 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001747 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001748 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001749 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001750 ;;
1751 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001752 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1753echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1754 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001755 ;;
1756 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001757 AR="\$(srcdir)/Modules/ar_beos"
1758 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001759 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001760 Monterey*)
1761 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001762 without_gcc=;;
1763 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001764 esac
Skip Montanaro89e975f2007-08-22 19:05:21 +00001765fi;
1766echo "$as_me:$LINENO: result: $without_gcc" >&5
1767echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001768
Guido van Rossum8b131c51995-03-09 14:10:13 +00001769# If the user switches compilers, we can't believe the cache
1770if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1771then
Martin v. Löwis11437992002-04-12 09:54:03 +00001772 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1773(it is also a good idea to do 'make clean' before compiling)" >&5
1774echo "$as_me: error: cached CC is different -- throw away $cache_file
1775(it is also a good idea to do 'make clean' before compiling)" >&2;}
1776 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001777fi
1778
Martin v. Löwis11437992002-04-12 09:54:03 +00001779ac_ext=c
1780ac_cpp='$CPP $CPPFLAGS'
1781ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1782ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1783ac_compiler_gnu=$ac_cv_c_compiler_gnu
1784if test -n "$ac_tool_prefix"; then
1785 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1786set dummy ${ac_tool_prefix}gcc; ac_word=$2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001787echo "$as_me:$LINENO: checking for $ac_word" >&5
1788echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001789if test "${ac_cv_prog_CC+set}" = set; then
1790 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001791else
1792 if test -n "$CC"; then
1793 ac_cv_prog_CC="$CC" # Let the user override the test.
1794else
Martin v. Löwis11437992002-04-12 09:54:03 +00001795as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1796for as_dir in $PATH
1797do
1798 IFS=$as_save_IFS
1799 test -z "$as_dir" && as_dir=.
1800 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaro89e975f2007-08-22 19:05:21 +00001801 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001802 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1803 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1804 break 2
1805 fi
1806done
1807done
1808
Jack Jansendd19cf82001-12-06 22:36:17 +00001809fi
1810fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001811CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001812if test -n "$CC"; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00001813 echo "$as_me:$LINENO: result: $CC" >&5
1814echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001815else
Skip Montanaro89e975f2007-08-22 19:05:21 +00001816 echo "$as_me:$LINENO: result: no" >&5
1817echo "${ECHO_T}no" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001818fi
1819
1820fi
1821if test -z "$ac_cv_prog_CC"; then
1822 ac_ct_CC=$CC
1823 # Extract the first word of "gcc", so it can be a program name with args.
1824set dummy gcc; ac_word=$2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001825echo "$as_me:$LINENO: checking for $ac_word" >&5
1826echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001827if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1828 echo $ECHO_N "(cached) $ECHO_C" >&6
1829else
1830 if test -n "$ac_ct_CC"; then
1831 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1832else
1833as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1834for as_dir in $PATH
1835do
1836 IFS=$as_save_IFS
1837 test -z "$as_dir" && as_dir=.
1838 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaro89e975f2007-08-22 19:05:21 +00001839 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001840 ac_cv_prog_ac_ct_CC="gcc"
1841 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1842 break 2
1843 fi
1844done
1845done
1846
1847fi
1848fi
1849ac_ct_CC=$ac_cv_prog_ac_ct_CC
1850if test -n "$ac_ct_CC"; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00001851 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1852echo "${ECHO_T}$ac_ct_CC" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001853else
Skip Montanaro89e975f2007-08-22 19:05:21 +00001854 echo "$as_me:$LINENO: result: no" >&5
1855echo "${ECHO_T}no" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001856fi
1857
Skip Montanaro89e975f2007-08-22 19:05:21 +00001858 CC=$ac_ct_CC
Martin v. Löwis11437992002-04-12 09:54:03 +00001859else
1860 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001861fi
1862
Jack Jansendd19cf82001-12-06 22:36:17 +00001863if test -z "$CC"; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00001864 if test -n "$ac_tool_prefix"; then
1865 # 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 +00001866set dummy ${ac_tool_prefix}cc; ac_word=$2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001867echo "$as_me:$LINENO: checking for $ac_word" >&5
1868echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001869if test "${ac_cv_prog_CC+set}" = set; then
1870 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001871else
1872 if test -n "$CC"; then
1873 ac_cv_prog_CC="$CC" # Let the user override the test.
1874else
Martin v. Löwis11437992002-04-12 09:54:03 +00001875as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1876for as_dir in $PATH
1877do
1878 IFS=$as_save_IFS
1879 test -z "$as_dir" && as_dir=.
1880 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaro89e975f2007-08-22 19:05:21 +00001881 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001882 ac_cv_prog_CC="${ac_tool_prefix}cc"
1883 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1884 break 2
1885 fi
1886done
1887done
1888
1889fi
1890fi
1891CC=$ac_cv_prog_CC
1892if test -n "$CC"; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00001893 echo "$as_me:$LINENO: result: $CC" >&5
1894echo "${ECHO_T}$CC" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001895else
Skip Montanaro89e975f2007-08-22 19:05:21 +00001896 echo "$as_me:$LINENO: result: no" >&5
1897echo "${ECHO_T}no" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001898fi
1899
Skip Montanaro89e975f2007-08-22 19:05:21 +00001900fi
1901if test -z "$ac_cv_prog_CC"; then
1902 ac_ct_CC=$CC
1903 # Extract the first word of "cc", so it can be a program name with args.
1904set dummy cc; ac_word=$2
1905echo "$as_me:$LINENO: checking for $ac_word" >&5
1906echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1907if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1908 echo $ECHO_N "(cached) $ECHO_C" >&6
1909else
1910 if test -n "$ac_ct_CC"; then
1911 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1912else
1913as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1914for as_dir in $PATH
1915do
1916 IFS=$as_save_IFS
1917 test -z "$as_dir" && as_dir=.
1918 for ac_exec_ext in '' $ac_executable_extensions; do
1919 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1920 ac_cv_prog_ac_ct_CC="cc"
1921 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1922 break 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001923 fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00001924done
1925done
1926
1927fi
1928fi
1929ac_ct_CC=$ac_cv_prog_ac_ct_CC
1930if test -n "$ac_ct_CC"; then
1931 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1932echo "${ECHO_T}$ac_ct_CC" >&6
1933else
1934 echo "$as_me:$LINENO: result: no" >&5
1935echo "${ECHO_T}no" >&6
1936fi
1937
1938 CC=$ac_ct_CC
1939else
1940 CC="$ac_cv_prog_CC"
1941fi
1942
Martin v. Löwis11437992002-04-12 09:54:03 +00001943fi
1944if test -z "$CC"; then
1945 # Extract the first word of "cc", so it can be a program name with args.
1946set dummy cc; ac_word=$2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001947echo "$as_me:$LINENO: checking for $ac_word" >&5
1948echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001949if test "${ac_cv_prog_CC+set}" = set; then
1950 echo $ECHO_N "(cached) $ECHO_C" >&6
1951else
1952 if test -n "$CC"; then
1953 ac_cv_prog_CC="$CC" # Let the user override the test.
1954else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001955 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00001956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1957for as_dir in $PATH
1958do
1959 IFS=$as_save_IFS
1960 test -z "$as_dir" && as_dir=.
1961 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaro89e975f2007-08-22 19:05:21 +00001962 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001963 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1964 ac_prog_rejected=yes
1965 continue
1966 fi
1967 ac_cv_prog_CC="cc"
1968 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1969 break 2
1970 fi
1971done
1972done
1973
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001974if test $ac_prog_rejected = yes; then
1975 # We found a bogon in the path, so make sure we never use it.
1976 set dummy $ac_cv_prog_CC
1977 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00001978 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001979 # We chose a different compiler from the bogus one.
1980 # However, it has the same basename, so the bogon will be chosen
1981 # first if we set CC to just the basename; use the full file name.
1982 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00001983 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001984 fi
1985fi
1986fi
1987fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001988CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001989if test -n "$CC"; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00001990 echo "$as_me:$LINENO: result: $CC" >&5
1991echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001992else
Skip Montanaro89e975f2007-08-22 19:05:21 +00001993 echo "$as_me:$LINENO: result: no" >&5
1994echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001995fi
1996
Martin v. Löwis11437992002-04-12 09:54:03 +00001997fi
1998if test -z "$CC"; then
1999 if test -n "$ac_tool_prefix"; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00002000 for ac_prog in cl
Martin v. Löwis11437992002-04-12 09:54:03 +00002001 do
2002 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2003set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Skip Montanaro89e975f2007-08-22 19:05:21 +00002004echo "$as_me:$LINENO: checking for $ac_word" >&5
2005echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002006if test "${ac_cv_prog_CC+set}" = set; then
2007 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002008else
2009 if test -n "$CC"; then
2010 ac_cv_prog_CC="$CC" # Let the user override the test.
2011else
Martin v. Löwis11437992002-04-12 09:54:03 +00002012as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2013for as_dir in $PATH
2014do
2015 IFS=$as_save_IFS
2016 test -z "$as_dir" && as_dir=.
2017 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaro89e975f2007-08-22 19:05:21 +00002018 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002019 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2020 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2021 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002022 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002023done
2024done
2025
2026fi
2027fi
2028CC=$ac_cv_prog_CC
2029if test -n "$CC"; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00002030 echo "$as_me:$LINENO: result: $CC" >&5
2031echo "${ECHO_T}$CC" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002032else
Skip Montanaro89e975f2007-08-22 19:05:21 +00002033 echo "$as_me:$LINENO: result: no" >&5
2034echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002035fi
2036
Martin v. Löwis11437992002-04-12 09:54:03 +00002037 test -n "$CC" && break
2038 done
2039fi
2040if test -z "$CC"; then
2041 ac_ct_CC=$CC
Skip Montanaro89e975f2007-08-22 19:05:21 +00002042 for ac_prog in cl
Martin v. Löwis11437992002-04-12 09:54:03 +00002043do
2044 # Extract the first word of "$ac_prog", so it can be a program name with args.
2045set dummy $ac_prog; ac_word=$2
Skip Montanaro89e975f2007-08-22 19:05:21 +00002046echo "$as_me:$LINENO: checking for $ac_word" >&5
2047echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002048if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2049 echo $ECHO_N "(cached) $ECHO_C" >&6
2050else
2051 if test -n "$ac_ct_CC"; then
2052 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2053else
2054as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2055for as_dir in $PATH
2056do
2057 IFS=$as_save_IFS
2058 test -z "$as_dir" && as_dir=.
2059 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaro89e975f2007-08-22 19:05:21 +00002060 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002061 ac_cv_prog_ac_ct_CC="$ac_prog"
2062 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2063 break 2
2064 fi
2065done
2066done
Jack Jansendd19cf82001-12-06 22:36:17 +00002067
Martin v. Löwis11437992002-04-12 09:54:03 +00002068fi
2069fi
2070ac_ct_CC=$ac_cv_prog_ac_ct_CC
2071if test -n "$ac_ct_CC"; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00002072 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2073echo "${ECHO_T}$ac_ct_CC" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002074else
Skip Montanaro89e975f2007-08-22 19:05:21 +00002075 echo "$as_me:$LINENO: result: no" >&5
2076echo "${ECHO_T}no" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002077fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002078
Martin v. Löwis11437992002-04-12 09:54:03 +00002079 test -n "$ac_ct_CC" && break
2080done
Michael W. Hudson54241132001-12-07 15:38:26 +00002081
Skip Montanaro89e975f2007-08-22 19:05:21 +00002082 CC=$ac_ct_CC
Martin v. Löwis11437992002-04-12 09:54:03 +00002083fi
2084
2085fi
2086
2087
Skip Montanaro6dead952003-09-25 14:50:04 +00002088test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2089See \`config.log' for more details." >&5
2090echo "$as_me: error: no acceptable C compiler found in \$PATH
2091See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002092 { (exit 1); exit 1; }; }
2093
2094# Provide some information about the compiler.
Skip Montanaro89e975f2007-08-22 19:05:21 +00002095echo "$as_me:$LINENO:" \
2096 "checking for C compiler version" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002097ac_compiler=`set X $ac_compile; echo $2`
Skip Montanaro89e975f2007-08-22 19:05:21 +00002098{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2099 (eval $ac_compiler --version </dev/null >&5) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002100 ac_status=$?
2101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2102 (exit $ac_status); }
Skip Montanaro89e975f2007-08-22 19:05:21 +00002103{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2104 (eval $ac_compiler -v </dev/null >&5) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002105 ac_status=$?
2106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2107 (exit $ac_status); }
Skip Montanaro89e975f2007-08-22 19:05:21 +00002108{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2109 (eval $ac_compiler -V </dev/null >&5) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002110 ac_status=$?
2111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2112 (exit $ac_status); }
2113
2114cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002115/* confdefs.h. */
2116_ACEOF
2117cat confdefs.h >>conftest.$ac_ext
2118cat >>conftest.$ac_ext <<_ACEOF
2119/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002120
Martin v. Löwis11437992002-04-12 09:54:03 +00002121int
2122main ()
2123{
2124
2125 ;
2126 return 0;
2127}
2128_ACEOF
2129ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002130ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002131# Try to create an executable without -o first, disregard a.out.
2132# It will help us diagnose broken compilers, and finding out an intuition
2133# of exeext.
Skip Montanaro89e975f2007-08-22 19:05:21 +00002134echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2135echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002136ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
Skip Montanaro89e975f2007-08-22 19:05:21 +00002137if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2138 (eval $ac_link_default) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002139 ac_status=$?
2140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2141 (exit $ac_status); }; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00002142 # Find the output, starting from the most likely. This scheme is
2143# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2144# resort.
2145
2146# Be careful to initialize this variable, since it used to be cached.
2147# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2148ac_cv_exeext=
2149# b.out is created by i960 compilers.
2150for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
Skip Montanaro6dead952003-09-25 14:50:04 +00002151do
2152 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002153 case $ac_file in
Skip Montanaro89e975f2007-08-22 19:05:21 +00002154 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
2155 ;;
2156 conftest.$ac_ext )
2157 # This is the source file.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002158 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002159 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002160 # We found the default executable, but exeext='' is most
2161 # certainly right.
2162 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002163 *.* )
Skip Montanaro89e975f2007-08-22 19:05:21 +00002164 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2165 # FIXME: I believe we export ac_cv_exeext for Libtool,
2166 # but it would be cool to find out if it's true. Does anybody
2167 # maintain Libtool? --akim.
2168 export ac_cv_exeext
Skip Montanarof0d5f792004-08-15 14:08:23 +00002169 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002170 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002171 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002172 esac
2173done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002174else
Martin v. Löwis11437992002-04-12 09:54:03 +00002175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002176sed 's/^/| /' conftest.$ac_ext >&5
2177
2178{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2179See \`config.log' for more details." >&5
2180echo "$as_me: error: C compiler cannot create executables
2181See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002182 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002183fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002184
Martin v. Löwis11437992002-04-12 09:54:03 +00002185ac_exeext=$ac_cv_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00002186echo "$as_me:$LINENO: result: $ac_file" >&5
2187echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002188
Skip Montanaro89e975f2007-08-22 19:05:21 +00002189# Check the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002190# the compiler is broken, or we cross compile.
Skip Montanaro89e975f2007-08-22 19:05:21 +00002191echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2192echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002193# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2194# If not cross compiling, check that we can run a simple program.
2195if test "$cross_compiling" != yes; then
2196 if { ac_try='./$ac_file'
Skip Montanaro89e975f2007-08-22 19:05:21 +00002197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2198 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002199 ac_status=$?
2200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2201 (exit $ac_status); }; }; then
2202 cross_compiling=no
2203 else
2204 if test "$cross_compiling" = maybe; then
2205 cross_compiling=yes
2206 else
2207 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002208If you meant to cross compile, use \`--host'.
2209See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002210echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002211If you meant to cross compile, use \`--host'.
2212See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002213 { (exit 1); exit 1; }; }
2214 fi
2215 fi
2216fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00002217echo "$as_me:$LINENO: result: yes" >&5
2218echo "${ECHO_T}yes" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002219
Skip Montanaro6dead952003-09-25 14:50:04 +00002220rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002221ac_clean_files=$ac_clean_files_save
Skip Montanaro89e975f2007-08-22 19:05:21 +00002222# Check the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002223# the compiler is broken, or we cross compile.
Skip Montanaro89e975f2007-08-22 19:05:21 +00002224echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2225echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2226echo "$as_me:$LINENO: result: $cross_compiling" >&5
2227echo "${ECHO_T}$cross_compiling" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002228
Skip Montanaro89e975f2007-08-22 19:05:21 +00002229echo "$as_me:$LINENO: checking for suffix of executables" >&5
2230echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2231if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2232 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002233 ac_status=$?
2234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2235 (exit $ac_status); }; then
2236 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2237# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2238# work properly (i.e., refer to `conftest.exe'), while it won't with
2239# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002240for ac_file in conftest.exe conftest conftest.*; do
2241 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002242 case $ac_file in
Skip Montanaro89e975f2007-08-22 19:05:21 +00002243 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002244 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanaro89e975f2007-08-22 19:05:21 +00002245 export ac_cv_exeext
Skip Montanarof0d5f792004-08-15 14:08:23 +00002246 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002247 * ) break;;
2248 esac
2249done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002250else
Skip Montanaro6dead952003-09-25 14:50:04 +00002251 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2252See \`config.log' for more details." >&5
2253echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2254See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002255 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002256fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002257
Martin v. Löwis11437992002-04-12 09:54:03 +00002258rm -f conftest$ac_cv_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00002259echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2260echo "${ECHO_T}$ac_cv_exeext" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002261
2262rm -f conftest.$ac_ext
2263EXEEXT=$ac_cv_exeext
2264ac_exeext=$EXEEXT
Skip Montanaro89e975f2007-08-22 19:05:21 +00002265echo "$as_me:$LINENO: checking for suffix of object files" >&5
2266echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002267if test "${ac_cv_objext+set}" = set; then
2268 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002269else
Martin v. Löwis11437992002-04-12 09:54:03 +00002270 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002271/* confdefs.h. */
2272_ACEOF
2273cat confdefs.h >>conftest.$ac_ext
2274cat >>conftest.$ac_ext <<_ACEOF
2275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002276
Martin v. Löwis11437992002-04-12 09:54:03 +00002277int
2278main ()
2279{
2280
2281 ;
2282 return 0;
2283}
2284_ACEOF
2285rm -f conftest.o conftest.obj
Skip Montanaro89e975f2007-08-22 19:05:21 +00002286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2287 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002288 ac_status=$?
2289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2290 (exit $ac_status); }; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00002291 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00002292 case $ac_file in
Skip Montanaro89e975f2007-08-22 19:05:21 +00002293 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002294 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2295 break;;
2296 esac
2297done
2298else
2299 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002300sed 's/^/| /' conftest.$ac_ext >&5
2301
2302{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2303See \`config.log' for more details." >&5
2304echo "$as_me: error: cannot compute suffix of object files: cannot compile
2305See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002306 { (exit 1); exit 1; }; }
2307fi
2308
2309rm -f conftest.$ac_cv_objext conftest.$ac_ext
2310fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00002311echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2312echo "${ECHO_T}$ac_cv_objext" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002313OBJEXT=$ac_cv_objext
2314ac_objext=$OBJEXT
Skip Montanaro89e975f2007-08-22 19:05:21 +00002315echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2316echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002317if test "${ac_cv_c_compiler_gnu+set}" = set; then
2318 echo $ECHO_N "(cached) $ECHO_C" >&6
2319else
2320 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002321/* confdefs.h. */
2322_ACEOF
2323cat confdefs.h >>conftest.$ac_ext
2324cat >>conftest.$ac_ext <<_ACEOF
2325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002326
Martin v. Löwis11437992002-04-12 09:54:03 +00002327int
2328main ()
2329{
2330#ifndef __GNUC__
2331 choke me
2332#endif
2333
2334 ;
2335 return 0;
2336}
2337_ACEOF
2338rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00002339if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2340 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002341 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002342 grep -v '^ *+' conftest.er1 >conftest.err
2343 rm -f conftest.er1
2344 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00002346 (exit $ac_status); } &&
2347 { ac_try='test -z "$ac_c_werror_flag"
2348 || test ! -s conftest.err'
2349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2350 (eval $ac_try) 2>&5
2351 ac_status=$?
2352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2353 (exit $ac_status); }; } &&
2354 { ac_try='test -s conftest.$ac_objext'
2355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2356 (eval $ac_try) 2>&5
2357 ac_status=$?
2358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2359 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002360 ac_compiler_gnu=yes
2361else
2362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002363sed 's/^/| /' conftest.$ac_ext >&5
2364
Skip Montanaro89e975f2007-08-22 19:05:21 +00002365ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002366fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00002367rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002368ac_cv_c_compiler_gnu=$ac_compiler_gnu
2369
2370fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00002371echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2372echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002373GCC=`test $ac_compiler_gnu = yes && echo yes`
2374ac_test_CFLAGS=${CFLAGS+set}
2375ac_save_CFLAGS=$CFLAGS
Skip Montanaro89e975f2007-08-22 19:05:21 +00002376CFLAGS="-g"
2377echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2378echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002379if test "${ac_cv_prog_cc_g+set}" = set; then
2380 echo $ECHO_N "(cached) $ECHO_C" >&6
2381else
Skip Montanaro89e975f2007-08-22 19:05:21 +00002382 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002383/* confdefs.h. */
2384_ACEOF
2385cat confdefs.h >>conftest.$ac_ext
2386cat >>conftest.$ac_ext <<_ACEOF
2387/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002388
Martin v. Löwis11437992002-04-12 09:54:03 +00002389int
2390main ()
2391{
2392
2393 ;
2394 return 0;
2395}
2396_ACEOF
2397rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00002398if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2399 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002400 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002401 grep -v '^ *+' conftest.er1 >conftest.err
2402 rm -f conftest.er1
2403 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00002405 (exit $ac_status); } &&
2406 { ac_try='test -z "$ac_c_werror_flag"
2407 || test ! -s conftest.err'
2408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2409 (eval $ac_try) 2>&5
2410 ac_status=$?
2411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2412 (exit $ac_status); }; } &&
2413 { ac_try='test -s conftest.$ac_objext'
2414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2415 (eval $ac_try) 2>&5
2416 ac_status=$?
2417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2418 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002419 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002420else
Martin v. Löwis11437992002-04-12 09:54:03 +00002421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002422sed 's/^/| /' conftest.$ac_ext >&5
2423
Skip Montanaro89e975f2007-08-22 19:05:21 +00002424ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002425fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00002426rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002427fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00002428echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2429echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002430if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002431 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002432elif test $ac_cv_prog_cc_g = yes; then
2433 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002434 CFLAGS="-g -O2"
2435 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002436 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002437 fi
2438else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002439 if test "$GCC" = yes; then
2440 CFLAGS="-O2"
2441 else
2442 CFLAGS=
2443 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002444fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00002445echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2446echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2447if test "${ac_cv_prog_cc_stdc+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00002448 echo $ECHO_N "(cached) $ECHO_C" >&6
2449else
Skip Montanaro89e975f2007-08-22 19:05:21 +00002450 ac_cv_prog_cc_stdc=no
Skip Montanaro6dead952003-09-25 14:50:04 +00002451ac_save_CC=$CC
2452cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002453/* confdefs.h. */
2454_ACEOF
2455cat confdefs.h >>conftest.$ac_ext
2456cat >>conftest.$ac_ext <<_ACEOF
2457/* end confdefs.h. */
2458#include <stdarg.h>
2459#include <stdio.h>
2460#include <sys/types.h>
2461#include <sys/stat.h>
2462/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2463struct buf { int x; };
2464FILE * (*rcsopen) (struct buf *, struct stat *, int);
2465static char *e (p, i)
2466 char **p;
2467 int i;
2468{
2469 return p[i];
2470}
2471static char *f (char * (*g) (char **, int), char **p, ...)
2472{
2473 char *s;
2474 va_list v;
2475 va_start (v,p);
2476 s = g (p, va_arg (v,int));
2477 va_end (v);
2478 return s;
2479}
Skip Montanarof0d5f792004-08-15 14:08:23 +00002480
2481/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2482 function prototypes and stuff, but not '\xHH' hex character constants.
2483 These don't provoke an error unfortunately, instead are silently treated
Skip Montanaro89e975f2007-08-22 19:05:21 +00002484 as 'x'. The following induces an error, until -std1 is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00002485 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2486 array size at least. It's necessary to write '\x00'==0 to get something
Skip Montanaro89e975f2007-08-22 19:05:21 +00002487 that's true only with -std1. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00002488int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2489
Skip Montanaro6dead952003-09-25 14:50:04 +00002490int test (int i, double x);
2491struct s1 {int (*f) (int a);};
2492struct s2 {int (*f) (double a);};
2493int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2494int argc;
2495char **argv;
2496int
2497main ()
2498{
2499return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2500 ;
2501 return 0;
2502}
2503_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +00002504# Don't try gcc -ansi; that turns off useful extensions and
2505# breaks some systems' header files.
2506# AIX -qlanglvl=ansi
2507# Ultrix and OSF/1 -std1
2508# HP-UX 10.20 and later -Ae
2509# HP-UX older versions -Aa -D_HPUX_SOURCE
2510# SVR4 -Xc -D__EXTENSIONS__
2511for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00002512do
2513 CC="$ac_save_CC $ac_arg"
2514 rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00002515if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2516 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00002517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002518 grep -v '^ *+' conftest.er1 >conftest.err
2519 rm -f conftest.er1
2520 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00002522 (exit $ac_status); } &&
2523 { ac_try='test -z "$ac_c_werror_flag"
2524 || test ! -s conftest.err'
2525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2526 (eval $ac_try) 2>&5
2527 ac_status=$?
2528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2529 (exit $ac_status); }; } &&
2530 { ac_try='test -s conftest.$ac_objext'
2531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2532 (eval $ac_try) 2>&5
2533 ac_status=$?
2534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2535 (exit $ac_status); }; }; then
2536 ac_cv_prog_cc_stdc=$ac_arg
2537break
Skip Montanaro6dead952003-09-25 14:50:04 +00002538else
2539 echo "$as_me: failed program was:" >&5
2540sed 's/^/| /' conftest.$ac_ext >&5
2541
2542fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00002543rm -f conftest.err conftest.$ac_objext
Skip Montanaro6dead952003-09-25 14:50:04 +00002544done
Skip Montanaro89e975f2007-08-22 19:05:21 +00002545rm -f conftest.$ac_ext conftest.$ac_objext
Skip Montanaro6dead952003-09-25 14:50:04 +00002546CC=$ac_save_CC
2547
2548fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00002549
2550case "x$ac_cv_prog_cc_stdc" in
2551 x|xno)
2552 echo "$as_me:$LINENO: result: none needed" >&5
2553echo "${ECHO_T}none needed" >&6 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002554 *)
Skip Montanaro89e975f2007-08-22 19:05:21 +00002555 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2556echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2557 CC="$CC $ac_cv_prog_cc_stdc" ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002558esac
2559
Skip Montanaro89e975f2007-08-22 19:05:21 +00002560# Some people use a C++ compiler to compile C. Since we use `exit',
2561# in C++ we need to declare it. In case someone uses the same compiler
2562# for both compiling C and C++ we need to have the C++ compiler decide
2563# the declaration of exit, since it's the most demanding environment.
2564cat >conftest.$ac_ext <<_ACEOF
2565#ifndef __cplusplus
2566 choke me
2567#endif
2568_ACEOF
2569rm -f conftest.$ac_objext
2570if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2571 (eval $ac_compile) 2>conftest.er1
2572 ac_status=$?
2573 grep -v '^ *+' conftest.er1 >conftest.err
2574 rm -f conftest.er1
2575 cat conftest.err >&5
2576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2577 (exit $ac_status); } &&
2578 { ac_try='test -z "$ac_c_werror_flag"
2579 || test ! -s conftest.err'
2580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2581 (eval $ac_try) 2>&5
2582 ac_status=$?
2583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2584 (exit $ac_status); }; } &&
2585 { ac_try='test -s conftest.$ac_objext'
2586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2587 (eval $ac_try) 2>&5
2588 ac_status=$?
2589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2590 (exit $ac_status); }; }; then
2591 for ac_declaration in \
2592 '' \
2593 'extern "C" void std::exit (int) throw (); using std::exit;' \
2594 'extern "C" void std::exit (int); using std::exit;' \
2595 'extern "C" void exit (int) throw ();' \
2596 'extern "C" void exit (int);' \
2597 'void exit (int);'
2598do
2599 cat >conftest.$ac_ext <<_ACEOF
2600/* confdefs.h. */
2601_ACEOF
2602cat confdefs.h >>conftest.$ac_ext
2603cat >>conftest.$ac_ext <<_ACEOF
2604/* end confdefs.h. */
2605$ac_declaration
2606#include <stdlib.h>
2607int
2608main ()
2609{
2610exit (42);
2611 ;
2612 return 0;
2613}
2614_ACEOF
2615rm -f conftest.$ac_objext
2616if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2617 (eval $ac_compile) 2>conftest.er1
2618 ac_status=$?
2619 grep -v '^ *+' conftest.er1 >conftest.err
2620 rm -f conftest.er1
2621 cat conftest.err >&5
2622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2623 (exit $ac_status); } &&
2624 { ac_try='test -z "$ac_c_werror_flag"
2625 || test ! -s conftest.err'
2626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2627 (eval $ac_try) 2>&5
2628 ac_status=$?
2629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2630 (exit $ac_status); }; } &&
2631 { ac_try='test -s conftest.$ac_objext'
2632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2633 (eval $ac_try) 2>&5
2634 ac_status=$?
2635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2636 (exit $ac_status); }; }; then
2637 :
2638else
2639 echo "$as_me: failed program was:" >&5
2640sed 's/^/| /' conftest.$ac_ext >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002641
Skip Montanaro89e975f2007-08-22 19:05:21 +00002642continue
2643fi
2644rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2645 cat >conftest.$ac_ext <<_ACEOF
2646/* confdefs.h. */
2647_ACEOF
2648cat confdefs.h >>conftest.$ac_ext
2649cat >>conftest.$ac_ext <<_ACEOF
2650/* end confdefs.h. */
2651$ac_declaration
2652int
2653main ()
2654{
2655exit (42);
2656 ;
2657 return 0;
2658}
2659_ACEOF
2660rm -f conftest.$ac_objext
2661if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2662 (eval $ac_compile) 2>conftest.er1
2663 ac_status=$?
2664 grep -v '^ *+' conftest.er1 >conftest.err
2665 rm -f conftest.er1
2666 cat conftest.err >&5
2667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2668 (exit $ac_status); } &&
2669 { ac_try='test -z "$ac_c_werror_flag"
2670 || test ! -s conftest.err'
2671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2672 (eval $ac_try) 2>&5
2673 ac_status=$?
2674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2675 (exit $ac_status); }; } &&
2676 { ac_try='test -s conftest.$ac_objext'
2677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2678 (eval $ac_try) 2>&5
2679 ac_status=$?
2680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2681 (exit $ac_status); }; }; then
2682 break
2683else
2684 echo "$as_me: failed program was:" >&5
2685sed 's/^/| /' conftest.$ac_ext >&5
2686
2687fi
2688rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2689done
2690rm -f conftest*
2691if test -n "$ac_declaration"; then
2692 echo '#ifdef __cplusplus' >>confdefs.h
2693 echo $ac_declaration >>confdefs.h
2694 echo '#endif' >>confdefs.h
2695fi
2696
2697else
2698 echo "$as_me: failed program was:" >&5
2699sed 's/^/| /' conftest.$ac_ext >&5
2700
2701fi
2702rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002703ac_ext=c
2704ac_cpp='$CPP $CPPFLAGS'
2705ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2706ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2707ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002708
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002709
Martin v. Löwis0f48d982006-04-14 14:34:26 +00002710
2711
Skip Montanaro89e975f2007-08-22 19:05:21 +00002712echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
2713echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00002714
Skip Montanaro89e975f2007-08-22 19:05:21 +00002715# Check whether --with-cxx_main or --without-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00002716if test "${with_cxx_main+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00002717 withval="$with_cxx_main"
2718
Martin v. Löwis0f48d982006-04-14 14:34:26 +00002719
2720 case $withval in
2721 no) with_cxx_main=no
2722 MAINCC='$(CC)';;
2723 yes) with_cxx_main=yes
2724 MAINCC='$(CXX)';;
2725 *) with_cxx_main=yes
2726 MAINCC=$withval
2727 if test -z "$CXX"
2728 then
2729 CXX=$withval
2730 fi;;
2731 esac
2732else
2733
2734 with_cxx_main=no
2735 MAINCC='$(CC)'
2736
Skip Montanaro89e975f2007-08-22 19:05:21 +00002737fi;
2738echo "$as_me:$LINENO: result: $with_cxx_main" >&5
2739echo "${ECHO_T}$with_cxx_main" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00002740
2741preset_cxx="$CXX"
2742if test -z "$CXX"
2743then
2744 case "$CC" in
2745 gcc) # Extract the first word of "g++", so it can be a program name with args.
2746set dummy g++; ac_word=$2
Skip Montanaro89e975f2007-08-22 19:05:21 +00002747echo "$as_me:$LINENO: checking for $ac_word" >&5
2748echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00002749if test "${ac_cv_path_CXX+set}" = set; then
2750 echo $ECHO_N "(cached) $ECHO_C" >&6
2751else
2752 case $CXX in
2753 [\\/]* | ?:[\\/]*)
2754 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2755 ;;
2756 *)
2757 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2758for as_dir in notfound
2759do
2760 IFS=$as_save_IFS
2761 test -z "$as_dir" && as_dir=.
2762 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaro89e975f2007-08-22 19:05:21 +00002763 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00002764 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
2765 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2766 break 2
2767 fi
2768done
2769done
2770
2771 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
2772 ;;
2773esac
2774fi
2775CXX=$ac_cv_path_CXX
Brett Cannon19fab762007-06-02 03:02:29 +00002776
Skip Montanaro89e975f2007-08-22 19:05:21 +00002777if test -n "$CXX"; then
2778 echo "$as_me:$LINENO: result: $CXX" >&5
2779echo "${ECHO_T}$CXX" >&6
2780else
2781 echo "$as_me:$LINENO: result: no" >&5
2782echo "${ECHO_T}no" >&6
2783fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00002784 ;;
2785 cc) # Extract the first word of "c++", so it can be a program name with args.
2786set dummy c++; ac_word=$2
Skip Montanaro89e975f2007-08-22 19:05:21 +00002787echo "$as_me:$LINENO: checking for $ac_word" >&5
2788echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00002789if test "${ac_cv_path_CXX+set}" = set; then
2790 echo $ECHO_N "(cached) $ECHO_C" >&6
2791else
2792 case $CXX in
2793 [\\/]* | ?:[\\/]*)
2794 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
2795 ;;
2796 *)
2797 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2798for as_dir in notfound
2799do
2800 IFS=$as_save_IFS
2801 test -z "$as_dir" && as_dir=.
2802 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaro89e975f2007-08-22 19:05:21 +00002803 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00002804 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
2805 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2806 break 2
2807 fi
2808done
2809done
2810
2811 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
2812 ;;
2813esac
2814fi
2815CXX=$ac_cv_path_CXX
Brett Cannon19fab762007-06-02 03:02:29 +00002816
Skip Montanaro89e975f2007-08-22 19:05:21 +00002817if test -n "$CXX"; then
2818 echo "$as_me:$LINENO: result: $CXX" >&5
2819echo "${ECHO_T}$CXX" >&6
2820else
2821 echo "$as_me:$LINENO: result: no" >&5
2822echo "${ECHO_T}no" >&6
2823fi
Martin v. Löwis0f48d982006-04-14 14:34:26 +00002824 ;;
2825 esac
2826 if test "$CXX" = "notfound"
2827 then
2828 CXX=""
2829 fi
2830fi
2831if test -z "$CXX"
2832then
2833 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
2834do
2835 # Extract the first word of "$ac_prog", so it can be a program name with args.
2836set dummy $ac_prog; ac_word=$2
Skip Montanaro89e975f2007-08-22 19:05:21 +00002837echo "$as_me:$LINENO: checking for $ac_word" >&5
2838echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00002839if test "${ac_cv_prog_CXX+set}" = set; then
2840 echo $ECHO_N "(cached) $ECHO_C" >&6
2841else
2842 if test -n "$CXX"; then
2843 ac_cv_prog_CXX="$CXX" # Let the user override the test.
2844else
2845as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2846for as_dir in $PATH
2847do
2848 IFS=$as_save_IFS
2849 test -z "$as_dir" && as_dir=.
2850 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaro89e975f2007-08-22 19:05:21 +00002851 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00002852 ac_cv_prog_CXX="$ac_prog"
2853 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2854 break 2
2855 fi
2856done
2857done
2858
2859fi
2860fi
2861CXX=$ac_cv_prog_CXX
2862if test -n "$CXX"; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00002863 echo "$as_me:$LINENO: result: $CXX" >&5
2864echo "${ECHO_T}$CXX" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00002865else
Skip Montanaro89e975f2007-08-22 19:05:21 +00002866 echo "$as_me:$LINENO: result: no" >&5
2867echo "${ECHO_T}no" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00002868fi
2869
2870 test -n "$CXX" && break
2871done
2872test -n "$CXX" || CXX="notfound"
2873
2874 if test "$CXX" = "notfound"
2875 then
2876 CXX=""
2877 fi
2878fi
2879if test "$preset_cxx" != "$CXX"
2880then
2881 { echo "$as_me:$LINENO: WARNING:
2882
2883 By default, distutils will build C++ extension modules with \"$CXX\".
2884 If this is not intended, then set CXX on the configure command line.
2885 " >&5
2886echo "$as_me: WARNING:
2887
2888 By default, distutils will build C++ extension modules with \"$CXX\".
2889 If this is not intended, then set CXX on the configure command line.
2890 " >&2;}
2891fi
2892
2893
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002894# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002895
2896ac_ext=c
2897ac_cpp='$CPP $CPPFLAGS'
2898ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2899ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2900ac_compiler_gnu=$ac_cv_c_compiler_gnu
Skip Montanaro89e975f2007-08-22 19:05:21 +00002901echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2902echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002903# On Suns, sometimes $CPP names a directory.
2904if test -n "$CPP" && test -d "$CPP"; then
2905 CPP=
2906fi
2907if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002908 if test "${ac_cv_prog_CPP+set}" = set; then
2909 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002910else
Martin v. Löwis11437992002-04-12 09:54:03 +00002911 # Double quotes because CPP needs to be expanded
2912 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2913 do
2914 ac_preproc_ok=false
2915for ac_c_preproc_warn_flag in '' yes
2916do
2917 # Use a header file that comes with gcc, so configuring glibc
2918 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002919 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2920 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002921 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002922 # not just through cpp. "Syntax error" is here to catch this case.
2923 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002924/* confdefs.h. */
2925_ACEOF
2926cat confdefs.h >>conftest.$ac_ext
2927cat >>conftest.$ac_ext <<_ACEOF
2928/* end confdefs.h. */
2929#ifdef __STDC__
2930# include <limits.h>
2931#else
2932# include <assert.h>
2933#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00002934 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00002935_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +00002936if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2937 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002938 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002939 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002940 rm -f conftest.er1
2941 cat conftest.err >&5
2942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00002943 (exit $ac_status); } >/dev/null; then
2944 if test -s conftest.err; then
2945 ac_cpp_err=$ac_c_preproc_warn_flag
2946 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2947 else
2948 ac_cpp_err=
2949 fi
2950else
2951 ac_cpp_err=yes
2952fi
2953if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002954 :
2955else
Martin v. Löwis11437992002-04-12 09:54:03 +00002956 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002957sed 's/^/| /' conftest.$ac_ext >&5
2958
Martin v. Löwis11437992002-04-12 09:54:03 +00002959 # Broken: fails on valid input.
2960continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002961fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002962rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002963
Skip Montanaro89e975f2007-08-22 19:05:21 +00002964 # OK, works on sane cases. Now check whether non-existent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00002965 # can be detected and how.
2966 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002967/* confdefs.h. */
2968_ACEOF
2969cat confdefs.h >>conftest.$ac_ext
2970cat >>conftest.$ac_ext <<_ACEOF
2971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002972#include <ac_nonexistent.h>
2973_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +00002974if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2975 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002976 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002977 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002978 rm -f conftest.er1
2979 cat conftest.err >&5
2980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00002981 (exit $ac_status); } >/dev/null; then
2982 if test -s conftest.err; then
2983 ac_cpp_err=$ac_c_preproc_warn_flag
2984 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
2985 else
2986 ac_cpp_err=
2987 fi
2988else
2989 ac_cpp_err=yes
2990fi
2991if test -z "$ac_cpp_err"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002992 # Broken: success on invalid input.
2993continue
2994else
2995 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002996sed 's/^/| /' conftest.$ac_ext >&5
2997
Martin v. Löwis11437992002-04-12 09:54:03 +00002998 # Passes both tests.
2999ac_preproc_ok=:
3000break
3001fi
3002rm -f conftest.err conftest.$ac_ext
3003
3004done
3005# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3006rm -f conftest.err conftest.$ac_ext
3007if $ac_preproc_ok; then
3008 break
3009fi
3010
3011 done
3012 ac_cv_prog_CPP=$CPP
3013
3014fi
3015 CPP=$ac_cv_prog_CPP
3016else
3017 ac_cv_prog_CPP=$CPP
3018fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00003019echo "$as_me:$LINENO: result: $CPP" >&5
3020echo "${ECHO_T}$CPP" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003021ac_preproc_ok=false
3022for ac_c_preproc_warn_flag in '' yes
3023do
3024 # Use a header file that comes with gcc, so configuring glibc
3025 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003026 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3027 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003028 # On the NeXT, cc -E runs the code through the compiler's parser,
3029 # not just through cpp. "Syntax error" is here to catch this case.
3030 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003031/* confdefs.h. */
3032_ACEOF
3033cat confdefs.h >>conftest.$ac_ext
3034cat >>conftest.$ac_ext <<_ACEOF
3035/* end confdefs.h. */
3036#ifdef __STDC__
3037# include <limits.h>
3038#else
3039# include <assert.h>
3040#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003041 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003042_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +00003043if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3044 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003045 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003046 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003047 rm -f conftest.er1
3048 cat conftest.err >&5
3049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00003050 (exit $ac_status); } >/dev/null; then
3051 if test -s conftest.err; then
3052 ac_cpp_err=$ac_c_preproc_warn_flag
3053 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3054 else
3055 ac_cpp_err=
3056 fi
3057else
3058 ac_cpp_err=yes
3059fi
3060if test -z "$ac_cpp_err"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003061 :
3062else
3063 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003064sed 's/^/| /' conftest.$ac_ext >&5
3065
Martin v. Löwis11437992002-04-12 09:54:03 +00003066 # Broken: fails on valid input.
3067continue
3068fi
3069rm -f conftest.err conftest.$ac_ext
3070
Skip Montanaro89e975f2007-08-22 19:05:21 +00003071 # OK, works on sane cases. Now check whether non-existent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003072 # can be detected and how.
3073 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003074/* confdefs.h. */
3075_ACEOF
3076cat confdefs.h >>conftest.$ac_ext
3077cat >>conftest.$ac_ext <<_ACEOF
3078/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003079#include <ac_nonexistent.h>
3080_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +00003081if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3082 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003083 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003084 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003085 rm -f conftest.er1
3086 cat conftest.err >&5
3087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00003088 (exit $ac_status); } >/dev/null; then
3089 if test -s conftest.err; then
3090 ac_cpp_err=$ac_c_preproc_warn_flag
3091 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
3092 else
3093 ac_cpp_err=
3094 fi
3095else
3096 ac_cpp_err=yes
3097fi
3098if test -z "$ac_cpp_err"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003099 # Broken: success on invalid input.
3100continue
3101else
3102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003103sed 's/^/| /' conftest.$ac_ext >&5
3104
Martin v. Löwis11437992002-04-12 09:54:03 +00003105 # Passes both tests.
3106ac_preproc_ok=:
3107break
3108fi
3109rm -f conftest.err conftest.$ac_ext
3110
3111done
3112# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3113rm -f conftest.err conftest.$ac_ext
3114if $ac_preproc_ok; then
3115 :
3116else
Skip Montanaro6dead952003-09-25 14:50:04 +00003117 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3118See \`config.log' for more details." >&5
3119echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3120See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003121 { (exit 1); exit 1; }; }
3122fi
3123
3124ac_ext=c
3125ac_cpp='$CPP $CPPFLAGS'
3126ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3127ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3128ac_compiler_gnu=$ac_cv_c_compiler_gnu
3129
3130
Skip Montanaro89e975f2007-08-22 19:05:21 +00003131echo "$as_me:$LINENO: checking for egrep" >&5
3132echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3133if test "${ac_cv_prog_egrep+set}" = set; then
Skip Montanaro6dead952003-09-25 14:50:04 +00003134 echo $ECHO_N "(cached) $ECHO_C" >&6
3135else
Skip Montanaro89e975f2007-08-22 19:05:21 +00003136 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3137 then ac_cv_prog_egrep='grep -E'
3138 else ac_cv_prog_egrep='egrep'
Skip Montanaro6dead952003-09-25 14:50:04 +00003139 fi
3140fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00003141echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3142echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3143 EGREP=$ac_cv_prog_egrep
Skip Montanaro6dead952003-09-25 14:50:04 +00003144
3145
Martin v. Löwis11437992002-04-12 09:54:03 +00003146
Skip Montanaro89e975f2007-08-22 19:05:21 +00003147echo "$as_me:$LINENO: checking for AIX" >&5
3148echo $ECHO_N "checking for AIX... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003150/* confdefs.h. */
3151_ACEOF
3152cat confdefs.h >>conftest.$ac_ext
3153cat >>conftest.$ac_ext <<_ACEOF
3154/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003155#ifdef _AIX
3156 yes
3157#endif
3158
Martin v. Löwis11437992002-04-12 09:54:03 +00003159_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003160if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003161 $EGREP "yes" >/dev/null 2>&1; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00003162 echo "$as_me:$LINENO: result: yes" >&5
3163echo "${ECHO_T}yes" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003164cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003165#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003166_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003167
3168else
Skip Montanaro89e975f2007-08-22 19:05:21 +00003169 echo "$as_me:$LINENO: result: no" >&5
3170echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003171fi
3172rm -f conftest*
3173
Michael W. Hudson54241132001-12-07 15:38:26 +00003174
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003175
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003176# Check for unsupported systems
3177case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00003178atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003179 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3180 echo See README for details.
3181 exit 1;;
3182esac
3183
Michael W. Hudson54241132001-12-07 15:38:26 +00003184
Skip Montanaro89e975f2007-08-22 19:05:21 +00003185echo "$as_me:$LINENO: checking for --with-suffix" >&5
3186echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003187
Skip Montanaro89e975f2007-08-22 19:05:21 +00003188# Check whether --with-suffix or --without-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003189if test "${with_suffix+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00003190 withval="$with_suffix"
3191
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003192 case $withval in
3193 no) EXEEXT=;;
3194 yes) EXEEXT=.exe;;
3195 *) EXEEXT=$withval;;
3196 esac
Skip Montanaro89e975f2007-08-22 19:05:21 +00003197fi;
3198echo "$as_me:$LINENO: result: $EXEEXT" >&5
3199echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003200
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003201# Test whether we're running on a non-case-sensitive system, in which
3202# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003203
Skip Montanaro89e975f2007-08-22 19:05:21 +00003204echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3205echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003206if test ! -d CaseSensitiveTestDir; then
3207mkdir CaseSensitiveTestDir
3208fi
3209
3210if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003211then
Skip Montanaro89e975f2007-08-22 19:05:21 +00003212 echo "$as_me:$LINENO: result: yes" >&5
3213echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003214 BUILDEXEEXT=.exe
3215else
Skip Montanaro89e975f2007-08-22 19:05:21 +00003216 echo "$as_me:$LINENO: result: no" >&5
3217echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003218 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003219fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003220rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003221
Guido van Rossumdd997f71998-10-07 19:58:26 +00003222case $MACHDEP in
3223bsdos*)
3224 case $CC in
3225 gcc) CC="$CC -D_HAVE_BSDI";;
3226 esac;;
3227esac
3228
Guido van Rossum24b1e751997-08-21 02:29:16 +00003229case $ac_sys_system in
3230hp*|HP*)
3231 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003232 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003233 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003234Monterey*)
3235 case $CC in
3236 cc) CC="$CC -Wl,-Bexport";;
3237 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003238SunOS*)
3239 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003240
3241cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003242#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003243_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003244
3245 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003246esac
3247
Michael W. Hudson54241132001-12-07 15:38:26 +00003248
3249
Skip Montanaro89e975f2007-08-22 19:05:21 +00003250echo "$as_me:$LINENO: checking LIBRARY" >&5
3251echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003252if test -z "$LIBRARY"
3253then
3254 LIBRARY='libpython$(VERSION).a'
3255fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00003256echo "$as_me:$LINENO: result: $LIBRARY" >&5
3257echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003258
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003259# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003260# name of the library into which to insert object files). BLDLIBRARY is also
3261# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3262# is blank as the main program is not linked directly against LDLIBRARY.
3263# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3264# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3265# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3266# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003267#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003268# RUNSHARED is used to run shared python without installed libraries
3269#
3270# INSTSONAME is the name of the shared library that will be use to install
3271# on the system - some systems like version suffix, others don't
3272
3273
Michael W. Hudson54241132001-12-07 15:38:26 +00003274
3275
3276
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003277
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003278LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003279BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003280INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003281DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003282LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003283RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003284
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003285# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003286# If CXX is set, and if it is needed to link a main function that was
3287# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3288# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003289# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003290# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003291
Skip Montanaro89e975f2007-08-22 19:05:21 +00003292echo "$as_me:$LINENO: checking LINKCC" >&5
3293echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003294if test -z "$LINKCC"
3295then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003296 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003297 case $ac_sys_system in
3298 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003299 exp_extra="\"\""
3300 if test $ac_sys_release -ge 5 -o \
3301 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3302 exp_extra="."
3303 fi
3304 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003305 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003306 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003307 esac
3308fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00003309echo "$as_me:$LINENO: result: $LINKCC" >&5
3310echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003311
Skip Montanaro89e975f2007-08-22 19:05:21 +00003312echo "$as_me:$LINENO: checking for --enable-shared" >&5
3313echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
3314# Check whether --enable-shared or --disable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00003315if test "${enable_shared+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00003316 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003317
Skip Montanaro89e975f2007-08-22 19:05:21 +00003318fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003319
3320if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003321then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003322 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003323 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003324 enable_shared="yes";;
3325 *)
3326 enable_shared="no";;
3327 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003328fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00003329echo "$as_me:$LINENO: result: $enable_shared" >&5
3330echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003331
Skip Montanaro89e975f2007-08-22 19:05:21 +00003332echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3333echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6
3334# Check whether --enable-profiling or --disable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003335if test "${enable_profiling+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00003336 enableval="$enable_profiling"
3337 ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003338 CC="$CC -pg"
3339 if test "$cross_compiling" = yes; then
3340 ac_enable_profiling="no"
3341else
3342 cat >conftest.$ac_ext <<_ACEOF
3343/* confdefs.h. */
3344_ACEOF
3345cat confdefs.h >>conftest.$ac_ext
3346cat >>conftest.$ac_ext <<_ACEOF
3347/* end confdefs.h. */
3348int main() { return 0; }
3349_ACEOF
3350rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00003351if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3352 (eval $ac_link) 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003353 ac_status=$?
3354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3355 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +00003356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3357 (eval $ac_try) 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003358 ac_status=$?
3359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3360 (exit $ac_status); }; }; then
3361 ac_enable_profiling="yes"
3362else
3363 echo "$as_me: program exited with status $ac_status" >&5
3364echo "$as_me: failed program was:" >&5
3365sed 's/^/| /' conftest.$ac_ext >&5
3366
3367( exit $ac_status )
3368ac_enable_profiling="no"
3369fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00003370rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003371fi
3372 CC="$ac_save_cc"
Skip Montanaro89e975f2007-08-22 19:05:21 +00003373fi;
3374echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3375echo "${ECHO_T}$ac_enable_profiling" >&6
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003376
3377case "$ac_enable_profiling" in
3378 "yes")
3379 BASECFLAGS="-pg $BASECFLAGS"
3380 LDFLAGS="-pg $LDFLAGS"
3381 ;;
3382esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003383
Skip Montanaro89e975f2007-08-22 19:05:21 +00003384echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3385echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003386
Guido van Rossumb8552162001-09-05 14:58:11 +00003387# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3388# library that we build, but we do not want to link against it (we
3389# will find it with a -framework option). For this reason there is an
3390# extra variable BLDLIBRARY against which Python and the extension
3391# modules are linked, BLDLIBRARY. This is normally the same as
3392# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003393if test "$enable_framework"
3394then
3395 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003396 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003397 BLDLIBRARY=''
3398else
3399 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003400fi
Jack Jansene578a632001-08-15 01:27:14 +00003401
Martin v. Löwis1142de32002-03-29 16:28:31 +00003402# Other platforms follow
3403if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003404
3405cat >>confdefs.h <<\_ACEOF
3406#define Py_ENABLE_SHARED 1
3407_ACEOF
3408
Martin v. Löwis1142de32002-03-29 16:28:31 +00003409 case $ac_sys_system in
3410 BeOS*)
3411 LDLIBRARY='libpython$(VERSION).so'
3412 ;;
3413 CYGWIN*)
3414 LDLIBRARY='libpython$(VERSION).dll.a'
3415 DLLLIBRARY='libpython$(VERSION).dll'
3416 ;;
3417 SunOS*)
3418 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003419 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003420 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003421 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003422 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00003423 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003424 LDLIBRARY='libpython$(VERSION).so'
3425 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003426 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00003427 case $ac_sys_system in
3428 FreeBSD*)
3429 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
3430 ;;
3431 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003432 INSTSONAME="$LDLIBRARY".$SOVERSION
3433 ;;
3434 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00003435 case `uname -m` in
3436 ia64)
3437 LDLIBRARY='libpython$(VERSION).so'
3438 ;;
3439 *)
3440 LDLIBRARY='libpython$(VERSION).sl'
3441 ;;
3442 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003443 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003444 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003445 ;;
3446 OSF*)
3447 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00003448 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003449 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003450 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003451 atheos*)
3452 LDLIBRARY='libpython$(VERSION).so'
3453 BLDLIBRARY='-L. -lpython$(VERSION)'
3454 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3455 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003456 esac
Jason Tishler30765592003-09-04 11:04:06 +00003457else # shared is disabled
3458 case $ac_sys_system in
3459 CYGWIN*)
3460 BLDLIBRARY='$(LIBRARY)'
3461 LDLIBRARY='libpython$(VERSION).dll.a'
3462 ;;
3463 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003464fi
3465
Skip Montanaro89e975f2007-08-22 19:05:21 +00003466echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3467echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003468
Martin v. Löwis11437992002-04-12 09:54:03 +00003469if test -n "$ac_tool_prefix"; then
3470 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3471set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Skip Montanaro89e975f2007-08-22 19:05:21 +00003472echo "$as_me:$LINENO: checking for $ac_word" >&5
3473echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003474if test "${ac_cv_prog_RANLIB+set}" = set; then
3475 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003476else
3477 if test -n "$RANLIB"; then
3478 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3479else
Martin v. Löwis11437992002-04-12 09:54:03 +00003480as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3481for as_dir in $PATH
3482do
3483 IFS=$as_save_IFS
3484 test -z "$as_dir" && as_dir=.
3485 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaro89e975f2007-08-22 19:05:21 +00003486 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003487 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3488 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3489 break 2
3490 fi
3491done
3492done
3493
Guido van Rossum627b2d71993-12-24 10:39:16 +00003494fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003495fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003496RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003497if test -n "$RANLIB"; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00003498 echo "$as_me:$LINENO: result: $RANLIB" >&5
3499echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003500else
Skip Montanaro89e975f2007-08-22 19:05:21 +00003501 echo "$as_me:$LINENO: result: no" >&5
3502echo "${ECHO_T}no" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003503fi
3504
3505fi
3506if test -z "$ac_cv_prog_RANLIB"; then
3507 ac_ct_RANLIB=$RANLIB
3508 # Extract the first word of "ranlib", so it can be a program name with args.
3509set dummy ranlib; ac_word=$2
Skip Montanaro89e975f2007-08-22 19:05:21 +00003510echo "$as_me:$LINENO: checking for $ac_word" >&5
3511echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003512if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3513 echo $ECHO_N "(cached) $ECHO_C" >&6
3514else
3515 if test -n "$ac_ct_RANLIB"; then
3516 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3517else
3518as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3519for as_dir in $PATH
3520do
3521 IFS=$as_save_IFS
3522 test -z "$as_dir" && as_dir=.
3523 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaro89e975f2007-08-22 19:05:21 +00003524 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003525 ac_cv_prog_ac_ct_RANLIB="ranlib"
3526 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3527 break 2
3528 fi
3529done
3530done
3531
Skip Montanaro89e975f2007-08-22 19:05:21 +00003532 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
Martin v. Löwis11437992002-04-12 09:54:03 +00003533fi
3534fi
3535ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3536if test -n "$ac_ct_RANLIB"; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00003537 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3538echo "${ECHO_T}$ac_ct_RANLIB" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003539else
Skip Montanaro89e975f2007-08-22 19:05:21 +00003540 echo "$as_me:$LINENO: result: no" >&5
3541echo "${ECHO_T}no" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003542fi
3543
Skip Montanaro89e975f2007-08-22 19:05:21 +00003544 RANLIB=$ac_ct_RANLIB
Martin v. Löwis11437992002-04-12 09:54:03 +00003545else
3546 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003547fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003548
3549
Guido van Rossum7f43da71994-08-01 12:15:30 +00003550for ac_prog in ar aal
3551do
Martin v. Löwis11437992002-04-12 09:54:03 +00003552 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003553set dummy $ac_prog; ac_word=$2
Skip Montanaro89e975f2007-08-22 19:05:21 +00003554echo "$as_me:$LINENO: checking for $ac_word" >&5
3555echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003556if test "${ac_cv_prog_AR+set}" = set; then
3557 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003558else
3559 if test -n "$AR"; then
3560 ac_cv_prog_AR="$AR" # Let the user override the test.
3561else
Martin v. Löwis11437992002-04-12 09:54:03 +00003562as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3563for as_dir in $PATH
3564do
3565 IFS=$as_save_IFS
3566 test -z "$as_dir" && as_dir=.
3567 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaro89e975f2007-08-22 19:05:21 +00003568 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003569 ac_cv_prog_AR="$ac_prog"
3570 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3571 break 2
3572 fi
3573done
3574done
3575
Guido van Rossum7f43da71994-08-01 12:15:30 +00003576fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003577fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003578AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003579if test -n "$AR"; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00003580 echo "$as_me:$LINENO: result: $AR" >&5
3581echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003582else
Skip Montanaro89e975f2007-08-22 19:05:21 +00003583 echo "$as_me:$LINENO: result: no" >&5
3584echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003585fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003586
Martin v. Löwis11437992002-04-12 09:54:03 +00003587 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003588done
3589test -n "$AR" || AR="ar"
3590
Michael W. Hudson54241132001-12-07 15:38:26 +00003591
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003592
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003593# Extract the first word of "svnversion", so it can be a program name with args.
3594set dummy svnversion; ac_word=$2
Skip Montanaro89e975f2007-08-22 19:05:21 +00003595echo "$as_me:$LINENO: checking for $ac_word" >&5
3596echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003597if test "${ac_cv_prog_SVNVERSION+set}" = set; then
3598 echo $ECHO_N "(cached) $ECHO_C" >&6
3599else
3600 if test -n "$SVNVERSION"; then
3601 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
3602else
3603as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3604for as_dir in $PATH
3605do
3606 IFS=$as_save_IFS
3607 test -z "$as_dir" && as_dir=.
3608 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaro89e975f2007-08-22 19:05:21 +00003609 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003610 ac_cv_prog_SVNVERSION="found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003611 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3612 break 2
3613 fi
3614done
3615done
3616
Martin v. Löwisff600232006-04-03 19:12:32 +00003617 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003618fi
3619fi
3620SVNVERSION=$ac_cv_prog_SVNVERSION
3621if test -n "$SVNVERSION"; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00003622 echo "$as_me:$LINENO: result: $SVNVERSION" >&5
3623echo "${ECHO_T}$SVNVERSION" >&6
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003624else
Skip Montanaro89e975f2007-08-22 19:05:21 +00003625 echo "$as_me:$LINENO: result: no" >&5
3626echo "${ECHO_T}no" >&6
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003627fi
3628
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00003629if test $SVNVERSION = found
3630then
3631 SVNVERSION="svnversion \$(srcdir)"
3632else
3633 SVNVERSION="echo exported"
3634fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00003635
Neil Schemenauera42c8272001-03-31 00:01:55 +00003636case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003637bsdos*|hp*|HP*)
3638 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003639 if test -z "$INSTALL"
3640 then
3641 INSTALL="${srcdir}/install-sh -c"
3642 fi
3643esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003644ac_aux_dir=
Skip Montanaro89e975f2007-08-22 19:05:21 +00003645for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3646 if test -f $ac_dir/install-sh; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003647 ac_aux_dir=$ac_dir
3648 ac_install_sh="$ac_aux_dir/install-sh -c"
3649 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00003650 elif test -f $ac_dir/install.sh; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003651 ac_aux_dir=$ac_dir
3652 ac_install_sh="$ac_aux_dir/install.sh -c"
3653 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00003654 elif test -f $ac_dir/shtool; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003655 ac_aux_dir=$ac_dir
3656 ac_install_sh="$ac_aux_dir/shtool install -c"
3657 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003658 fi
3659done
3660if test -z "$ac_aux_dir"; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00003661 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3662echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003663 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003664fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00003665ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3666ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3667ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003668
3669# Find a good install program. We prefer a C program (faster),
3670# so one script is as good as another. But avoid the broken or
3671# incompatible versions:
3672# SysV /etc/install, /usr/sbin/install
3673# SunOS /usr/etc/install
3674# IRIX /sbin/install
3675# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003676# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003677# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3678# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3679# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00003680# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003681# ./install, which can be erroneously created by make from ./install.sh.
Skip Montanaro89e975f2007-08-22 19:05:21 +00003682echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3683echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003684if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003685if test "${ac_cv_path_install+set}" = set; then
3686 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003687else
Martin v. Löwis11437992002-04-12 09:54:03 +00003688 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3689for as_dir in $PATH
3690do
3691 IFS=$as_save_IFS
3692 test -z "$as_dir" && as_dir=.
3693 # Account for people who put trailing slashes in PATH elements.
3694case $as_dir/ in
3695 ./ | .// | /cC/* | \
3696 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00003697 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00003698 /usr/ucb/* ) ;;
3699 *)
3700 # OSF1 and SCO ODT 3.0 have their own names for install.
3701 # Don't use installbsd from OSF since it installs stuff as root
3702 # by default.
3703 for ac_prog in ginstall scoinst install; do
3704 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaro89e975f2007-08-22 19:05:21 +00003705 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00003706 if test $ac_prog = install &&
3707 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3708 # AIX install. It has an incompatible calling convention.
3709 :
3710 elif test $ac_prog = install &&
3711 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3712 # program-specific install script used by HP pwplus--don't use.
3713 :
3714 else
3715 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3716 break 3
3717 fi
3718 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003719 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003720 done
3721 ;;
3722esac
3723done
3724
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003725
3726fi
3727 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003728 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003729 else
Skip Montanaro89e975f2007-08-22 19:05:21 +00003730 # As a last resort, use the slow shell script. We don't cache a
3731 # path for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003732 # break other packages using the cache if that directory is
Skip Montanaro89e975f2007-08-22 19:05:21 +00003733 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003734 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003735 fi
3736fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00003737echo "$as_me:$LINENO: result: $INSTALL" >&5
3738echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003739
3740# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3741# It thinks the first close brace ends the variable substitution.
3742test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3743
Martin v. Löwis11437992002-04-12 09:54:03 +00003744test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003745
3746test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3747
Michael W. Hudson54241132001-12-07 15:38:26 +00003748
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003749# Not every filesystem supports hard links
3750
3751if test -z "$LN" ; then
3752 case $ac_sys_system in
3753 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003754 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003755 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003756 *) LN=ln;;
3757 esac
3758fi
3759
Fred Drake109d9862001-07-11 06:27:56 +00003760# Check for --with-pydebug
Skip Montanaro89e975f2007-08-22 19:05:21 +00003761echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3762echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003763
Skip Montanaro89e975f2007-08-22 19:05:21 +00003764# Check whether --with-pydebug or --without-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00003765if test "${with_pydebug+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00003766 withval="$with_pydebug"
3767
Fred Drake109d9862001-07-11 06:27:56 +00003768if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003769then
3770
3771cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003772#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003773_ACEOF
3774
Skip Montanaro89e975f2007-08-22 19:05:21 +00003775 echo "$as_me:$LINENO: result: yes" >&5
3776echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003777 Py_DEBUG='true'
Skip Montanaro89e975f2007-08-22 19:05:21 +00003778else echo "$as_me:$LINENO: result: no" >&5
3779echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003780fi
3781else
Skip Montanaro89e975f2007-08-22 19:05:21 +00003782 echo "$as_me:$LINENO: result: no" >&5
3783echo "${ECHO_T}no" >&6
3784fi;
Fred Drake109d9862001-07-11 06:27:56 +00003785
Skip Montanarodecc6a42003-01-01 20:07:49 +00003786# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3787# merged with this chunk of code?
3788
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003789# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003790# ------------------------
3791# (The following bit of code is complicated enough - please keep things
3792# indented properly. Just pretend you're editing Python code. ;-)
3793
3794# There are two parallel sets of case statements below, one that checks to
3795# see if OPT was set and one that does BASECFLAGS setting based upon
3796# compiler and platform. BASECFLAGS tweaks need to be made even if the
3797# user set OPT.
3798
3799# tweak OPT based on compiler and platform, only if the user didn't set
3800# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003801
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003802if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003803then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003804 case $GCC in
3805 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00003806 if test "$CC" != 'g++' ; then
3807 STRICT_PROTO="-Wstrict-prototypes"
3808 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003809 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003810 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003811 if test "$Py_DEBUG" = 'true' ; then
3812 # Optimization messes up debuggers, so turn it off for
3813 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00003814 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00003815 else
Skip Montanaro288a5be2006-04-13 02:00:56 +00003816 OPT="-g -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003817 fi
3818 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003819 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00003820 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003821 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003822 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003823 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003824 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3825 ;;
3826 esac
Fred Drake109d9862001-07-11 06:27:56 +00003827 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003828
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003829 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003830 OPT="-O"
3831 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003832 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003833
3834 # The current (beta) Monterey compiler dies with optimizations
3835 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003836 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003837 Monterey*)
3838 OPT=""
3839 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003840 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003841
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003842fi
3843
Skip Montanarodecc6a42003-01-01 20:07:49 +00003844
3845# tweak BASECFLAGS based on compiler and platform
3846case $GCC in
3847yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003848 # Python violates C99 rules, by casting between incompatible
3849 # pointer types. GCC may generate bad code as a result of that,
3850 # so use -fno-strict-aliasing if supported.
Skip Montanaro89e975f2007-08-22 19:05:21 +00003851 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3852echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003853 ac_save_cc="$CC"
3854 CC="$CC -fno-strict-aliasing"
3855 if test "$cross_compiling" = yes; then
3856 ac_cv_no_strict_aliasing_ok=no
3857else
3858 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003859/* confdefs.h. */
3860_ACEOF
3861cat confdefs.h >>conftest.$ac_ext
3862cat >>conftest.$ac_ext <<_ACEOF
3863/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003864int main() { return 0; }
3865_ACEOF
3866rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00003867if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3868 (eval $ac_link) 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003869 ac_status=$?
3870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3871 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +00003872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3873 (eval $ac_try) 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003874 ac_status=$?
3875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3876 (exit $ac_status); }; }; then
3877 ac_cv_no_strict_aliasing_ok=yes
3878else
3879 echo "$as_me: program exited with status $ac_status" >&5
3880echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003881sed 's/^/| /' conftest.$ac_ext >&5
3882
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003883( exit $ac_status )
3884ac_cv_no_strict_aliasing_ok=no
3885fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00003886rm -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 +00003887fi
3888 CC="$ac_save_cc"
Skip Montanaro89e975f2007-08-22 19:05:21 +00003889 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3890echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003891 if test $ac_cv_no_strict_aliasing_ok = yes
3892 then
3893 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3894 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003895 case $ac_sys_system in
3896 SCO_SV*)
3897 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3898 ;;
3899 # is there any other compiler on Darwin besides gcc?
3900 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003901 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Ronald Oussoren988117f2006-04-29 11:31:35 +00003902 if test "${enable_universalsdk}"; then
3903 BASECFLAGS="-arch ppc -arch i386 -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
3904 fi
3905
Skip Montanarodecc6a42003-01-01 20:07:49 +00003906 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00003907 OSF*)
3908 BASECFLAGS="$BASECFLAGS -mieee"
3909 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003910 esac
3911 ;;
3912
3913*)
3914 case $ac_sys_system in
3915 OpenUNIX*|UnixWare*)
3916 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3917 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003918 OSF*)
3919 BASECFLAGS="$BASECFLAGS -ieee -std"
3920 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003921 SCO_SV*)
3922 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3923 ;;
3924 esac
3925 ;;
3926esac
3927
Fred Drakee1ceaa02001-12-04 20:55:47 +00003928if test "$Py_DEBUG" = 'true'; then
3929 :
3930else
3931 OPT="-DNDEBUG $OPT"
3932fi
3933
Guido van Rossum563e7081996-09-10 18:20:48 +00003934if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003935then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003936 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003937fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003938
Neal Norwitz020c46a2006-01-07 21:39:28 +00003939# disable check for icc since it seems to pass, but generates a warning
3940if test "$CC" = icc
3941then
3942 ac_cv_opt_olimit_ok=no
3943fi
3944
Skip Montanaro89e975f2007-08-22 19:05:21 +00003945echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3946echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003947if test "${ac_cv_opt_olimit_ok+set}" = set; then
3948 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003949else
3950 ac_save_cc="$CC"
3951CC="$CC -OPT:Olimit=0"
3952if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003953 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003954else
Martin v. Löwis11437992002-04-12 09:54:03 +00003955 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003956/* confdefs.h. */
3957_ACEOF
3958cat confdefs.h >>conftest.$ac_ext
3959cat >>conftest.$ac_ext <<_ACEOF
3960/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003961int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003962_ACEOF
3963rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00003964if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3965 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003966 ac_status=$?
3967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3968 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +00003969 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3970 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003971 ac_status=$?
3972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3973 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003974 ac_cv_opt_olimit_ok=yes
3975else
Martin v. Löwis11437992002-04-12 09:54:03 +00003976 echo "$as_me: program exited with status $ac_status" >&5
3977echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003978sed 's/^/| /' conftest.$ac_ext >&5
3979
Martin v. Löwis11437992002-04-12 09:54:03 +00003980( exit $ac_status )
3981ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003982fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00003983rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003984fi
Guido van Rossum91922671997-10-09 20:24:13 +00003985CC="$ac_save_cc"
3986fi
3987
Skip Montanaro89e975f2007-08-22 19:05:21 +00003988echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3989echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003990if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003991 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003992 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3993 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3994 # environment?
3995 Darwin*)
3996 ;;
3997 *)
3998 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3999 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00004000 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004001else
Skip Montanaro89e975f2007-08-22 19:05:21 +00004002 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4003echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004004 if test "${ac_cv_olimit_ok+set}" = set; then
4005 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004006else
4007 ac_save_cc="$CC"
4008 CC="$CC -Olimit 1500"
4009 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00004010 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004011else
Martin v. Löwis11437992002-04-12 09:54:03 +00004012 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004013/* confdefs.h. */
4014_ACEOF
4015cat confdefs.h >>conftest.$ac_ext
4016cat >>conftest.$ac_ext <<_ACEOF
4017/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004018int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004019_ACEOF
4020rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00004021if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4022 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004023 ac_status=$?
4024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4025 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +00004026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4027 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004028 ac_status=$?
4029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4030 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004031 ac_cv_olimit_ok=yes
4032else
Martin v. Löwis11437992002-04-12 09:54:03 +00004033 echo "$as_me: program exited with status $ac_status" >&5
4034echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004035sed 's/^/| /' conftest.$ac_ext >&5
4036
Martin v. Löwis11437992002-04-12 09:54:03 +00004037( exit $ac_status )
4038ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00004039fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00004040rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004041fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004042 CC="$ac_save_cc"
4043fi
4044
Skip Montanaro89e975f2007-08-22 19:05:21 +00004045 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
4046echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004047 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00004048 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00004049 fi
4050fi
4051
Martin v. Löwisaac13162006-10-19 10:58:46 +00004052# Check whether GCC supports PyArg_ParseTuple format
4053if test "$GCC" = "yes"
4054then
Skip Montanaro89e975f2007-08-22 19:05:21 +00004055 echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
4056echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6
Martin v. Löwisaac13162006-10-19 10:58:46 +00004057 save_CFLAGS=$CFLAGS
4058 CFLAGS="$CFLAGS -Werror"
4059 cat >conftest.$ac_ext <<_ACEOF
4060/* confdefs.h. */
4061_ACEOF
4062cat confdefs.h >>conftest.$ac_ext
4063cat >>conftest.$ac_ext <<_ACEOF
4064/* end confdefs.h. */
4065
4066 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
4067
4068int
4069main ()
4070{
4071
4072 ;
4073 return 0;
4074}
4075_ACEOF
4076rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00004077if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4078 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00004079 ac_status=$?
4080 grep -v '^ *+' conftest.er1 >conftest.err
4081 rm -f conftest.er1
4082 cat conftest.err >&5
4083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00004084 (exit $ac_status); } &&
4085 { ac_try='test -z "$ac_c_werror_flag"
4086 || test ! -s conftest.err'
4087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4088 (eval $ac_try) 2>&5
4089 ac_status=$?
4090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4091 (exit $ac_status); }; } &&
4092 { ac_try='test -s conftest.$ac_objext'
4093 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4094 (eval $ac_try) 2>&5
4095 ac_status=$?
4096 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4097 (exit $ac_status); }; }; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00004098
4099cat >>confdefs.h <<\_ACEOF
4100#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
4101_ACEOF
4102
Skip Montanaro89e975f2007-08-22 19:05:21 +00004103 echo "$as_me:$LINENO: result: yes" >&5
4104echo "${ECHO_T}yes" >&6
Martin v. Löwisaac13162006-10-19 10:58:46 +00004105else
4106 echo "$as_me: failed program was:" >&5
4107sed 's/^/| /' conftest.$ac_ext >&5
4108
Skip Montanaro89e975f2007-08-22 19:05:21 +00004109echo "$as_me:$LINENO: result: no" >&5
4110echo "${ECHO_T}no" >&6
Martin v. Löwisaac13162006-10-19 10:58:46 +00004111
4112fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00004113rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00004114 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00004115fi
4116
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004117# On some compilers, pthreads are available without further options
4118# (e.g. MacOS X). On some of these systems, the compiler will not
4119# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
4120# So we have to see first whether pthreads are available without
4121# options before we can check whether -Kpthread improves anything.
Skip Montanaro89e975f2007-08-22 19:05:21 +00004122echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
4123echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004124if test "${ac_cv_pthread_is_default+set}" = set; then
4125 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00004126else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004127 if test "$cross_compiling" = yes; then
4128 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004129else
Martin v. Löwis11437992002-04-12 09:54:03 +00004130 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004131/* confdefs.h. */
4132_ACEOF
4133cat confdefs.h >>conftest.$ac_ext
4134cat >>conftest.$ac_ext <<_ACEOF
4135/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004136
Martin v. Löwis130fb172001-07-19 11:00:41 +00004137#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004138
4139void* routine(void* p){return NULL;}
4140
4141int main(){
4142 pthread_t p;
4143 if(pthread_create(&p,NULL,routine,NULL)!=0)
4144 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004145 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00004146 return 0;
4147}
4148
Martin v. Löwis11437992002-04-12 09:54:03 +00004149_ACEOF
4150rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00004151if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4152 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004153 ac_status=$?
4154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4155 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +00004156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4157 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004158 ac_status=$?
4159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4160 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004161
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004162 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004163 ac_cv_kthread=no
4164 ac_cv_pthread=no
4165
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004166else
Martin v. Löwis11437992002-04-12 09:54:03 +00004167 echo "$as_me: program exited with status $ac_status" >&5
4168echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004169sed 's/^/| /' conftest.$ac_ext >&5
4170
Martin v. Löwis11437992002-04-12 09:54:03 +00004171( exit $ac_status )
4172ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004173fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00004174rm -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 +00004175fi
4176
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004177fi
4178
Skip Montanaro89e975f2007-08-22 19:05:21 +00004179echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4180echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004181
Michael W. Hudson54241132001-12-07 15:38:26 +00004182
Martin v. Löwis11437992002-04-12 09:54:03 +00004183if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004184then
4185 ac_cv_kpthread=no
4186else
4187# -Kpthread, if available, provides the right #defines
4188# and linker options to make pthread_create available
4189# Some compilers won't report that they do not support -Kpthread,
4190# so we need to run a program to see whether it really made the
4191# function available.
Skip Montanaro89e975f2007-08-22 19:05:21 +00004192echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4193echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004194if test "${ac_cv_kpthread+set}" = set; then
4195 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004196else
4197 ac_save_cc="$CC"
4198CC="$CC -Kpthread"
4199if test "$cross_compiling" = yes; then
4200 ac_cv_kpthread=no
4201else
Martin v. Löwis11437992002-04-12 09:54:03 +00004202 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004203/* confdefs.h. */
4204_ACEOF
4205cat confdefs.h >>conftest.$ac_ext
4206cat >>conftest.$ac_ext <<_ACEOF
4207/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004208
4209#include <pthread.h>
4210
4211void* routine(void* p){return NULL;}
4212
4213int main(){
4214 pthread_t p;
4215 if(pthread_create(&p,NULL,routine,NULL)!=0)
4216 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004217 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004218 return 0;
4219}
4220
Martin v. Löwis11437992002-04-12 09:54:03 +00004221_ACEOF
4222rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00004223if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4224 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004225 ac_status=$?
4226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4227 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +00004228 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4229 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004230 ac_status=$?
4231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4232 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004233 ac_cv_kpthread=yes
4234else
Martin v. Löwis11437992002-04-12 09:54:03 +00004235 echo "$as_me: program exited with status $ac_status" >&5
4236echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004237sed 's/^/| /' conftest.$ac_ext >&5
4238
Martin v. Löwis11437992002-04-12 09:54:03 +00004239( exit $ac_status )
4240ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004241fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00004242rm -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 +00004243fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004244CC="$ac_save_cc"
4245fi
4246
Skip Montanaro89e975f2007-08-22 19:05:21 +00004247echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4248echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004249fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004250
Skip Montanarod8d39a02003-07-10 20:44:10 +00004251if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004252then
4253# -Kthread, if available, provides the right #defines
4254# and linker options to make pthread_create available
4255# Some compilers won't report that they do not support -Kthread,
4256# so we need to run a program to see whether it really made the
4257# function available.
Skip Montanaro89e975f2007-08-22 19:05:21 +00004258echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4259echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004260if test "${ac_cv_kthread+set}" = set; then
4261 echo $ECHO_N "(cached) $ECHO_C" >&6
4262else
4263 ac_save_cc="$CC"
4264CC="$CC -Kthread"
4265if test "$cross_compiling" = yes; then
4266 ac_cv_kthread=no
4267else
4268 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004269/* confdefs.h. */
4270_ACEOF
4271cat confdefs.h >>conftest.$ac_ext
4272cat >>conftest.$ac_ext <<_ACEOF
4273/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004274
4275#include <pthread.h>
4276
4277void* routine(void* p){return NULL;}
4278
4279int main(){
4280 pthread_t p;
4281 if(pthread_create(&p,NULL,routine,NULL)!=0)
4282 return 1;
4283 (void)pthread_detach(p);
4284 return 0;
4285}
4286
4287_ACEOF
4288rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00004289if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4290 (eval $ac_link) 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004291 ac_status=$?
4292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4293 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +00004294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4295 (eval $ac_try) 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004296 ac_status=$?
4297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4298 (exit $ac_status); }; }; then
4299 ac_cv_kthread=yes
4300else
4301 echo "$as_me: program exited with status $ac_status" >&5
4302echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004303sed 's/^/| /' conftest.$ac_ext >&5
4304
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004305( exit $ac_status )
4306ac_cv_kthread=no
4307fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00004308rm -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 +00004309fi
4310CC="$ac_save_cc"
4311fi
4312
Skip Montanaro89e975f2007-08-22 19:05:21 +00004313echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4314echo "${ECHO_T}$ac_cv_kthread" >&6
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004315fi
4316
Skip Montanarod8d39a02003-07-10 20:44:10 +00004317if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004318then
4319# -pthread, if available, provides the right #defines
4320# and linker options to make pthread_create available
4321# Some compilers won't report that they do not support -pthread,
4322# so we need to run a program to see whether it really made the
4323# function available.
Skip Montanaro89e975f2007-08-22 19:05:21 +00004324echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4325echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004326if test "${ac_cv_thread+set}" = set; then
4327 echo $ECHO_N "(cached) $ECHO_C" >&6
4328else
4329 ac_save_cc="$CC"
4330CC="$CC -pthread"
4331if test "$cross_compiling" = yes; then
4332 ac_cv_pthread=no
4333else
4334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004335/* confdefs.h. */
4336_ACEOF
4337cat confdefs.h >>conftest.$ac_ext
4338cat >>conftest.$ac_ext <<_ACEOF
4339/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004340
4341#include <pthread.h>
4342
4343void* routine(void* p){return NULL;}
4344
4345int main(){
4346 pthread_t p;
4347 if(pthread_create(&p,NULL,routine,NULL)!=0)
4348 return 1;
4349 (void)pthread_detach(p);
4350 return 0;
4351}
4352
4353_ACEOF
4354rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00004355if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4356 (eval $ac_link) 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004357 ac_status=$?
4358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4359 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +00004360 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4361 (eval $ac_try) 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004362 ac_status=$?
4363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4364 (exit $ac_status); }; }; then
4365 ac_cv_pthread=yes
4366else
4367 echo "$as_me: program exited with status $ac_status" >&5
4368echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004369sed 's/^/| /' conftest.$ac_ext >&5
4370
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004371( exit $ac_status )
4372ac_cv_pthread=no
4373fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00004374rm -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 +00004375fi
4376CC="$ac_save_cc"
4377fi
4378
Skip Montanaro89e975f2007-08-22 19:05:21 +00004379echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4380echo "${ECHO_T}$ac_cv_pthread" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004381fi
4382
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004383# If we have set a CC compiler flag for thread support then
4384# check if it works for CXX, too.
4385ac_cv_cxx_thread=no
4386if test ! -z "$CXX"
4387then
Skip Montanaro89e975f2007-08-22 19:05:21 +00004388echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4389echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004390ac_save_cxx="$CXX"
4391
4392if test "$ac_cv_kpthread" = "yes"
4393then
4394 CXX="$CXX -Kpthread"
4395 ac_cv_cxx_thread=yes
4396elif test "$ac_cv_kthread" = "yes"
4397then
4398 CXX="$CXX -Kthread"
4399 ac_cv_cxx_thread=yes
4400elif test "$ac_cv_pthread" = "yes"
4401then
4402 CXX="$CXX -pthread"
4403 ac_cv_cxx_thread=yes
4404fi
4405
4406if test $ac_cv_cxx_thread = yes
4407then
4408 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4409 $CXX -c conftest.$ac_ext 2>&5
4410 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4411 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4412 then
4413 ac_cv_cxx_thread=yes
4414 else
4415 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004416 fi
4417 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004418fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00004419echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4420echo "${ECHO_T}$ac_cv_cxx_thread" >&6
Brett Cannonc601e0f2004-11-07 01:24:12 +00004421fi
4422CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004423
Michael W. Hudson54241132001-12-07 15:38:26 +00004424
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004425# checks for header files
Skip Montanaro89e975f2007-08-22 19:05:21 +00004426echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4427echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004428if test "${ac_cv_header_stdc+set}" = set; then
4429 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004430else
Martin v. Löwis11437992002-04-12 09:54:03 +00004431 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004432/* confdefs.h. */
4433_ACEOF
4434cat confdefs.h >>conftest.$ac_ext
4435cat >>conftest.$ac_ext <<_ACEOF
4436/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004437#include <stdlib.h>
4438#include <stdarg.h>
4439#include <string.h>
4440#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004441
Skip Montanaro6dead952003-09-25 14:50:04 +00004442int
4443main ()
4444{
4445
4446 ;
4447 return 0;
4448}
Martin v. Löwis11437992002-04-12 09:54:03 +00004449_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004450rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00004451if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4452 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004453 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004454 grep -v '^ *+' conftest.er1 >conftest.err
4455 rm -f conftest.er1
4456 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00004458 (exit $ac_status); } &&
4459 { ac_try='test -z "$ac_c_werror_flag"
4460 || test ! -s conftest.err'
4461 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4462 (eval $ac_try) 2>&5
4463 ac_status=$?
4464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4465 (exit $ac_status); }; } &&
4466 { ac_try='test -s conftest.$ac_objext'
4467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4468 (eval $ac_try) 2>&5
4469 ac_status=$?
4470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4471 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004472 ac_cv_header_stdc=yes
4473else
Martin v. Löwis11437992002-04-12 09:54:03 +00004474 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004475sed 's/^/| /' conftest.$ac_ext >&5
4476
Skip Montanaro89e975f2007-08-22 19:05:21 +00004477ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004478fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00004479rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004480
4481if test $ac_cv_header_stdc = yes; then
4482 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004483 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004484/* confdefs.h. */
4485_ACEOF
4486cat confdefs.h >>conftest.$ac_ext
4487cat >>conftest.$ac_ext <<_ACEOF
4488/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004489#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004490
4491_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004493 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004494 :
4495else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004496 ac_cv_header_stdc=no
4497fi
4498rm -f conftest*
4499
4500fi
4501
4502if test $ac_cv_header_stdc = yes; then
4503 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004504 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004505/* confdefs.h. */
4506_ACEOF
4507cat confdefs.h >>conftest.$ac_ext
4508cat >>conftest.$ac_ext <<_ACEOF
4509/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004510#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004511
4512_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004513if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004514 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004515 :
4516else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004517 ac_cv_header_stdc=no
4518fi
4519rm -f conftest*
4520
4521fi
4522
4523if test $ac_cv_header_stdc = yes; then
4524 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004525 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004526 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004527else
Martin v. Löwis11437992002-04-12 09:54:03 +00004528 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004529/* confdefs.h. */
4530_ACEOF
4531cat confdefs.h >>conftest.$ac_ext
4532cat >>conftest.$ac_ext <<_ACEOF
4533/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004534#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004535#if ((' ' & 0x0FF) == 0x020)
4536# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4537# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4538#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004539# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004540 (('a' <= (c) && (c) <= 'i') \
4541 || ('j' <= (c) && (c) <= 'r') \
4542 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00004543# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4544#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004545
Martin v. Löwis11437992002-04-12 09:54:03 +00004546#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4547int
4548main ()
4549{
4550 int i;
4551 for (i = 0; i < 256; i++)
4552 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00004553 || toupper (i) != TOUPPER (i))
Skip Montanaro89e975f2007-08-22 19:05:21 +00004554 exit(2);
4555 exit (0);
Martin v. Löwis11437992002-04-12 09:54:03 +00004556}
4557_ACEOF
4558rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00004559if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4560 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004561 ac_status=$?
4562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4563 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +00004564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4565 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004566 ac_status=$?
4567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4568 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004569 :
4570else
Martin v. Löwis11437992002-04-12 09:54:03 +00004571 echo "$as_me: program exited with status $ac_status" >&5
4572echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004573sed 's/^/| /' conftest.$ac_ext >&5
4574
Martin v. Löwis11437992002-04-12 09:54:03 +00004575( exit $ac_status )
4576ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004577fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00004578rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004579fi
4580fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00004581fi
4582echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4583echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004584if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004585
4586cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004587#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004588_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004589
4590fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004591
Skip Montanarob9820a32004-01-17 00:16:12 +00004592# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004603 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00004604do
4605as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Skip Montanaro89e975f2007-08-22 19:05:21 +00004606echo "$as_me:$LINENO: checking for $ac_header" >&5
4607echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4608if eval "test \"\${$as_ac_Header+set}\" = set"; then
Skip Montanarob9820a32004-01-17 00:16:12 +00004609 echo $ECHO_N "(cached) $ECHO_C" >&6
4610else
4611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00004612/* confdefs.h. */
4613_ACEOF
4614cat confdefs.h >>conftest.$ac_ext
4615cat >>conftest.$ac_ext <<_ACEOF
4616/* end confdefs.h. */
4617$ac_includes_default
4618
4619#include <$ac_header>
4620_ACEOF
4621rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00004622if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4623 (eval $ac_compile) 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00004624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004625 grep -v '^ *+' conftest.er1 >conftest.err
4626 rm -f conftest.er1
4627 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00004628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00004629 (exit $ac_status); } &&
4630 { ac_try='test -z "$ac_c_werror_flag"
4631 || test ! -s conftest.err'
4632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4633 (eval $ac_try) 2>&5
4634 ac_status=$?
4635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4636 (exit $ac_status); }; } &&
4637 { ac_try='test -s conftest.$ac_objext'
4638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4639 (eval $ac_try) 2>&5
4640 ac_status=$?
4641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4642 (exit $ac_status); }; }; then
Skip Montanarob9820a32004-01-17 00:16:12 +00004643 eval "$as_ac_Header=yes"
4644else
4645 echo "$as_me: failed program was:" >&5
4646sed 's/^/| /' conftest.$ac_ext >&5
4647
Skip Montanaro89e975f2007-08-22 19:05:21 +00004648eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00004649fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00004650rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00004651fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00004652echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4653echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Skip Montanarob9820a32004-01-17 00:16:12 +00004654if test `eval echo '${'$as_ac_Header'}'` = yes; then
4655 cat >>confdefs.h <<_ACEOF
4656#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4657_ACEOF
4658
4659fi
4660
4661done
4662
4663
Martin v. Löwis11437992002-04-12 09:54:03 +00004664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
Anthony Baxter8a560de2004-10-13 15:30:56 +00004700
Martin v. Löwisc3001752005-01-23 09:27:24 +00004701
Martin v. Löwis11017b12006-01-14 18:12:57 +00004702
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00004703
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00004704
4705
4706
4707
4708
4709
4710
4711
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00004712
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00004713for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
4714fcntl.h grp.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00004715io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
4716shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004717unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00004718sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
4719sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00004720sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
4721sys/time.h \
4722sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwis0347a9a2006-10-27 07:06:52 +00004723sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004724bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004725do
Martin v. Löwis11437992002-04-12 09:54:03 +00004726as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Skip Montanaro89e975f2007-08-22 19:05:21 +00004727if eval "test \"\${$as_ac_Header+set}\" = set"; then
4728 echo "$as_me:$LINENO: checking for $ac_header" >&5
4729echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4730if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004731 echo $ECHO_N "(cached) $ECHO_C" >&6
4732fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00004733echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4734echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004735else
Martin v. Löwis11437992002-04-12 09:54:03 +00004736 # Is the header compilable?
Skip Montanaro89e975f2007-08-22 19:05:21 +00004737echo "$as_me:$LINENO: checking $ac_header usability" >&5
4738echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004739cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004740/* confdefs.h. */
4741_ACEOF
4742cat confdefs.h >>conftest.$ac_ext
4743cat >>conftest.$ac_ext <<_ACEOF
4744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004745$ac_includes_default
4746#include <$ac_header>
4747_ACEOF
4748rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00004749if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4750 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004751 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004752 grep -v '^ *+' conftest.er1 >conftest.err
4753 rm -f conftest.er1
4754 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00004756 (exit $ac_status); } &&
4757 { ac_try='test -z "$ac_c_werror_flag"
4758 || test ! -s conftest.err'
4759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4760 (eval $ac_try) 2>&5
4761 ac_status=$?
4762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4763 (exit $ac_status); }; } &&
4764 { ac_try='test -s conftest.$ac_objext'
4765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4766 (eval $ac_try) 2>&5
4767 ac_status=$?
4768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4769 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004770 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004771else
Martin v. Löwis11437992002-04-12 09:54:03 +00004772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004773sed 's/^/| /' conftest.$ac_ext >&5
4774
Skip Montanaro89e975f2007-08-22 19:05:21 +00004775ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004776fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00004777rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
4778echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4779echo "${ECHO_T}$ac_header_compiler" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004780
4781# Is the header present?
Skip Montanaro89e975f2007-08-22 19:05:21 +00004782echo "$as_me:$LINENO: checking $ac_header presence" >&5
4783echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004784cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004785/* confdefs.h. */
4786_ACEOF
4787cat confdefs.h >>conftest.$ac_ext
4788cat >>conftest.$ac_ext <<_ACEOF
4789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004790#include <$ac_header>
4791_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +00004792if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4793 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004794 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004795 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004796 rm -f conftest.er1
4797 cat conftest.err >&5
4798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00004799 (exit $ac_status); } >/dev/null; then
4800 if test -s conftest.err; then
4801 ac_cpp_err=$ac_c_preproc_warn_flag
4802 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
4803 else
4804 ac_cpp_err=
4805 fi
4806else
4807 ac_cpp_err=yes
4808fi
4809if test -z "$ac_cpp_err"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004810 ac_header_preproc=yes
4811else
4812 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004813sed 's/^/| /' conftest.$ac_ext >&5
4814
Martin v. Löwis11437992002-04-12 09:54:03 +00004815 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004816fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004817rm -f conftest.err conftest.$ac_ext
Skip Montanaro89e975f2007-08-22 19:05:21 +00004818echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4819echo "${ECHO_T}$ac_header_preproc" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004820
4821# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004822case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4823 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00004824 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4825echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004826 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4827echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4828 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004829 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00004830 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004831 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4832echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004833 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4834echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4835 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4836echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4837 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4838echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004839 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4840echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004841 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4842echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +00004843 (
4844 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00004845## ------------------------------------------------ ##
4846## Report this to http://www.python.org/python-bugs ##
4847## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00004848_ASBOX
Skip Montanaro89e975f2007-08-22 19:05:21 +00004849 ) |
4850 sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00004851 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004852esac
Skip Montanaro89e975f2007-08-22 19:05:21 +00004853echo "$as_me:$LINENO: checking for $ac_header" >&5
4854echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4855if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004856 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004857else
Skip Montanarof0d5f792004-08-15 14:08:23 +00004858 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004859fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00004860echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4861echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004862
4863fi
4864if test `eval echo '${'$as_ac_Header'}'` = yes; then
4865 cat >>confdefs.h <<_ACEOF
4866#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4867_ACEOF
4868
4869fi
4870
Guido van Rossum627b2d71993-12-24 10:39:16 +00004871done
4872
Martin v. Löwis11437992002-04-12 09:54:03 +00004873
4874
4875
4876
4877
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004878ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004879for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4880 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
Skip Montanaro89e975f2007-08-22 19:05:21 +00004881echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4882echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4883if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004884 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004885else
Martin v. Löwis11437992002-04-12 09:54:03 +00004886 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004887/* confdefs.h. */
4888_ACEOF
4889cat confdefs.h >>conftest.$ac_ext
4890cat >>conftest.$ac_ext <<_ACEOF
4891/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004892#include <sys/types.h>
4893#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004894
Martin v. Löwis11437992002-04-12 09:54:03 +00004895int
4896main ()
4897{
4898if ((DIR *) 0)
4899return 0;
4900 ;
4901 return 0;
4902}
4903_ACEOF
4904rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00004905if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
4906 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004907 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004908 grep -v '^ *+' conftest.er1 >conftest.err
4909 rm -f conftest.er1
4910 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00004912 (exit $ac_status); } &&
4913 { ac_try='test -z "$ac_c_werror_flag"
4914 || test ! -s conftest.err'
4915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4916 (eval $ac_try) 2>&5
4917 ac_status=$?
4918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4919 (exit $ac_status); }; } &&
4920 { ac_try='test -s conftest.$ac_objext'
4921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4922 (eval $ac_try) 2>&5
4923 ac_status=$?
4924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4925 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004926 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004927else
Martin v. Löwis11437992002-04-12 09:54:03 +00004928 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004929sed 's/^/| /' conftest.$ac_ext >&5
4930
Skip Montanaro89e975f2007-08-22 19:05:21 +00004931eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004932fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00004933rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004934fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00004935echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4936echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004937if test `eval echo '${'$as_ac_Header'}'` = yes; then
4938 cat >>confdefs.h <<_ACEOF
4939#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4940_ACEOF
4941
4942ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004943fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004944
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004945done
4946# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4947if test $ac_header_dirent = dirent.h; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00004948 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4949echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004950if test "${ac_cv_search_opendir+set}" = set; then
4951 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004952else
Martin v. Löwis11437992002-04-12 09:54:03 +00004953 ac_func_search_save_LIBS=$LIBS
Skip Montanaro89e975f2007-08-22 19:05:21 +00004954ac_cv_search_opendir=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004955cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004956/* confdefs.h. */
4957_ACEOF
4958cat confdefs.h >>conftest.$ac_ext
4959cat >>conftest.$ac_ext <<_ACEOF
4960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004961
Skip Montanaro89e975f2007-08-22 19:05:21 +00004962/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004963#ifdef __cplusplus
4964extern "C"
4965#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +00004966/* We use char because int might match the return type of a gcc2
4967 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004968char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004969int
4970main ()
4971{
Skip Montanaro89e975f2007-08-22 19:05:21 +00004972opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004973 ;
4974 return 0;
4975}
4976_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +00004977rm -f conftest.$ac_objext conftest$ac_exeext
4978if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4979 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004981 grep -v '^ *+' conftest.er1 >conftest.err
4982 rm -f conftest.er1
4983 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00004985 (exit $ac_status); } &&
4986 { ac_try='test -z "$ac_c_werror_flag"
4987 || test ! -s conftest.err'
4988 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4989 (eval $ac_try) 2>&5
4990 ac_status=$?
4991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4992 (exit $ac_status); }; } &&
4993 { ac_try='test -s conftest$ac_exeext'
4994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4995 (eval $ac_try) 2>&5
4996 ac_status=$?
4997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4998 (exit $ac_status); }; }; then
4999 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005000else
Martin v. Löwis11437992002-04-12 09:54:03 +00005001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005002sed 's/^/| /' conftest.$ac_ext >&5
5003
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005004fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005005rm -f conftest.err conftest.$ac_objext \
5006 conftest$ac_exeext conftest.$ac_ext
5007if test "$ac_cv_search_opendir" = no; then
5008 for ac_lib in dir; do
5009 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5010 cat >conftest.$ac_ext <<_ACEOF
5011/* confdefs.h. */
5012_ACEOF
5013cat confdefs.h >>conftest.$ac_ext
5014cat >>conftest.$ac_ext <<_ACEOF
5015/* end confdefs.h. */
Brett Cannon19fab762007-06-02 03:02:29 +00005016
Skip Montanaro89e975f2007-08-22 19:05:21 +00005017/* Override any gcc2 internal prototype to avoid an error. */
5018#ifdef __cplusplus
5019extern "C"
5020#endif
5021/* We use char because int might match the return type of a gcc2
5022 builtin and then its argument prototype would still apply. */
5023char opendir ();
5024int
5025main ()
5026{
5027opendir ();
5028 ;
5029 return 0;
5030}
5031_ACEOF
5032rm -f conftest.$ac_objext conftest$ac_exeext
5033if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5034 (eval $ac_link) 2>conftest.er1
5035 ac_status=$?
5036 grep -v '^ *+' conftest.er1 >conftest.err
5037 rm -f conftest.er1
5038 cat conftest.err >&5
5039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5040 (exit $ac_status); } &&
5041 { ac_try='test -z "$ac_c_werror_flag"
5042 || test ! -s conftest.err'
5043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5044 (eval $ac_try) 2>&5
5045 ac_status=$?
5046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5047 (exit $ac_status); }; } &&
5048 { ac_try='test -s conftest$ac_exeext'
5049 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5050 (eval $ac_try) 2>&5
5051 ac_status=$?
5052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5053 (exit $ac_status); }; }; then
5054 ac_cv_search_opendir="-l$ac_lib"
5055break
Brett Cannon19fab762007-06-02 03:02:29 +00005056else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005057 echo "$as_me: failed program was:" >&5
5058sed 's/^/| /' conftest.$ac_ext >&5
5059
Brett Cannon19fab762007-06-02 03:02:29 +00005060fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005061rm -f conftest.err conftest.$ac_objext \
5062 conftest$ac_exeext conftest.$ac_ext
5063 done
5064fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005065LIBS=$ac_func_search_save_LIBS
5066fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005067echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5068echo "${ECHO_T}$ac_cv_search_opendir" >&6
5069if test "$ac_cv_search_opendir" != no; then
5070 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00005071
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005072fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005073
Michael W. Hudson54241132001-12-07 15:38:26 +00005074else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005075 echo "$as_me:$LINENO: checking for library containing opendir" >&5
5076echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005077if test "${ac_cv_search_opendir+set}" = set; then
5078 echo $ECHO_N "(cached) $ECHO_C" >&6
5079else
5080 ac_func_search_save_LIBS=$LIBS
Skip Montanaro89e975f2007-08-22 19:05:21 +00005081ac_cv_search_opendir=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005082cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005083/* confdefs.h. */
5084_ACEOF
5085cat confdefs.h >>conftest.$ac_ext
5086cat >>conftest.$ac_ext <<_ACEOF
5087/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005088
Skip Montanaro89e975f2007-08-22 19:05:21 +00005089/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005090#ifdef __cplusplus
5091extern "C"
5092#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +00005093/* We use char because int might match the return type of a gcc2
5094 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005095char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005096int
5097main ()
5098{
Skip Montanaro89e975f2007-08-22 19:05:21 +00005099opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005100 ;
5101 return 0;
5102}
5103_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +00005104rm -f conftest.$ac_objext conftest$ac_exeext
5105if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5106 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005107 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005108 grep -v '^ *+' conftest.er1 >conftest.err
5109 rm -f conftest.er1
5110 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005112 (exit $ac_status); } &&
5113 { ac_try='test -z "$ac_c_werror_flag"
5114 || test ! -s conftest.err'
5115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5116 (eval $ac_try) 2>&5
5117 ac_status=$?
5118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5119 (exit $ac_status); }; } &&
5120 { ac_try='test -s conftest$ac_exeext'
5121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5122 (eval $ac_try) 2>&5
5123 ac_status=$?
5124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5125 (exit $ac_status); }; }; then
5126 ac_cv_search_opendir="none required"
Martin v. Löwis11437992002-04-12 09:54:03 +00005127else
5128 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005129sed 's/^/| /' conftest.$ac_ext >&5
5130
Martin v. Löwis11437992002-04-12 09:54:03 +00005131fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005132rm -f conftest.err conftest.$ac_objext \
5133 conftest$ac_exeext conftest.$ac_ext
5134if test "$ac_cv_search_opendir" = no; then
5135 for ac_lib in x; do
5136 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
5137 cat >conftest.$ac_ext <<_ACEOF
5138/* confdefs.h. */
5139_ACEOF
5140cat confdefs.h >>conftest.$ac_ext
5141cat >>conftest.$ac_ext <<_ACEOF
5142/* end confdefs.h. */
Brett Cannon19fab762007-06-02 03:02:29 +00005143
Skip Montanaro89e975f2007-08-22 19:05:21 +00005144/* Override any gcc2 internal prototype to avoid an error. */
5145#ifdef __cplusplus
5146extern "C"
5147#endif
5148/* We use char because int might match the return type of a gcc2
5149 builtin and then its argument prototype would still apply. */
5150char opendir ();
5151int
5152main ()
5153{
5154opendir ();
5155 ;
5156 return 0;
5157}
5158_ACEOF
5159rm -f conftest.$ac_objext conftest$ac_exeext
5160if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5161 (eval $ac_link) 2>conftest.er1
5162 ac_status=$?
5163 grep -v '^ *+' conftest.er1 >conftest.err
5164 rm -f conftest.er1
5165 cat conftest.err >&5
5166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5167 (exit $ac_status); } &&
5168 { ac_try='test -z "$ac_c_werror_flag"
5169 || test ! -s conftest.err'
5170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5171 (eval $ac_try) 2>&5
5172 ac_status=$?
5173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5174 (exit $ac_status); }; } &&
5175 { ac_try='test -s conftest$ac_exeext'
5176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5177 (eval $ac_try) 2>&5
5178 ac_status=$?
5179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5180 (exit $ac_status); }; }; then
5181 ac_cv_search_opendir="-l$ac_lib"
5182break
Brett Cannon19fab762007-06-02 03:02:29 +00005183else
Skip Montanaro89e975f2007-08-22 19:05:21 +00005184 echo "$as_me: failed program was:" >&5
5185sed 's/^/| /' conftest.$ac_ext >&5
5186
Brett Cannon19fab762007-06-02 03:02:29 +00005187fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005188rm -f conftest.err conftest.$ac_objext \
5189 conftest$ac_exeext conftest.$ac_ext
5190 done
5191fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005192LIBS=$ac_func_search_save_LIBS
5193fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005194echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5195echo "${ECHO_T}$ac_cv_search_opendir" >&6
5196if test "$ac_cv_search_opendir" != no; then
5197 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00005198
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005199fi
5200
5201fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005202
Skip Montanaro89e975f2007-08-22 19:05:21 +00005203echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5204echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005205if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5206 echo $ECHO_N "(cached) $ECHO_C" >&6
5207else
5208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005209/* confdefs.h. */
5210_ACEOF
5211cat confdefs.h >>conftest.$ac_ext
5212cat >>conftest.$ac_ext <<_ACEOF
5213/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005214#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005215int
5216main ()
5217{
5218return makedev(0, 0);
5219 ;
5220 return 0;
5221}
5222_ACEOF
5223rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00005224if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5225 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005227 grep -v '^ *+' conftest.er1 >conftest.err
5228 rm -f conftest.er1
5229 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005231 (exit $ac_status); } &&
5232 { ac_try='test -z "$ac_c_werror_flag"
5233 || test ! -s conftest.err'
5234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5235 (eval $ac_try) 2>&5
5236 ac_status=$?
5237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5238 (exit $ac_status); }; } &&
5239 { ac_try='test -s conftest$ac_exeext'
5240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5241 (eval $ac_try) 2>&5
5242 ac_status=$?
5243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5244 (exit $ac_status); }; }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005245 ac_cv_header_sys_types_h_makedev=yes
5246else
5247 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005248sed 's/^/| /' conftest.$ac_ext >&5
5249
Skip Montanaro89e975f2007-08-22 19:05:21 +00005250ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005251fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005252rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005253 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005254
5255fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005256echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5257echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005258
5259if test $ac_cv_header_sys_types_h_makedev = no; then
5260if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00005261 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5262echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005263if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5264 echo $ECHO_N "(cached) $ECHO_C" >&6
5265fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005266echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5267echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005268else
5269 # Is the header compilable?
Skip Montanaro89e975f2007-08-22 19:05:21 +00005270echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5271echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005272cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005273/* confdefs.h. */
5274_ACEOF
5275cat confdefs.h >>conftest.$ac_ext
5276cat >>conftest.$ac_ext <<_ACEOF
5277/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005278$ac_includes_default
5279#include <sys/mkdev.h>
5280_ACEOF
5281rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00005282if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5283 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005284 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005285 grep -v '^ *+' conftest.er1 >conftest.err
5286 rm -f conftest.er1
5287 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005289 (exit $ac_status); } &&
5290 { ac_try='test -z "$ac_c_werror_flag"
5291 || test ! -s conftest.err'
5292 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5293 (eval $ac_try) 2>&5
5294 ac_status=$?
5295 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5296 (exit $ac_status); }; } &&
5297 { ac_try='test -s conftest.$ac_objext'
5298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5299 (eval $ac_try) 2>&5
5300 ac_status=$?
5301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5302 (exit $ac_status); }; }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005303 ac_header_compiler=yes
5304else
5305 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005306sed 's/^/| /' conftest.$ac_ext >&5
5307
Skip Montanaro89e975f2007-08-22 19:05:21 +00005308ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005309fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005310rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5311echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5312echo "${ECHO_T}$ac_header_compiler" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005313
5314# Is the header present?
Skip Montanaro89e975f2007-08-22 19:05:21 +00005315echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5316echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005317cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005318/* confdefs.h. */
5319_ACEOF
5320cat confdefs.h >>conftest.$ac_ext
5321cat >>conftest.$ac_ext <<_ACEOF
5322/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005323#include <sys/mkdev.h>
5324_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +00005325if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5326 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005327 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005328 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005329 rm -f conftest.er1
5330 cat conftest.err >&5
5331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005332 (exit $ac_status); } >/dev/null; then
5333 if test -s conftest.err; then
5334 ac_cpp_err=$ac_c_preproc_warn_flag
5335 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5336 else
5337 ac_cpp_err=
5338 fi
5339else
5340 ac_cpp_err=yes
5341fi
5342if test -z "$ac_cpp_err"; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005343 ac_header_preproc=yes
5344else
5345 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005346sed 's/^/| /' conftest.$ac_ext >&5
5347
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005348 ac_header_preproc=no
5349fi
5350rm -f conftest.err conftest.$ac_ext
Skip Montanaro89e975f2007-08-22 19:05:21 +00005351echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5352echo "${ECHO_T}$ac_header_preproc" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005353
5354# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005355case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5356 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005357 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5358echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005359 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5360echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5361 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005362 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005363 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005364 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5365echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005366 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5367echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5368 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5369echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5370 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5371echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005372 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5373echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005374 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5375echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +00005376 (
5377 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005378## ------------------------------------------------ ##
5379## Report this to http://www.python.org/python-bugs ##
5380## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005381_ASBOX
Skip Montanaro89e975f2007-08-22 19:05:21 +00005382 ) |
5383 sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005384 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005385esac
Skip Montanaro89e975f2007-08-22 19:05:21 +00005386echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5387echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005388if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5389 echo $ECHO_N "(cached) $ECHO_C" >&6
5390else
5391 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5392fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005393echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5394echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005395
5396fi
5397if test $ac_cv_header_sys_mkdev_h = yes; then
5398
5399cat >>confdefs.h <<\_ACEOF
5400#define MAJOR_IN_MKDEV 1
5401_ACEOF
5402
5403fi
5404
5405
5406
5407 if test $ac_cv_header_sys_mkdev_h = no; then
5408 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00005409 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5410echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005411if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5412 echo $ECHO_N "(cached) $ECHO_C" >&6
5413fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005414echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5415echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005416else
5417 # Is the header compilable?
Skip Montanaro89e975f2007-08-22 19:05:21 +00005418echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5419echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005420cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005421/* confdefs.h. */
5422_ACEOF
5423cat confdefs.h >>conftest.$ac_ext
5424cat >>conftest.$ac_ext <<_ACEOF
5425/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005426$ac_includes_default
5427#include <sys/sysmacros.h>
5428_ACEOF
5429rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00005430if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5431 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005433 grep -v '^ *+' conftest.er1 >conftest.err
5434 rm -f conftest.er1
5435 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005437 (exit $ac_status); } &&
5438 { ac_try='test -z "$ac_c_werror_flag"
5439 || test ! -s conftest.err'
5440 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5441 (eval $ac_try) 2>&5
5442 ac_status=$?
5443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5444 (exit $ac_status); }; } &&
5445 { ac_try='test -s conftest.$ac_objext'
5446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5447 (eval $ac_try) 2>&5
5448 ac_status=$?
5449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5450 (exit $ac_status); }; }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005451 ac_header_compiler=yes
5452else
5453 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005454sed 's/^/| /' conftest.$ac_ext >&5
5455
Skip Montanaro89e975f2007-08-22 19:05:21 +00005456ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005457fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005458rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5459echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5460echo "${ECHO_T}$ac_header_compiler" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005461
5462# Is the header present?
Skip Montanaro89e975f2007-08-22 19:05:21 +00005463echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5464echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005465cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005466/* confdefs.h. */
5467_ACEOF
5468cat confdefs.h >>conftest.$ac_ext
5469cat >>conftest.$ac_ext <<_ACEOF
5470/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005471#include <sys/sysmacros.h>
5472_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +00005473if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5474 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005475 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005476 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005477 rm -f conftest.er1
5478 cat conftest.err >&5
5479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005480 (exit $ac_status); } >/dev/null; then
5481 if test -s conftest.err; then
5482 ac_cpp_err=$ac_c_preproc_warn_flag
5483 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
5484 else
5485 ac_cpp_err=
5486 fi
5487else
5488 ac_cpp_err=yes
5489fi
5490if test -z "$ac_cpp_err"; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005491 ac_header_preproc=yes
5492else
5493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005494sed 's/^/| /' conftest.$ac_ext >&5
5495
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005496 ac_header_preproc=no
5497fi
5498rm -f conftest.err conftest.$ac_ext
Skip Montanaro89e975f2007-08-22 19:05:21 +00005499echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5500echo "${ECHO_T}$ac_header_preproc" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005501
5502# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005503case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5504 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005505 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5506echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005507 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
5508echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
5509 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005510 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005511 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005512 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5513echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005514 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5515echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5516 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
5517echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
5518 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
5519echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005520 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
5521echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005522 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
5523echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +00005524 (
5525 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00005526## ------------------------------------------------ ##
5527## Report this to http://www.python.org/python-bugs ##
5528## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005529_ASBOX
Skip Montanaro89e975f2007-08-22 19:05:21 +00005530 ) |
5531 sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005532 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005533esac
Skip Montanaro89e975f2007-08-22 19:05:21 +00005534echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5535echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005536if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5537 echo $ECHO_N "(cached) $ECHO_C" >&6
5538else
5539 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5540fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005541echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5542echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005543
5544fi
5545if test $ac_cv_header_sys_sysmacros_h = yes; then
5546
5547cat >>confdefs.h <<\_ACEOF
5548#define MAJOR_IN_SYSMACROS 1
5549_ACEOF
5550
5551fi
5552
5553
5554 fi
5555fi
5556
Michael W. Hudson54241132001-12-07 15:38:26 +00005557
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005558# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005559
5560for ac_header in term.h
5561do
5562as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Skip Montanaro89e975f2007-08-22 19:05:21 +00005563echo "$as_me:$LINENO: checking for $ac_header" >&5
5564echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5565if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005566 echo $ECHO_N "(cached) $ECHO_C" >&6
5567else
5568 cat >conftest.$ac_ext <<_ACEOF
5569/* confdefs.h. */
5570_ACEOF
5571cat confdefs.h >>conftest.$ac_ext
5572cat >>conftest.$ac_ext <<_ACEOF
5573/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005574
Martin v. Löwis5d52e782004-09-18 10:07:03 +00005575#ifdef HAVE_CURSES_H
5576#include <curses.h>
5577#endif
5578
5579
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005580#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005581_ACEOF
5582rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00005583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5584 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005585 ac_status=$?
5586 grep -v '^ *+' conftest.er1 >conftest.err
5587 rm -f conftest.er1
5588 cat conftest.err >&5
5589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005590 (exit $ac_status); } &&
5591 { ac_try='test -z "$ac_c_werror_flag"
5592 || test ! -s conftest.err'
5593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5594 (eval $ac_try) 2>&5
5595 ac_status=$?
5596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5597 (exit $ac_status); }; } &&
5598 { ac_try='test -s conftest.$ac_objext'
5599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5600 (eval $ac_try) 2>&5
5601 ac_status=$?
5602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5603 (exit $ac_status); }; }; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005604 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005605else
5606 echo "$as_me: failed program was:" >&5
5607sed 's/^/| /' conftest.$ac_ext >&5
5608
Skip Montanaro89e975f2007-08-22 19:05:21 +00005609eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005610fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005611rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005612fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005613echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5614echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005615if test `eval echo '${'$as_ac_Header'}'` = yes; then
5616 cat >>confdefs.h <<_ACEOF
5617#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5618_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005619
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005620fi
5621
5622done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005623
5624
Martin v. Löwis11017b12006-01-14 18:12:57 +00005625# On Linux, netlink.h requires asm/types.h
5626
5627for ac_header in linux/netlink.h
5628do
5629as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Skip Montanaro89e975f2007-08-22 19:05:21 +00005630echo "$as_me:$LINENO: checking for $ac_header" >&5
5631echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5632if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00005633 echo $ECHO_N "(cached) $ECHO_C" >&6
5634else
5635 cat >conftest.$ac_ext <<_ACEOF
5636/* confdefs.h. */
5637_ACEOF
5638cat confdefs.h >>conftest.$ac_ext
5639cat >>conftest.$ac_ext <<_ACEOF
5640/* end confdefs.h. */
5641
5642#ifdef HAVE_ASM_TYPES_H
5643#include <asm/types.h>
5644#endif
5645#ifdef HAVE_SYS_SOCKET_H
5646#include <sys/socket.h>
5647#endif
5648
5649
5650#include <$ac_header>
5651_ACEOF
5652rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00005653if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5654 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00005655 ac_status=$?
5656 grep -v '^ *+' conftest.er1 >conftest.err
5657 rm -f conftest.er1
5658 cat conftest.err >&5
5659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005660 (exit $ac_status); } &&
5661 { ac_try='test -z "$ac_c_werror_flag"
5662 || test ! -s conftest.err'
5663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5664 (eval $ac_try) 2>&5
5665 ac_status=$?
5666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5667 (exit $ac_status); }; } &&
5668 { ac_try='test -s conftest.$ac_objext'
5669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5670 (eval $ac_try) 2>&5
5671 ac_status=$?
5672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5673 (exit $ac_status); }; }; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00005674 eval "$as_ac_Header=yes"
5675else
5676 echo "$as_me: failed program was:" >&5
5677sed 's/^/| /' conftest.$ac_ext >&5
5678
Skip Montanaro89e975f2007-08-22 19:05:21 +00005679eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00005680fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005681rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00005682fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005683echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5684echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00005685if test `eval echo '${'$as_ac_Header'}'` = yes; then
5686 cat >>confdefs.h <<_ACEOF
5687#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5688_ACEOF
5689
5690fi
5691
5692done
5693
5694
Guido van Rossum627b2d71993-12-24 10:39:16 +00005695# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005696was_it_defined=no
Skip Montanaro89e975f2007-08-22 19:05:21 +00005697echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5698echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005699cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005700/* confdefs.h. */
5701_ACEOF
5702cat confdefs.h >>conftest.$ac_ext
5703cat >>conftest.$ac_ext <<_ACEOF
5704/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005705#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005706
5707_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005708if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005709 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005710 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005711else
Martin v. Löwis11437992002-04-12 09:54:03 +00005712
5713
5714cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005715#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005716_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005717
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005718
Guido van Rossum627b2d71993-12-24 10:39:16 +00005719fi
5720rm -f conftest*
5721
Skip Montanaro89e975f2007-08-22 19:05:21 +00005722echo "$as_me:$LINENO: result: $was_it_defined" >&5
5723echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005724
Neal Norwitz11690112002-07-30 01:08:28 +00005725# Check whether using makedev requires defining _OSF_SOURCE
Skip Montanaro89e975f2007-08-22 19:05:21 +00005726echo "$as_me:$LINENO: checking for makedev" >&5
5727echo $ECHO_N "checking for makedev... $ECHO_C" >&6
Neal Norwitz11690112002-07-30 01:08:28 +00005728cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005729/* confdefs.h. */
5730_ACEOF
5731cat confdefs.h >>conftest.$ac_ext
5732cat >>conftest.$ac_ext <<_ACEOF
5733/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005734#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005735int
5736main ()
5737{
5738 makedev(0, 0)
5739 ;
5740 return 0;
5741}
5742_ACEOF
5743rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00005744if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5745 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005746 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005747 grep -v '^ *+' conftest.er1 >conftest.err
5748 rm -f conftest.er1
5749 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005751 (exit $ac_status); } &&
5752 { ac_try='test -z "$ac_c_werror_flag"
5753 || test ! -s conftest.err'
5754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5755 (eval $ac_try) 2>&5
5756 ac_status=$?
5757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5758 (exit $ac_status); }; } &&
5759 { ac_try='test -s conftest$ac_exeext'
5760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5761 (eval $ac_try) 2>&5
5762 ac_status=$?
5763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5764 (exit $ac_status); }; }; then
Neal Norwitz11690112002-07-30 01:08:28 +00005765 ac_cv_has_makedev=yes
5766else
5767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005768sed 's/^/| /' conftest.$ac_ext >&5
5769
Skip Montanaro89e975f2007-08-22 19:05:21 +00005770ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00005771fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005772rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005773 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005774if test "$ac_cv_has_makedev" = "no"; then
5775 # we didn't link, try if _OSF_SOURCE will allow us to link
5776 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005777/* confdefs.h. */
5778_ACEOF
5779cat confdefs.h >>conftest.$ac_ext
5780cat >>conftest.$ac_ext <<_ACEOF
5781/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005782
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005783#define _OSF_SOURCE 1
5784#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005785
Neal Norwitz11690112002-07-30 01:08:28 +00005786int
5787main ()
5788{
5789 makedev(0, 0)
5790 ;
5791 return 0;
5792}
5793_ACEOF
5794rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00005795if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
5796 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005797 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005798 grep -v '^ *+' conftest.er1 >conftest.err
5799 rm -f conftest.er1
5800 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005802 (exit $ac_status); } &&
5803 { ac_try='test -z "$ac_c_werror_flag"
5804 || test ! -s conftest.err'
5805 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5806 (eval $ac_try) 2>&5
5807 ac_status=$?
5808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5809 (exit $ac_status); }; } &&
5810 { ac_try='test -s conftest$ac_exeext'
5811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5812 (eval $ac_try) 2>&5
5813 ac_status=$?
5814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5815 (exit $ac_status); }; }; then
Neal Norwitz11690112002-07-30 01:08:28 +00005816 ac_cv_has_makedev=yes
5817else
5818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005819sed 's/^/| /' conftest.$ac_ext >&5
5820
Skip Montanaro89e975f2007-08-22 19:05:21 +00005821ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00005822fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005823rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005824 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005825 if test "$ac_cv_has_makedev" = "yes"; then
5826
5827cat >>confdefs.h <<\_ACEOF
5828#define _OSF_SOURCE 1
5829_ACEOF
5830
5831 fi
5832fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005833echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5834echo "${ECHO_T}$ac_cv_has_makedev" >&6
Neal Norwitz11690112002-07-30 01:08:28 +00005835if test "$ac_cv_has_makedev" = "yes"; then
5836
5837cat >>confdefs.h <<\_ACEOF
5838#define HAVE_MAKEDEV 1
5839_ACEOF
5840
5841fi
5842
Martin v. Löwis399a6892002-10-04 10:22:02 +00005843# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5844# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5845# defined, but the compiler does not support pragma redefine_extname,
5846# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5847# structures (such as rlimit64) without declaring them. As a
5848# work-around, disable LFS on such configurations
5849
5850use_lfs=yes
Skip Montanaro89e975f2007-08-22 19:05:21 +00005851echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5852echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
Martin v. Löwis399a6892002-10-04 10:22:02 +00005853cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005854/* confdefs.h. */
5855_ACEOF
5856cat confdefs.h >>conftest.$ac_ext
5857cat >>conftest.$ac_ext <<_ACEOF
5858/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005859
5860#define _LARGEFILE_SOURCE 1
5861#define _FILE_OFFSET_BITS 64
5862#include <sys/resource.h>
5863
Martin v. Löwis399a6892002-10-04 10:22:02 +00005864int
5865main ()
5866{
5867struct rlimit foo;
5868 ;
5869 return 0;
5870}
5871_ACEOF
5872rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00005873if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5874 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00005875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005876 grep -v '^ *+' conftest.er1 >conftest.err
5877 rm -f conftest.er1
5878 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00005879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005880 (exit $ac_status); } &&
5881 { ac_try='test -z "$ac_c_werror_flag"
5882 || test ! -s conftest.err'
5883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5884 (eval $ac_try) 2>&5
5885 ac_status=$?
5886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5887 (exit $ac_status); }; } &&
5888 { ac_try='test -s conftest.$ac_objext'
5889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5890 (eval $ac_try) 2>&5
5891 ac_status=$?
5892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5893 (exit $ac_status); }; }; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00005894 sol_lfs_bug=no
5895else
5896 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005897sed 's/^/| /' conftest.$ac_ext >&5
5898
Skip Montanaro89e975f2007-08-22 19:05:21 +00005899sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00005900fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005901rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5902echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5903echo "${ECHO_T}$sol_lfs_bug" >&6
Martin v. Löwis399a6892002-10-04 10:22:02 +00005904if test "$sol_lfs_bug" = "yes"; then
5905 use_lfs=no
5906fi
5907
5908if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005909# Two defines needed to enable largefile support on various platforms
5910# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005911
Martin v. Löwis11437992002-04-12 09:54:03 +00005912cat >>confdefs.h <<\_ACEOF
5913#define _LARGEFILE_SOURCE 1
5914_ACEOF
5915
5916
5917cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005918#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005919_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005920
Martin v. Löwis399a6892002-10-04 10:22:02 +00005921fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005922
Guido van Rossum84e7b241996-08-19 21:59:00 +00005923# Add some code to confdefs.h so that the test for off_t works on SCO
5924cat >> confdefs.h <<\EOF
5925#if defined(SCO_DS)
5926#undef _OFF_T
5927#endif
5928EOF
5929
Guido van Rossumef2255b2000-03-10 22:30:29 +00005930# Type availability checks
Skip Montanaro89e975f2007-08-22 19:05:21 +00005931echo "$as_me:$LINENO: checking for mode_t" >&5
5932echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005933if test "${ac_cv_type_mode_t+set}" = set; then
5934 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005935else
Martin v. Löwis11437992002-04-12 09:54:03 +00005936 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005937/* confdefs.h. */
5938_ACEOF
5939cat confdefs.h >>conftest.$ac_ext
5940cat >>conftest.$ac_ext <<_ACEOF
5941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005942$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005943int
5944main ()
5945{
Skip Montanaro89e975f2007-08-22 19:05:21 +00005946if ((mode_t *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00005947 return 0;
Skip Montanaro89e975f2007-08-22 19:05:21 +00005948if (sizeof (mode_t))
Martin v. Löwis11437992002-04-12 09:54:03 +00005949 return 0;
5950 ;
5951 return 0;
5952}
5953_ACEOF
5954rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00005955if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5956 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005957 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005958 grep -v '^ *+' conftest.er1 >conftest.err
5959 rm -f conftest.er1
5960 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00005962 (exit $ac_status); } &&
5963 { ac_try='test -z "$ac_c_werror_flag"
5964 || test ! -s conftest.err'
5965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5966 (eval $ac_try) 2>&5
5967 ac_status=$?
5968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5969 (exit $ac_status); }; } &&
5970 { ac_try='test -s conftest.$ac_objext'
5971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5972 (eval $ac_try) 2>&5
5973 ac_status=$?
5974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5975 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005976 ac_cv_type_mode_t=yes
5977else
Martin v. Löwis11437992002-04-12 09:54:03 +00005978 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005979sed 's/^/| /' conftest.$ac_ext >&5
5980
Skip Montanaro89e975f2007-08-22 19:05:21 +00005981ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005982fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005983rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005984fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00005985echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5986echo "${ECHO_T}$ac_cv_type_mode_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005987if test $ac_cv_type_mode_t = yes; then
5988 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005989else
Martin v. Löwis11437992002-04-12 09:54:03 +00005990
5991cat >>confdefs.h <<_ACEOF
5992#define mode_t int
5993_ACEOF
5994
5995fi
5996
Skip Montanaro89e975f2007-08-22 19:05:21 +00005997echo "$as_me:$LINENO: checking for off_t" >&5
5998echo $ECHO_N "checking for off_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005999if test "${ac_cv_type_off_t+set}" = set; then
6000 echo $ECHO_N "(cached) $ECHO_C" >&6
6001else
6002 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006003/* confdefs.h. */
6004_ACEOF
6005cat confdefs.h >>conftest.$ac_ext
6006cat >>conftest.$ac_ext <<_ACEOF
6007/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006008$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006009int
6010main ()
6011{
Skip Montanaro89e975f2007-08-22 19:05:21 +00006012if ((off_t *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006013 return 0;
Skip Montanaro89e975f2007-08-22 19:05:21 +00006014if (sizeof (off_t))
Martin v. Löwis11437992002-04-12 09:54:03 +00006015 return 0;
6016 ;
6017 return 0;
6018}
6019_ACEOF
6020rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00006021if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6022 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006024 grep -v '^ *+' conftest.er1 >conftest.err
6025 rm -f conftest.er1
6026 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006028 (exit $ac_status); } &&
6029 { ac_try='test -z "$ac_c_werror_flag"
6030 || test ! -s conftest.err'
6031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6032 (eval $ac_try) 2>&5
6033 ac_status=$?
6034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6035 (exit $ac_status); }; } &&
6036 { ac_try='test -s conftest.$ac_objext'
6037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6038 (eval $ac_try) 2>&5
6039 ac_status=$?
6040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6041 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006042 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006043else
Martin v. Löwis11437992002-04-12 09:54:03 +00006044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006045sed 's/^/| /' conftest.$ac_ext >&5
6046
Skip Montanaro89e975f2007-08-22 19:05:21 +00006047ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006048fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006049rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006050fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006051echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6052echo "${ECHO_T}$ac_cv_type_off_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006053if test $ac_cv_type_off_t = yes; then
6054 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006055else
Martin v. Löwis11437992002-04-12 09:54:03 +00006056
6057cat >>confdefs.h <<_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +00006058#define off_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006059_ACEOF
6060
6061fi
6062
Skip Montanaro89e975f2007-08-22 19:05:21 +00006063echo "$as_me:$LINENO: checking for pid_t" >&5
6064echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006065if test "${ac_cv_type_pid_t+set}" = set; then
6066 echo $ECHO_N "(cached) $ECHO_C" >&6
6067else
6068 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006069/* confdefs.h. */
6070_ACEOF
6071cat confdefs.h >>conftest.$ac_ext
6072cat >>conftest.$ac_ext <<_ACEOF
6073/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006074$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006075int
6076main ()
6077{
Skip Montanaro89e975f2007-08-22 19:05:21 +00006078if ((pid_t *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006079 return 0;
Skip Montanaro89e975f2007-08-22 19:05:21 +00006080if (sizeof (pid_t))
Martin v. Löwis11437992002-04-12 09:54:03 +00006081 return 0;
6082 ;
6083 return 0;
6084}
6085_ACEOF
6086rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00006087if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6088 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006089 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006090 grep -v '^ *+' conftest.er1 >conftest.err
6091 rm -f conftest.er1
6092 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006094 (exit $ac_status); } &&
6095 { ac_try='test -z "$ac_c_werror_flag"
6096 || test ! -s conftest.err'
6097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6098 (eval $ac_try) 2>&5
6099 ac_status=$?
6100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6101 (exit $ac_status); }; } &&
6102 { ac_try='test -s conftest.$ac_objext'
6103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6104 (eval $ac_try) 2>&5
6105 ac_status=$?
6106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6107 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006108 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006109else
Martin v. Löwis11437992002-04-12 09:54:03 +00006110 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006111sed 's/^/| /' conftest.$ac_ext >&5
6112
Skip Montanaro89e975f2007-08-22 19:05:21 +00006113ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006114fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006115rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006116fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006117echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
6118echo "${ECHO_T}$ac_cv_type_pid_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006119if test $ac_cv_type_pid_t = yes; then
6120 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006121else
Martin v. Löwis11437992002-04-12 09:54:03 +00006122
6123cat >>confdefs.h <<_ACEOF
6124#define pid_t int
6125_ACEOF
6126
6127fi
6128
Skip Montanaro89e975f2007-08-22 19:05:21 +00006129echo "$as_me:$LINENO: checking return type of signal handlers" >&5
6130echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006131if test "${ac_cv_type_signal+set}" = set; then
6132 echo $ECHO_N "(cached) $ECHO_C" >&6
6133else
6134 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006135/* confdefs.h. */
6136_ACEOF
6137cat confdefs.h >>conftest.$ac_ext
6138cat >>conftest.$ac_ext <<_ACEOF
6139/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006140#include <sys/types.h>
6141#include <signal.h>
Skip Montanaro89e975f2007-08-22 19:05:21 +00006142#ifdef signal
6143# undef signal
6144#endif
6145#ifdef __cplusplus
6146extern "C" void (*signal (int, void (*)(int)))(int);
6147#else
6148void (*signal ()) ();
6149#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006150
Martin v. Löwis11437992002-04-12 09:54:03 +00006151int
6152main ()
6153{
Skip Montanaro89e975f2007-08-22 19:05:21 +00006154int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00006155 ;
6156 return 0;
6157}
6158_ACEOF
6159rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00006160if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6161 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006163 grep -v '^ *+' conftest.er1 >conftest.err
6164 rm -f conftest.er1
6165 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006167 (exit $ac_status); } &&
6168 { ac_try='test -z "$ac_c_werror_flag"
6169 || test ! -s conftest.err'
6170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6171 (eval $ac_try) 2>&5
6172 ac_status=$?
6173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6174 (exit $ac_status); }; } &&
6175 { ac_try='test -s conftest.$ac_objext'
6176 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6177 (eval $ac_try) 2>&5
6178 ac_status=$?
6179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6180 (exit $ac_status); }; }; then
6181 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00006182else
Martin v. Löwis11437992002-04-12 09:54:03 +00006183 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006184sed 's/^/| /' conftest.$ac_ext >&5
6185
Skip Montanaro89e975f2007-08-22 19:05:21 +00006186ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00006187fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006188rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006189fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006190echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
6191echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006192
Martin v. Löwis11437992002-04-12 09:54:03 +00006193cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006194#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00006195_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006196
Michael W. Hudson54241132001-12-07 15:38:26 +00006197
Skip Montanaro89e975f2007-08-22 19:05:21 +00006198echo "$as_me:$LINENO: checking for size_t" >&5
6199echo $ECHO_N "checking for size_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006200if test "${ac_cv_type_size_t+set}" = set; then
6201 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006202else
Martin v. Löwis11437992002-04-12 09:54:03 +00006203 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006204/* confdefs.h. */
6205_ACEOF
6206cat confdefs.h >>conftest.$ac_ext
6207cat >>conftest.$ac_ext <<_ACEOF
6208/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006209$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006210int
6211main ()
6212{
Skip Montanaro89e975f2007-08-22 19:05:21 +00006213if ((size_t *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006214 return 0;
Skip Montanaro89e975f2007-08-22 19:05:21 +00006215if (sizeof (size_t))
Martin v. Löwis11437992002-04-12 09:54:03 +00006216 return 0;
6217 ;
6218 return 0;
6219}
6220_ACEOF
6221rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00006222if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6223 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006224 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006225 grep -v '^ *+' conftest.er1 >conftest.err
6226 rm -f conftest.er1
6227 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006229 (exit $ac_status); } &&
6230 { ac_try='test -z "$ac_c_werror_flag"
6231 || test ! -s conftest.err'
6232 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6233 (eval $ac_try) 2>&5
6234 ac_status=$?
6235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6236 (exit $ac_status); }; } &&
6237 { ac_try='test -s conftest.$ac_objext'
6238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6239 (eval $ac_try) 2>&5
6240 ac_status=$?
6241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6242 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006243 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006244else
Martin v. Löwis11437992002-04-12 09:54:03 +00006245 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006246sed 's/^/| /' conftest.$ac_ext >&5
6247
Skip Montanaro89e975f2007-08-22 19:05:21 +00006248ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006249fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006250rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006251fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006252echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6253echo "${ECHO_T}$ac_cv_type_size_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006254if test $ac_cv_type_size_t = yes; then
6255 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006256else
Martin v. Löwis11437992002-04-12 09:54:03 +00006257
6258cat >>confdefs.h <<_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +00006259#define size_t unsigned
Martin v. Löwis11437992002-04-12 09:54:03 +00006260_ACEOF
6261
6262fi
6263
Skip Montanaro89e975f2007-08-22 19:05:21 +00006264echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6265echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006266if test "${ac_cv_type_uid_t+set}" = set; then
6267 echo $ECHO_N "(cached) $ECHO_C" >&6
6268else
6269 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006270/* confdefs.h. */
6271_ACEOF
6272cat confdefs.h >>conftest.$ac_ext
6273cat >>conftest.$ac_ext <<_ACEOF
6274/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006275#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006276
6277_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006278if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006279 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006280 ac_cv_type_uid_t=yes
6281else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006282 ac_cv_type_uid_t=no
6283fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006284rm -f conftest*
6285
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006286fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006287echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6288echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006289if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006290
Martin v. Löwis11437992002-04-12 09:54:03 +00006291cat >>confdefs.h <<\_ACEOF
6292#define uid_t int
6293_ACEOF
6294
6295
6296cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006297#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006298_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006299
6300fi
6301
Skip Montanaro89e975f2007-08-22 19:05:21 +00006302echo "$as_me:$LINENO: checking for ssize_t" >&5
6303echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006304if test "${ac_cv_type_ssize_t+set}" = set; then
6305 echo $ECHO_N "(cached) $ECHO_C" >&6
6306else
6307 cat >conftest.$ac_ext <<_ACEOF
6308/* confdefs.h. */
6309_ACEOF
6310cat confdefs.h >>conftest.$ac_ext
6311cat >>conftest.$ac_ext <<_ACEOF
6312/* end confdefs.h. */
6313$ac_includes_default
6314int
6315main ()
6316{
Skip Montanaro89e975f2007-08-22 19:05:21 +00006317if ((ssize_t *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00006318 return 0;
Skip Montanaro89e975f2007-08-22 19:05:21 +00006319if (sizeof (ssize_t))
Martin v. Löwis18e16552006-02-15 17:27:45 +00006320 return 0;
6321 ;
6322 return 0;
6323}
6324_ACEOF
6325rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00006326if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6327 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00006328 ac_status=$?
6329 grep -v '^ *+' conftest.er1 >conftest.err
6330 rm -f conftest.er1
6331 cat conftest.err >&5
6332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006333 (exit $ac_status); } &&
6334 { ac_try='test -z "$ac_c_werror_flag"
6335 || test ! -s conftest.err'
6336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6337 (eval $ac_try) 2>&5
6338 ac_status=$?
6339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6340 (exit $ac_status); }; } &&
6341 { ac_try='test -s conftest.$ac_objext'
6342 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6343 (eval $ac_try) 2>&5
6344 ac_status=$?
6345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6346 (exit $ac_status); }; }; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00006347 ac_cv_type_ssize_t=yes
6348else
6349 echo "$as_me: failed program was:" >&5
6350sed 's/^/| /' conftest.$ac_ext >&5
6351
Skip Montanaro89e975f2007-08-22 19:05:21 +00006352ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00006353fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006354rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00006355fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006356echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
6357echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00006358if test $ac_cv_type_ssize_t = yes; then
6359
6360cat >>confdefs.h <<\_ACEOF
6361#define HAVE_SSIZE_T 1
6362_ACEOF
6363
6364fi
6365
Jack Jansendd19cf82001-12-06 22:36:17 +00006366
Michael W. Hudson54241132001-12-07 15:38:26 +00006367# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006368# ANSI C requires sizeof(char) == 1, so no need to check it
Skip Montanaro89e975f2007-08-22 19:05:21 +00006369echo "$as_me:$LINENO: checking for int" >&5
6370echo $ECHO_N "checking for int... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006371if test "${ac_cv_type_int+set}" = set; then
6372 echo $ECHO_N "(cached) $ECHO_C" >&6
6373else
6374 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006375/* confdefs.h. */
6376_ACEOF
6377cat confdefs.h >>conftest.$ac_ext
6378cat >>conftest.$ac_ext <<_ACEOF
6379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006380$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006381int
6382main ()
6383{
Skip Montanaro89e975f2007-08-22 19:05:21 +00006384if ((int *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006385 return 0;
Skip Montanaro89e975f2007-08-22 19:05:21 +00006386if (sizeof (int))
Martin v. Löwis11437992002-04-12 09:54:03 +00006387 return 0;
6388 ;
6389 return 0;
6390}
6391_ACEOF
6392rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00006393if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6394 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006396 grep -v '^ *+' conftest.er1 >conftest.err
6397 rm -f conftest.er1
6398 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006400 (exit $ac_status); } &&
6401 { ac_try='test -z "$ac_c_werror_flag"
6402 || test ! -s conftest.err'
6403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6404 (eval $ac_try) 2>&5
6405 ac_status=$?
6406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6407 (exit $ac_status); }; } &&
6408 { ac_try='test -s conftest.$ac_objext'
6409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6410 (eval $ac_try) 2>&5
6411 ac_status=$?
6412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6413 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006414 ac_cv_type_int=yes
6415else
6416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006417sed 's/^/| /' conftest.$ac_ext >&5
6418
Skip Montanaro89e975f2007-08-22 19:05:21 +00006419ac_cv_type_int=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006420fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006421rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon19fab762007-06-02 03:02:29 +00006422fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006423echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6424echo "${ECHO_T}$ac_cv_type_int" >&6
Brett Cannon19fab762007-06-02 03:02:29 +00006425
Skip Montanaro89e975f2007-08-22 19:05:21 +00006426echo "$as_me:$LINENO: checking size of int" >&5
6427echo $ECHO_N "checking size of int... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006428if test "${ac_cv_sizeof_int+set}" = set; then
6429 echo $ECHO_N "(cached) $ECHO_C" >&6
6430else
Skip Montanaro89e975f2007-08-22 19:05:21 +00006431 if test "$ac_cv_type_int" = yes; then
6432 # The cast to unsigned long works around a bug in the HP C Compiler
6433 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6434 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6435 # This bug is HP SR number 8606223364.
Martin v. Löwis11437992002-04-12 09:54:03 +00006436 if test "$cross_compiling" = yes; then
6437 # Depending upon the size, compute the lo and hi bounds.
6438cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006439/* confdefs.h. */
6440_ACEOF
6441cat confdefs.h >>conftest.$ac_ext
6442cat >>conftest.$ac_ext <<_ACEOF
6443/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006444$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006445int
6446main ()
6447{
Skip Montanaro89e975f2007-08-22 19:05:21 +00006448static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00006449test_array [0] = 0
6450
6451 ;
6452 return 0;
6453}
6454_ACEOF
6455rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00006456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6457 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006458 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006459 grep -v '^ *+' conftest.er1 >conftest.err
6460 rm -f conftest.er1
6461 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006463 (exit $ac_status); } &&
6464 { ac_try='test -z "$ac_c_werror_flag"
6465 || test ! -s conftest.err'
6466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6467 (eval $ac_try) 2>&5
6468 ac_status=$?
6469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6470 (exit $ac_status); }; } &&
6471 { ac_try='test -s conftest.$ac_objext'
6472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6473 (eval $ac_try) 2>&5
6474 ac_status=$?
6475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6476 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006477 ac_lo=0 ac_mid=0
6478 while :; do
6479 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006480/* confdefs.h. */
6481_ACEOF
6482cat confdefs.h >>conftest.$ac_ext
6483cat >>conftest.$ac_ext <<_ACEOF
6484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006485$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006486int
6487main ()
6488{
Skip Montanaro89e975f2007-08-22 19:05:21 +00006489static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00006490test_array [0] = 0
6491
6492 ;
6493 return 0;
6494}
6495_ACEOF
6496rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00006497if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6498 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006500 grep -v '^ *+' conftest.er1 >conftest.err
6501 rm -f conftest.er1
6502 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006504 (exit $ac_status); } &&
6505 { ac_try='test -z "$ac_c_werror_flag"
6506 || test ! -s conftest.err'
6507 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6508 (eval $ac_try) 2>&5
6509 ac_status=$?
6510 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6511 (exit $ac_status); }; } &&
6512 { ac_try='test -s conftest.$ac_objext'
6513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6514 (eval $ac_try) 2>&5
6515 ac_status=$?
6516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6517 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006518 ac_hi=$ac_mid; break
6519else
6520 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006521sed 's/^/| /' conftest.$ac_ext >&5
6522
Skip Montanaro89e975f2007-08-22 19:05:21 +00006523ac_lo=`expr $ac_mid + 1`
6524 if test $ac_lo -le $ac_mid; then
6525 ac_lo= ac_hi=
6526 break
6527 fi
6528 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006529fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006530rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006531 done
6532else
6533 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006534sed 's/^/| /' conftest.$ac_ext >&5
6535
Skip Montanaro89e975f2007-08-22 19:05:21 +00006536cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006537/* confdefs.h. */
6538_ACEOF
6539cat confdefs.h >>conftest.$ac_ext
6540cat >>conftest.$ac_ext <<_ACEOF
6541/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006542$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006543int
6544main ()
6545{
Skip Montanaro89e975f2007-08-22 19:05:21 +00006546static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00006547test_array [0] = 0
6548
6549 ;
6550 return 0;
6551}
6552_ACEOF
6553rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00006554if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6555 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006556 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006557 grep -v '^ *+' conftest.er1 >conftest.err
6558 rm -f conftest.er1
6559 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006561 (exit $ac_status); } &&
6562 { ac_try='test -z "$ac_c_werror_flag"
6563 || test ! -s conftest.err'
6564 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6565 (eval $ac_try) 2>&5
6566 ac_status=$?
6567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6568 (exit $ac_status); }; } &&
6569 { ac_try='test -s conftest.$ac_objext'
6570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6571 (eval $ac_try) 2>&5
6572 ac_status=$?
6573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6574 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006575 ac_hi=-1 ac_mid=-1
6576 while :; do
6577 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006578/* confdefs.h. */
6579_ACEOF
6580cat confdefs.h >>conftest.$ac_ext
6581cat >>conftest.$ac_ext <<_ACEOF
6582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006583$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006584int
6585main ()
6586{
Skip Montanaro89e975f2007-08-22 19:05:21 +00006587static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00006588test_array [0] = 0
6589
6590 ;
6591 return 0;
6592}
6593_ACEOF
6594rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00006595if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6596 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006597 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006598 grep -v '^ *+' conftest.er1 >conftest.err
6599 rm -f conftest.er1
6600 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006602 (exit $ac_status); } &&
6603 { ac_try='test -z "$ac_c_werror_flag"
6604 || test ! -s conftest.err'
6605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6606 (eval $ac_try) 2>&5
6607 ac_status=$?
6608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6609 (exit $ac_status); }; } &&
6610 { ac_try='test -s conftest.$ac_objext'
6611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6612 (eval $ac_try) 2>&5
6613 ac_status=$?
6614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6615 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006616 ac_lo=$ac_mid; break
6617else
6618 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006619sed 's/^/| /' conftest.$ac_ext >&5
6620
Skip Montanaro89e975f2007-08-22 19:05:21 +00006621ac_hi=`expr '(' $ac_mid ')' - 1`
6622 if test $ac_mid -le $ac_hi; then
6623 ac_lo= ac_hi=
6624 break
6625 fi
6626 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006627fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006628rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006629 done
6630else
6631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006632sed 's/^/| /' conftest.$ac_ext >&5
6633
Skip Montanaro89e975f2007-08-22 19:05:21 +00006634ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00006635fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006636rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006637fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006638rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006639# Binary search between lo and hi bounds.
6640while test "x$ac_lo" != "x$ac_hi"; do
6641 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6642 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006643/* confdefs.h. */
6644_ACEOF
6645cat confdefs.h >>conftest.$ac_ext
6646cat >>conftest.$ac_ext <<_ACEOF
6647/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006648$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006649int
6650main ()
6651{
Skip Montanaro89e975f2007-08-22 19:05:21 +00006652static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00006653test_array [0] = 0
6654
6655 ;
6656 return 0;
6657}
6658_ACEOF
6659rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00006660if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6661 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006663 grep -v '^ *+' conftest.er1 >conftest.err
6664 rm -f conftest.er1
6665 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006667 (exit $ac_status); } &&
6668 { ac_try='test -z "$ac_c_werror_flag"
6669 || test ! -s conftest.err'
6670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6671 (eval $ac_try) 2>&5
6672 ac_status=$?
6673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6674 (exit $ac_status); }; } &&
6675 { ac_try='test -s conftest.$ac_objext'
6676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6677 (eval $ac_try) 2>&5
6678 ac_status=$?
6679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6680 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006681 ac_hi=$ac_mid
6682else
6683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006684sed 's/^/| /' conftest.$ac_ext >&5
6685
Skip Montanaro89e975f2007-08-22 19:05:21 +00006686ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006687fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006688rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006689done
6690case $ac_lo in
6691?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro89e975f2007-08-22 19:05:21 +00006692'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00006693See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006694echo "$as_me: error: cannot compute sizeof (int), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00006695See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +00006696 { (exit 1); exit 1; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00006697esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006698else
Skip Montanaro89e975f2007-08-22 19:05:21 +00006699 if test "$cross_compiling" = yes; then
6700 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6701See \`config.log' for more details." >&5
6702echo "$as_me: error: cannot run test program while cross compiling
6703See \`config.log' for more details." >&2;}
6704 { (exit 1); exit 1; }; }
6705else
Martin v. Löwis11437992002-04-12 09:54:03 +00006706 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006707/* confdefs.h. */
6708_ACEOF
6709cat confdefs.h >>conftest.$ac_ext
6710cat >>conftest.$ac_ext <<_ACEOF
6711/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006712$ac_includes_default
Skip Montanaro89e975f2007-08-22 19:05:21 +00006713long longval () { return (long) (sizeof (int)); }
6714unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006715#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006716#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006717int
6718main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006719{
Martin v. Löwis11437992002-04-12 09:54:03 +00006720
6721 FILE *f = fopen ("conftest.val", "w");
6722 if (! f)
Skip Montanaro89e975f2007-08-22 19:05:21 +00006723 exit (1);
6724 if (((long) (sizeof (int))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006725 {
Skip Montanaro89e975f2007-08-22 19:05:21 +00006726 long i = longval ();
6727 if (i != ((long) (sizeof (int))))
6728 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00006729 fprintf (f, "%ld\n", i);
6730 }
6731 else
6732 {
Skip Montanaro89e975f2007-08-22 19:05:21 +00006733 unsigned long i = ulongval ();
6734 if (i != ((long) (sizeof (int))))
6735 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00006736 fprintf (f, "%lu\n", i);
6737 }
Skip Montanaro89e975f2007-08-22 19:05:21 +00006738 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis11437992002-04-12 09:54:03 +00006739
6740 ;
6741 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006742}
Martin v. Löwis11437992002-04-12 09:54:03 +00006743_ACEOF
6744rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00006745if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6746 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006747 ac_status=$?
6748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6749 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +00006750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6751 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006752 ac_status=$?
6753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6754 (exit $ac_status); }; }; then
6755 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006756else
Martin v. Löwis11437992002-04-12 09:54:03 +00006757 echo "$as_me: program exited with status $ac_status" >&5
6758echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006759sed 's/^/| /' conftest.$ac_ext >&5
6760
Martin v. Löwis11437992002-04-12 09:54:03 +00006761( exit $ac_status )
Skip Montanaro89e975f2007-08-22 19:05:21 +00006762{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00006763See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006764echo "$as_me: error: cannot compute sizeof (int), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00006765See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +00006766 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006767fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006768rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6769fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006770fi
6771rm -f conftest.val
Skip Montanaro89e975f2007-08-22 19:05:21 +00006772else
6773 ac_cv_sizeof_int=0
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006774fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006775fi
6776echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6777echo "${ECHO_T}$ac_cv_sizeof_int" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006778cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006779#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006780_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006781
6782
Skip Montanaro89e975f2007-08-22 19:05:21 +00006783echo "$as_me:$LINENO: checking for long" >&5
6784echo $ECHO_N "checking for long... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006785if test "${ac_cv_type_long+set}" = set; then
6786 echo $ECHO_N "(cached) $ECHO_C" >&6
6787else
6788 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006789/* confdefs.h. */
6790_ACEOF
6791cat confdefs.h >>conftest.$ac_ext
6792cat >>conftest.$ac_ext <<_ACEOF
6793/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006794$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006795int
6796main ()
6797{
Skip Montanaro89e975f2007-08-22 19:05:21 +00006798if ((long *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00006799 return 0;
Skip Montanaro89e975f2007-08-22 19:05:21 +00006800if (sizeof (long))
Martin v. Löwis11437992002-04-12 09:54:03 +00006801 return 0;
6802 ;
6803 return 0;
6804}
6805_ACEOF
6806rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00006807if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6808 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006809 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006810 grep -v '^ *+' conftest.er1 >conftest.err
6811 rm -f conftest.er1
6812 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006814 (exit $ac_status); } &&
6815 { ac_try='test -z "$ac_c_werror_flag"
6816 || test ! -s conftest.err'
6817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6818 (eval $ac_try) 2>&5
6819 ac_status=$?
6820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6821 (exit $ac_status); }; } &&
6822 { ac_try='test -s conftest.$ac_objext'
6823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6824 (eval $ac_try) 2>&5
6825 ac_status=$?
6826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6827 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006828 ac_cv_type_long=yes
6829else
6830 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006831sed 's/^/| /' conftest.$ac_ext >&5
6832
Skip Montanaro89e975f2007-08-22 19:05:21 +00006833ac_cv_type_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006834fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006835rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon19fab762007-06-02 03:02:29 +00006836fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006837echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6838echo "${ECHO_T}$ac_cv_type_long" >&6
Brett Cannon19fab762007-06-02 03:02:29 +00006839
Skip Montanaro89e975f2007-08-22 19:05:21 +00006840echo "$as_me:$LINENO: checking size of long" >&5
6841echo $ECHO_N "checking size of long... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006842if test "${ac_cv_sizeof_long+set}" = set; then
6843 echo $ECHO_N "(cached) $ECHO_C" >&6
6844else
Skip Montanaro89e975f2007-08-22 19:05:21 +00006845 if test "$ac_cv_type_long" = yes; then
6846 # The cast to unsigned long works around a bug in the HP C Compiler
6847 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6848 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6849 # This bug is HP SR number 8606223364.
Martin v. Löwis11437992002-04-12 09:54:03 +00006850 if test "$cross_compiling" = yes; then
6851 # Depending upon the size, compute the lo and hi bounds.
6852cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006853/* confdefs.h. */
6854_ACEOF
6855cat confdefs.h >>conftest.$ac_ext
6856cat >>conftest.$ac_ext <<_ACEOF
6857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006858$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006859int
6860main ()
6861{
Skip Montanaro89e975f2007-08-22 19:05:21 +00006862static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00006863test_array [0] = 0
6864
6865 ;
6866 return 0;
6867}
6868_ACEOF
6869rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00006870if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6871 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006872 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006873 grep -v '^ *+' conftest.er1 >conftest.err
6874 rm -f conftest.er1
6875 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006877 (exit $ac_status); } &&
6878 { ac_try='test -z "$ac_c_werror_flag"
6879 || test ! -s conftest.err'
6880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6881 (eval $ac_try) 2>&5
6882 ac_status=$?
6883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6884 (exit $ac_status); }; } &&
6885 { ac_try='test -s conftest.$ac_objext'
6886 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6887 (eval $ac_try) 2>&5
6888 ac_status=$?
6889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6890 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006891 ac_lo=0 ac_mid=0
6892 while :; do
6893 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006894/* confdefs.h. */
6895_ACEOF
6896cat confdefs.h >>conftest.$ac_ext
6897cat >>conftest.$ac_ext <<_ACEOF
6898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006899$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006900int
6901main ()
6902{
Skip Montanaro89e975f2007-08-22 19:05:21 +00006903static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00006904test_array [0] = 0
6905
6906 ;
6907 return 0;
6908}
6909_ACEOF
6910rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00006911if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6912 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006913 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006914 grep -v '^ *+' conftest.er1 >conftest.err
6915 rm -f conftest.er1
6916 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006918 (exit $ac_status); } &&
6919 { ac_try='test -z "$ac_c_werror_flag"
6920 || test ! -s conftest.err'
6921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6922 (eval $ac_try) 2>&5
6923 ac_status=$?
6924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6925 (exit $ac_status); }; } &&
6926 { ac_try='test -s conftest.$ac_objext'
6927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6928 (eval $ac_try) 2>&5
6929 ac_status=$?
6930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6931 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006932 ac_hi=$ac_mid; break
6933else
6934 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006935sed 's/^/| /' conftest.$ac_ext >&5
6936
Skip Montanaro89e975f2007-08-22 19:05:21 +00006937ac_lo=`expr $ac_mid + 1`
6938 if test $ac_lo -le $ac_mid; then
6939 ac_lo= ac_hi=
6940 break
6941 fi
6942 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006943fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00006944rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006945 done
6946else
6947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006948sed 's/^/| /' conftest.$ac_ext >&5
6949
Skip Montanaro89e975f2007-08-22 19:05:21 +00006950cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006951/* confdefs.h. */
6952_ACEOF
6953cat confdefs.h >>conftest.$ac_ext
6954cat >>conftest.$ac_ext <<_ACEOF
6955/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006956$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006957int
6958main ()
6959{
Skip Montanaro89e975f2007-08-22 19:05:21 +00006960static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00006961test_array [0] = 0
6962
6963 ;
6964 return 0;
6965}
6966_ACEOF
6967rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00006968if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6969 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006970 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006971 grep -v '^ *+' conftest.er1 >conftest.err
6972 rm -f conftest.er1
6973 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006975 (exit $ac_status); } &&
6976 { ac_try='test -z "$ac_c_werror_flag"
6977 || test ! -s conftest.err'
6978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6979 (eval $ac_try) 2>&5
6980 ac_status=$?
6981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6982 (exit $ac_status); }; } &&
6983 { ac_try='test -s conftest.$ac_objext'
6984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6985 (eval $ac_try) 2>&5
6986 ac_status=$?
6987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6988 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006989 ac_hi=-1 ac_mid=-1
6990 while :; do
6991 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006992/* confdefs.h. */
6993_ACEOF
6994cat confdefs.h >>conftest.$ac_ext
6995cat >>conftest.$ac_ext <<_ACEOF
6996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006997$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006998int
6999main ()
7000{
Skip Montanaro89e975f2007-08-22 19:05:21 +00007001static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007002test_array [0] = 0
7003
7004 ;
7005 return 0;
7006}
7007_ACEOF
7008rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00007009if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7010 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007012 grep -v '^ *+' conftest.er1 >conftest.err
7013 rm -f conftest.er1
7014 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00007016 (exit $ac_status); } &&
7017 { ac_try='test -z "$ac_c_werror_flag"
7018 || test ! -s conftest.err'
7019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7020 (eval $ac_try) 2>&5
7021 ac_status=$?
7022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7023 (exit $ac_status); }; } &&
7024 { ac_try='test -s conftest.$ac_objext'
7025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7026 (eval $ac_try) 2>&5
7027 ac_status=$?
7028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7029 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007030 ac_lo=$ac_mid; break
7031else
7032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007033sed 's/^/| /' conftest.$ac_ext >&5
7034
Skip Montanaro89e975f2007-08-22 19:05:21 +00007035ac_hi=`expr '(' $ac_mid ')' - 1`
7036 if test $ac_mid -le $ac_hi; then
7037 ac_lo= ac_hi=
7038 break
7039 fi
7040 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007041fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007042rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007043 done
7044else
7045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007046sed 's/^/| /' conftest.$ac_ext >&5
7047
Skip Montanaro89e975f2007-08-22 19:05:21 +00007048ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007049fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007050rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007051fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007052rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007053# Binary search between lo and hi bounds.
7054while test "x$ac_lo" != "x$ac_hi"; do
7055 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7056 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007057/* confdefs.h. */
7058_ACEOF
7059cat confdefs.h >>conftest.$ac_ext
7060cat >>conftest.$ac_ext <<_ACEOF
7061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007062$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007063int
7064main ()
7065{
Skip Montanaro89e975f2007-08-22 19:05:21 +00007066static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007067test_array [0] = 0
7068
7069 ;
7070 return 0;
7071}
7072_ACEOF
7073rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00007074if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7075 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007077 grep -v '^ *+' conftest.er1 >conftest.err
7078 rm -f conftest.er1
7079 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00007081 (exit $ac_status); } &&
7082 { ac_try='test -z "$ac_c_werror_flag"
7083 || test ! -s conftest.err'
7084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7085 (eval $ac_try) 2>&5
7086 ac_status=$?
7087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7088 (exit $ac_status); }; } &&
7089 { ac_try='test -s conftest.$ac_objext'
7090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7091 (eval $ac_try) 2>&5
7092 ac_status=$?
7093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7094 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007095 ac_hi=$ac_mid
7096else
7097 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007098sed 's/^/| /' conftest.$ac_ext >&5
7099
Skip Montanaro89e975f2007-08-22 19:05:21 +00007100ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007101fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007102rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007103done
7104case $ac_lo in
7105?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro89e975f2007-08-22 19:05:21 +00007106'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007107See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00007108echo "$as_me: error: cannot compute sizeof (long), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007109See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +00007110 { (exit 1); exit 1; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007111esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007112else
Skip Montanaro89e975f2007-08-22 19:05:21 +00007113 if test "$cross_compiling" = yes; then
7114 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7115See \`config.log' for more details." >&5
7116echo "$as_me: error: cannot run test program while cross compiling
7117See \`config.log' for more details." >&2;}
7118 { (exit 1); exit 1; }; }
7119else
Martin v. Löwis11437992002-04-12 09:54:03 +00007120 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007121/* confdefs.h. */
7122_ACEOF
7123cat confdefs.h >>conftest.$ac_ext
7124cat >>conftest.$ac_ext <<_ACEOF
7125/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007126$ac_includes_default
Skip Montanaro89e975f2007-08-22 19:05:21 +00007127long longval () { return (long) (sizeof (long)); }
7128unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007129#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007130#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007131int
7132main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007133{
Martin v. Löwis11437992002-04-12 09:54:03 +00007134
7135 FILE *f = fopen ("conftest.val", "w");
7136 if (! f)
Skip Montanaro89e975f2007-08-22 19:05:21 +00007137 exit (1);
7138 if (((long) (sizeof (long))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007139 {
Skip Montanaro89e975f2007-08-22 19:05:21 +00007140 long i = longval ();
7141 if (i != ((long) (sizeof (long))))
7142 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00007143 fprintf (f, "%ld\n", i);
7144 }
7145 else
7146 {
Skip Montanaro89e975f2007-08-22 19:05:21 +00007147 unsigned long i = ulongval ();
7148 if (i != ((long) (sizeof (long))))
7149 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00007150 fprintf (f, "%lu\n", i);
7151 }
Skip Montanaro89e975f2007-08-22 19:05:21 +00007152 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis11437992002-04-12 09:54:03 +00007153
7154 ;
7155 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007156}
Martin v. Löwis11437992002-04-12 09:54:03 +00007157_ACEOF
7158rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00007159if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7160 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007161 ac_status=$?
7162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7163 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +00007164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7165 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007166 ac_status=$?
7167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7168 (exit $ac_status); }; }; then
7169 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007170else
Martin v. Löwis11437992002-04-12 09:54:03 +00007171 echo "$as_me: program exited with status $ac_status" >&5
7172echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007173sed 's/^/| /' conftest.$ac_ext >&5
7174
Martin v. Löwis11437992002-04-12 09:54:03 +00007175( exit $ac_status )
Skip Montanaro89e975f2007-08-22 19:05:21 +00007176{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007177See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00007178echo "$as_me: error: cannot compute sizeof (long), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007179See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +00007180 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007181fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007182rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7183fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007184fi
7185rm -f conftest.val
Skip Montanaro89e975f2007-08-22 19:05:21 +00007186else
7187 ac_cv_sizeof_long=0
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007188fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007189fi
7190echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
7191echo "${ECHO_T}$ac_cv_sizeof_long" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007192cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007193#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00007194_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007195
7196
Skip Montanaro89e975f2007-08-22 19:05:21 +00007197echo "$as_me:$LINENO: checking for void *" >&5
7198echo $ECHO_N "checking for void *... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007199if test "${ac_cv_type_void_p+set}" = set; then
7200 echo $ECHO_N "(cached) $ECHO_C" >&6
7201else
7202 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007203/* confdefs.h. */
7204_ACEOF
7205cat confdefs.h >>conftest.$ac_ext
7206cat >>conftest.$ac_ext <<_ACEOF
7207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007208$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007209int
7210main ()
7211{
Skip Montanaro89e975f2007-08-22 19:05:21 +00007212if ((void * *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007213 return 0;
Skip Montanaro89e975f2007-08-22 19:05:21 +00007214if (sizeof (void *))
Martin v. Löwis11437992002-04-12 09:54:03 +00007215 return 0;
7216 ;
7217 return 0;
7218}
7219_ACEOF
7220rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00007221if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7222 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007224 grep -v '^ *+' conftest.er1 >conftest.err
7225 rm -f conftest.er1
7226 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00007228 (exit $ac_status); } &&
7229 { ac_try='test -z "$ac_c_werror_flag"
7230 || test ! -s conftest.err'
7231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7232 (eval $ac_try) 2>&5
7233 ac_status=$?
7234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7235 (exit $ac_status); }; } &&
7236 { ac_try='test -s conftest.$ac_objext'
7237 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7238 (eval $ac_try) 2>&5
7239 ac_status=$?
7240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7241 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007242 ac_cv_type_void_p=yes
7243else
7244 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007245sed 's/^/| /' conftest.$ac_ext >&5
7246
Skip Montanaro89e975f2007-08-22 19:05:21 +00007247ac_cv_type_void_p=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007248fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007249rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon19fab762007-06-02 03:02:29 +00007250fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007251echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
7252echo "${ECHO_T}$ac_cv_type_void_p" >&6
Brett Cannon19fab762007-06-02 03:02:29 +00007253
Skip Montanaro89e975f2007-08-22 19:05:21 +00007254echo "$as_me:$LINENO: checking size of void *" >&5
7255echo $ECHO_N "checking size of void *... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007256if test "${ac_cv_sizeof_void_p+set}" = set; then
7257 echo $ECHO_N "(cached) $ECHO_C" >&6
7258else
Skip Montanaro89e975f2007-08-22 19:05:21 +00007259 if test "$ac_cv_type_void_p" = yes; then
7260 # The cast to unsigned long works around a bug in the HP C Compiler
7261 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7262 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7263 # This bug is HP SR number 8606223364.
Martin v. Löwis11437992002-04-12 09:54:03 +00007264 if test "$cross_compiling" = yes; then
7265 # Depending upon the size, compute the lo and hi bounds.
7266cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007267/* confdefs.h. */
7268_ACEOF
7269cat confdefs.h >>conftest.$ac_ext
7270cat >>conftest.$ac_ext <<_ACEOF
7271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007272$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007273int
7274main ()
7275{
Skip Montanaro89e975f2007-08-22 19:05:21 +00007276static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007277test_array [0] = 0
7278
7279 ;
7280 return 0;
7281}
7282_ACEOF
7283rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00007284if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7285 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007287 grep -v '^ *+' conftest.er1 >conftest.err
7288 rm -f conftest.er1
7289 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00007291 (exit $ac_status); } &&
7292 { ac_try='test -z "$ac_c_werror_flag"
7293 || test ! -s conftest.err'
7294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7295 (eval $ac_try) 2>&5
7296 ac_status=$?
7297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7298 (exit $ac_status); }; } &&
7299 { ac_try='test -s conftest.$ac_objext'
7300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7301 (eval $ac_try) 2>&5
7302 ac_status=$?
7303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7304 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007305 ac_lo=0 ac_mid=0
7306 while :; do
7307 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007308/* confdefs.h. */
7309_ACEOF
7310cat confdefs.h >>conftest.$ac_ext
7311cat >>conftest.$ac_ext <<_ACEOF
7312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007313$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007314int
7315main ()
7316{
Skip Montanaro89e975f2007-08-22 19:05:21 +00007317static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007318test_array [0] = 0
7319
7320 ;
7321 return 0;
7322}
7323_ACEOF
7324rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00007325if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7326 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007328 grep -v '^ *+' conftest.er1 >conftest.err
7329 rm -f conftest.er1
7330 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00007332 (exit $ac_status); } &&
7333 { ac_try='test -z "$ac_c_werror_flag"
7334 || test ! -s conftest.err'
7335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7336 (eval $ac_try) 2>&5
7337 ac_status=$?
7338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7339 (exit $ac_status); }; } &&
7340 { ac_try='test -s conftest.$ac_objext'
7341 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7342 (eval $ac_try) 2>&5
7343 ac_status=$?
7344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7345 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007346 ac_hi=$ac_mid; break
7347else
7348 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007349sed 's/^/| /' conftest.$ac_ext >&5
7350
Skip Montanaro89e975f2007-08-22 19:05:21 +00007351ac_lo=`expr $ac_mid + 1`
7352 if test $ac_lo -le $ac_mid; then
7353 ac_lo= ac_hi=
7354 break
7355 fi
7356 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007357fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007358rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007359 done
7360else
7361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007362sed 's/^/| /' conftest.$ac_ext >&5
7363
Skip Montanaro89e975f2007-08-22 19:05:21 +00007364cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007365/* confdefs.h. */
7366_ACEOF
7367cat confdefs.h >>conftest.$ac_ext
7368cat >>conftest.$ac_ext <<_ACEOF
7369/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007370$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007371int
7372main ()
7373{
Skip Montanaro89e975f2007-08-22 19:05:21 +00007374static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007375test_array [0] = 0
7376
7377 ;
7378 return 0;
7379}
7380_ACEOF
7381rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00007382if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7383 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007384 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007385 grep -v '^ *+' conftest.er1 >conftest.err
7386 rm -f conftest.er1
7387 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00007389 (exit $ac_status); } &&
7390 { ac_try='test -z "$ac_c_werror_flag"
7391 || test ! -s conftest.err'
7392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7393 (eval $ac_try) 2>&5
7394 ac_status=$?
7395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7396 (exit $ac_status); }; } &&
7397 { ac_try='test -s conftest.$ac_objext'
7398 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7399 (eval $ac_try) 2>&5
7400 ac_status=$?
7401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7402 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007403 ac_hi=-1 ac_mid=-1
7404 while :; do
7405 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007406/* confdefs.h. */
7407_ACEOF
7408cat confdefs.h >>conftest.$ac_ext
7409cat >>conftest.$ac_ext <<_ACEOF
7410/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007411$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007412int
7413main ()
7414{
Skip Montanaro89e975f2007-08-22 19:05:21 +00007415static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007416test_array [0] = 0
7417
7418 ;
7419 return 0;
7420}
7421_ACEOF
7422rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00007423if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7424 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007426 grep -v '^ *+' conftest.er1 >conftest.err
7427 rm -f conftest.er1
7428 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00007430 (exit $ac_status); } &&
7431 { ac_try='test -z "$ac_c_werror_flag"
7432 || test ! -s conftest.err'
7433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7434 (eval $ac_try) 2>&5
7435 ac_status=$?
7436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7437 (exit $ac_status); }; } &&
7438 { ac_try='test -s conftest.$ac_objext'
7439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7440 (eval $ac_try) 2>&5
7441 ac_status=$?
7442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7443 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007444 ac_lo=$ac_mid; break
7445else
7446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007447sed 's/^/| /' conftest.$ac_ext >&5
7448
Skip Montanaro89e975f2007-08-22 19:05:21 +00007449ac_hi=`expr '(' $ac_mid ')' - 1`
7450 if test $ac_mid -le $ac_hi; then
7451 ac_lo= ac_hi=
7452 break
7453 fi
7454 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007455fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007456rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007457 done
7458else
7459 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007460sed 's/^/| /' conftest.$ac_ext >&5
7461
Skip Montanaro89e975f2007-08-22 19:05:21 +00007462ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007463fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007464rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007465fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007466rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007467# Binary search between lo and hi bounds.
7468while test "x$ac_lo" != "x$ac_hi"; do
7469 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007471/* confdefs.h. */
7472_ACEOF
7473cat confdefs.h >>conftest.$ac_ext
7474cat >>conftest.$ac_ext <<_ACEOF
7475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007476$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007477int
7478main ()
7479{
Skip Montanaro89e975f2007-08-22 19:05:21 +00007480static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007481test_array [0] = 0
7482
7483 ;
7484 return 0;
7485}
7486_ACEOF
7487rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00007488if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7489 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007491 grep -v '^ *+' conftest.er1 >conftest.err
7492 rm -f conftest.er1
7493 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00007495 (exit $ac_status); } &&
7496 { ac_try='test -z "$ac_c_werror_flag"
7497 || test ! -s conftest.err'
7498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7499 (eval $ac_try) 2>&5
7500 ac_status=$?
7501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7502 (exit $ac_status); }; } &&
7503 { ac_try='test -s conftest.$ac_objext'
7504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7505 (eval $ac_try) 2>&5
7506 ac_status=$?
7507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7508 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007509 ac_hi=$ac_mid
7510else
7511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007512sed 's/^/| /' conftest.$ac_ext >&5
7513
Skip Montanaro89e975f2007-08-22 19:05:21 +00007514ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007515fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007516rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007517done
7518case $ac_lo in
7519?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro89e975f2007-08-22 19:05:21 +00007520'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007521See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00007522echo "$as_me: error: cannot compute sizeof (void *), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007523See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +00007524 { (exit 1); exit 1; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007525esac
Guido van Rossumad678af1998-10-02 14:42:15 +00007526else
Skip Montanaro89e975f2007-08-22 19:05:21 +00007527 if test "$cross_compiling" = yes; then
7528 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7529See \`config.log' for more details." >&5
7530echo "$as_me: error: cannot run test program while cross compiling
7531See \`config.log' for more details." >&2;}
7532 { (exit 1); exit 1; }; }
7533else
Martin v. Löwis11437992002-04-12 09:54:03 +00007534 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007535/* confdefs.h. */
7536_ACEOF
7537cat confdefs.h >>conftest.$ac_ext
7538cat >>conftest.$ac_ext <<_ACEOF
7539/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007540$ac_includes_default
Skip Montanaro89e975f2007-08-22 19:05:21 +00007541long longval () { return (long) (sizeof (void *)); }
7542unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007543#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007544#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007545int
7546main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00007547{
Martin v. Löwis11437992002-04-12 09:54:03 +00007548
7549 FILE *f = fopen ("conftest.val", "w");
7550 if (! f)
Skip Montanaro89e975f2007-08-22 19:05:21 +00007551 exit (1);
7552 if (((long) (sizeof (void *))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007553 {
Skip Montanaro89e975f2007-08-22 19:05:21 +00007554 long i = longval ();
7555 if (i != ((long) (sizeof (void *))))
7556 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00007557 fprintf (f, "%ld\n", i);
7558 }
7559 else
7560 {
Skip Montanaro89e975f2007-08-22 19:05:21 +00007561 unsigned long i = ulongval ();
7562 if (i != ((long) (sizeof (void *))))
7563 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00007564 fprintf (f, "%lu\n", i);
7565 }
Skip Montanaro89e975f2007-08-22 19:05:21 +00007566 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis11437992002-04-12 09:54:03 +00007567
7568 ;
7569 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00007570}
Martin v. Löwis11437992002-04-12 09:54:03 +00007571_ACEOF
7572rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00007573if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7574 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007575 ac_status=$?
7576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7577 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +00007578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7579 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007580 ac_status=$?
7581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7582 (exit $ac_status); }; }; then
7583 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00007584else
Martin v. Löwis11437992002-04-12 09:54:03 +00007585 echo "$as_me: program exited with status $ac_status" >&5
7586echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007587sed 's/^/| /' conftest.$ac_ext >&5
7588
Martin v. Löwis11437992002-04-12 09:54:03 +00007589( exit $ac_status )
Skip Montanaro89e975f2007-08-22 19:05:21 +00007590{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007591See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00007592echo "$as_me: error: cannot compute sizeof (void *), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007593See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +00007594 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007595fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007596rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7597fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007598fi
7599rm -f conftest.val
Skip Montanaro89e975f2007-08-22 19:05:21 +00007600else
7601 ac_cv_sizeof_void_p=0
Guido van Rossumad678af1998-10-02 14:42:15 +00007602fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007603fi
7604echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
7605echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007606cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007607#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007608_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007609
7610
Skip Montanaro89e975f2007-08-22 19:05:21 +00007611echo "$as_me:$LINENO: checking for short" >&5
7612echo $ECHO_N "checking for short... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007613if test "${ac_cv_type_short+set}" = set; then
7614 echo $ECHO_N "(cached) $ECHO_C" >&6
7615else
7616 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007617/* confdefs.h. */
7618_ACEOF
7619cat confdefs.h >>conftest.$ac_ext
7620cat >>conftest.$ac_ext <<_ACEOF
7621/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007622$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007623int
7624main ()
7625{
Skip Montanaro89e975f2007-08-22 19:05:21 +00007626if ((short *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007627 return 0;
Skip Montanaro89e975f2007-08-22 19:05:21 +00007628if (sizeof (short))
Martin v. Löwis11437992002-04-12 09:54:03 +00007629 return 0;
7630 ;
7631 return 0;
7632}
7633_ACEOF
7634rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00007635if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7636 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007637 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007638 grep -v '^ *+' conftest.er1 >conftest.err
7639 rm -f conftest.er1
7640 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00007642 (exit $ac_status); } &&
7643 { ac_try='test -z "$ac_c_werror_flag"
7644 || test ! -s conftest.err'
7645 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7646 (eval $ac_try) 2>&5
7647 ac_status=$?
7648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7649 (exit $ac_status); }; } &&
7650 { ac_try='test -s conftest.$ac_objext'
7651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7652 (eval $ac_try) 2>&5
7653 ac_status=$?
7654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7655 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007656 ac_cv_type_short=yes
7657else
7658 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007659sed 's/^/| /' conftest.$ac_ext >&5
7660
Skip Montanaro89e975f2007-08-22 19:05:21 +00007661ac_cv_type_short=no
Martin v. Löwis11437992002-04-12 09:54:03 +00007662fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007663rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon19fab762007-06-02 03:02:29 +00007664fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007665echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7666echo "${ECHO_T}$ac_cv_type_short" >&6
Brett Cannon19fab762007-06-02 03:02:29 +00007667
Skip Montanaro89e975f2007-08-22 19:05:21 +00007668echo "$as_me:$LINENO: checking size of short" >&5
7669echo $ECHO_N "checking size of short... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007670if test "${ac_cv_sizeof_short+set}" = set; then
7671 echo $ECHO_N "(cached) $ECHO_C" >&6
7672else
Skip Montanaro89e975f2007-08-22 19:05:21 +00007673 if test "$ac_cv_type_short" = yes; then
7674 # The cast to unsigned long works around a bug in the HP C Compiler
7675 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7676 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7677 # This bug is HP SR number 8606223364.
Martin v. Löwis11437992002-04-12 09:54:03 +00007678 if test "$cross_compiling" = yes; then
7679 # Depending upon the size, compute the lo and hi bounds.
7680cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007681/* confdefs.h. */
7682_ACEOF
7683cat confdefs.h >>conftest.$ac_ext
7684cat >>conftest.$ac_ext <<_ACEOF
7685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007686$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007687int
7688main ()
7689{
Skip Montanaro89e975f2007-08-22 19:05:21 +00007690static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007691test_array [0] = 0
7692
7693 ;
7694 return 0;
7695}
7696_ACEOF
7697rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00007698if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7699 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007701 grep -v '^ *+' conftest.er1 >conftest.err
7702 rm -f conftest.er1
7703 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00007705 (exit $ac_status); } &&
7706 { ac_try='test -z "$ac_c_werror_flag"
7707 || test ! -s conftest.err'
7708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7709 (eval $ac_try) 2>&5
7710 ac_status=$?
7711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7712 (exit $ac_status); }; } &&
7713 { ac_try='test -s conftest.$ac_objext'
7714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7715 (eval $ac_try) 2>&5
7716 ac_status=$?
7717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7718 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007719 ac_lo=0 ac_mid=0
7720 while :; do
7721 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007722/* confdefs.h. */
7723_ACEOF
7724cat confdefs.h >>conftest.$ac_ext
7725cat >>conftest.$ac_ext <<_ACEOF
7726/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007727$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007728int
7729main ()
7730{
Skip Montanaro89e975f2007-08-22 19:05:21 +00007731static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007732test_array [0] = 0
7733
7734 ;
7735 return 0;
7736}
7737_ACEOF
7738rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00007739if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7740 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007742 grep -v '^ *+' conftest.er1 >conftest.err
7743 rm -f conftest.er1
7744 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00007746 (exit $ac_status); } &&
7747 { ac_try='test -z "$ac_c_werror_flag"
7748 || test ! -s conftest.err'
7749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7750 (eval $ac_try) 2>&5
7751 ac_status=$?
7752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7753 (exit $ac_status); }; } &&
7754 { ac_try='test -s conftest.$ac_objext'
7755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7756 (eval $ac_try) 2>&5
7757 ac_status=$?
7758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7759 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007760 ac_hi=$ac_mid; break
7761else
7762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007763sed 's/^/| /' conftest.$ac_ext >&5
7764
Skip Montanaro89e975f2007-08-22 19:05:21 +00007765ac_lo=`expr $ac_mid + 1`
7766 if test $ac_lo -le $ac_mid; then
7767 ac_lo= ac_hi=
7768 break
7769 fi
7770 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007771fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007772rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007773 done
7774else
7775 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007776sed 's/^/| /' conftest.$ac_ext >&5
7777
Skip Montanaro89e975f2007-08-22 19:05:21 +00007778cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007779/* confdefs.h. */
7780_ACEOF
7781cat confdefs.h >>conftest.$ac_ext
7782cat >>conftest.$ac_ext <<_ACEOF
7783/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007784$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007785int
7786main ()
7787{
Skip Montanaro89e975f2007-08-22 19:05:21 +00007788static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007789test_array [0] = 0
7790
7791 ;
7792 return 0;
7793}
7794_ACEOF
7795rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00007796if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7797 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007798 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007799 grep -v '^ *+' conftest.er1 >conftest.err
7800 rm -f conftest.er1
7801 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00007803 (exit $ac_status); } &&
7804 { ac_try='test -z "$ac_c_werror_flag"
7805 || test ! -s conftest.err'
7806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7807 (eval $ac_try) 2>&5
7808 ac_status=$?
7809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7810 (exit $ac_status); }; } &&
7811 { ac_try='test -s conftest.$ac_objext'
7812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7813 (eval $ac_try) 2>&5
7814 ac_status=$?
7815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7816 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007817 ac_hi=-1 ac_mid=-1
7818 while :; do
7819 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007820/* confdefs.h. */
7821_ACEOF
7822cat confdefs.h >>conftest.$ac_ext
7823cat >>conftest.$ac_ext <<_ACEOF
7824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007825$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007826int
7827main ()
7828{
Skip Montanaro89e975f2007-08-22 19:05:21 +00007829static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007830test_array [0] = 0
7831
7832 ;
7833 return 0;
7834}
7835_ACEOF
7836rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00007837if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7838 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007840 grep -v '^ *+' conftest.er1 >conftest.err
7841 rm -f conftest.er1
7842 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00007844 (exit $ac_status); } &&
7845 { ac_try='test -z "$ac_c_werror_flag"
7846 || test ! -s conftest.err'
7847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7848 (eval $ac_try) 2>&5
7849 ac_status=$?
7850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7851 (exit $ac_status); }; } &&
7852 { ac_try='test -s conftest.$ac_objext'
7853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7854 (eval $ac_try) 2>&5
7855 ac_status=$?
7856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7857 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007858 ac_lo=$ac_mid; break
7859else
7860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007861sed 's/^/| /' conftest.$ac_ext >&5
7862
Skip Montanaro89e975f2007-08-22 19:05:21 +00007863ac_hi=`expr '(' $ac_mid ')' - 1`
7864 if test $ac_mid -le $ac_hi; then
7865 ac_lo= ac_hi=
7866 break
7867 fi
7868 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007869fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007870rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007871 done
7872else
7873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007874sed 's/^/| /' conftest.$ac_ext >&5
7875
Skip Montanaro89e975f2007-08-22 19:05:21 +00007876ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007877fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007878rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007879fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007880rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007881# Binary search between lo and hi bounds.
7882while test "x$ac_lo" != "x$ac_hi"; do
7883 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007885/* confdefs.h. */
7886_ACEOF
7887cat confdefs.h >>conftest.$ac_ext
7888cat >>conftest.$ac_ext <<_ACEOF
7889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007890$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007891int
7892main ()
7893{
Skip Montanaro89e975f2007-08-22 19:05:21 +00007894static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007895test_array [0] = 0
7896
7897 ;
7898 return 0;
7899}
7900_ACEOF
7901rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00007902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
7903 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007905 grep -v '^ *+' conftest.er1 >conftest.err
7906 rm -f conftest.er1
7907 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00007909 (exit $ac_status); } &&
7910 { ac_try='test -z "$ac_c_werror_flag"
7911 || test ! -s conftest.err'
7912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7913 (eval $ac_try) 2>&5
7914 ac_status=$?
7915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7916 (exit $ac_status); }; } &&
7917 { ac_try='test -s conftest.$ac_objext'
7918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7919 (eval $ac_try) 2>&5
7920 ac_status=$?
7921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7922 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007923 ac_hi=$ac_mid
7924else
7925 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007926sed 's/^/| /' conftest.$ac_ext >&5
7927
Skip Montanaro89e975f2007-08-22 19:05:21 +00007928ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007929fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00007930rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007931done
7932case $ac_lo in
7933?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro89e975f2007-08-22 19:05:21 +00007934'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007935See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00007936echo "$as_me: error: cannot compute sizeof (short), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00007937See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +00007938 { (exit 1); exit 1; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007939esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007940else
Skip Montanaro89e975f2007-08-22 19:05:21 +00007941 if test "$cross_compiling" = yes; then
7942 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7943See \`config.log' for more details." >&5
7944echo "$as_me: error: cannot run test program while cross compiling
7945See \`config.log' for more details." >&2;}
7946 { (exit 1); exit 1; }; }
7947else
Martin v. Löwis11437992002-04-12 09:54:03 +00007948 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007949/* confdefs.h. */
7950_ACEOF
7951cat confdefs.h >>conftest.$ac_ext
7952cat >>conftest.$ac_ext <<_ACEOF
7953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007954$ac_includes_default
Skip Montanaro89e975f2007-08-22 19:05:21 +00007955long longval () { return (long) (sizeof (short)); }
7956unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007957#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007958#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007959int
7960main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007961{
Martin v. Löwis11437992002-04-12 09:54:03 +00007962
7963 FILE *f = fopen ("conftest.val", "w");
7964 if (! f)
Skip Montanaro89e975f2007-08-22 19:05:21 +00007965 exit (1);
7966 if (((long) (sizeof (short))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007967 {
Skip Montanaro89e975f2007-08-22 19:05:21 +00007968 long i = longval ();
7969 if (i != ((long) (sizeof (short))))
7970 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00007971 fprintf (f, "%ld\n", i);
7972 }
7973 else
7974 {
Skip Montanaro89e975f2007-08-22 19:05:21 +00007975 unsigned long i = ulongval ();
7976 if (i != ((long) (sizeof (short))))
7977 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00007978 fprintf (f, "%lu\n", i);
7979 }
Skip Montanaro89e975f2007-08-22 19:05:21 +00007980 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis11437992002-04-12 09:54:03 +00007981
7982 ;
7983 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007984}
Martin v. Löwis11437992002-04-12 09:54:03 +00007985_ACEOF
7986rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00007987if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7988 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007989 ac_status=$?
7990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7991 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +00007992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7993 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007994 ac_status=$?
7995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7996 (exit $ac_status); }; }; then
7997 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007998else
Martin v. Löwis11437992002-04-12 09:54:03 +00007999 echo "$as_me: program exited with status $ac_status" >&5
8000echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008001sed 's/^/| /' conftest.$ac_ext >&5
8002
Martin v. Löwis11437992002-04-12 09:54:03 +00008003( exit $ac_status )
Skip Montanaro89e975f2007-08-22 19:05:21 +00008004{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00008005See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00008006echo "$as_me: error: cannot compute sizeof (short), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00008007See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +00008008 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008009fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008010rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8011fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008012fi
8013rm -f conftest.val
Skip Montanaro89e975f2007-08-22 19:05:21 +00008014else
8015 ac_cv_sizeof_short=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00008016fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008017fi
8018echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
8019echo "${ECHO_T}$ac_cv_sizeof_short" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008020cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008021#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00008022_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008023
8024
Skip Montanaro89e975f2007-08-22 19:05:21 +00008025echo "$as_me:$LINENO: checking for float" >&5
8026echo $ECHO_N "checking for float... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008027if test "${ac_cv_type_float+set}" = set; then
8028 echo $ECHO_N "(cached) $ECHO_C" >&6
8029else
8030 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008031/* confdefs.h. */
8032_ACEOF
8033cat confdefs.h >>conftest.$ac_ext
8034cat >>conftest.$ac_ext <<_ACEOF
8035/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008036$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008037int
8038main ()
8039{
Skip Montanaro89e975f2007-08-22 19:05:21 +00008040if ((float *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008041 return 0;
Skip Montanaro89e975f2007-08-22 19:05:21 +00008042if (sizeof (float))
Martin v. Löwis11437992002-04-12 09:54:03 +00008043 return 0;
8044 ;
8045 return 0;
8046}
8047_ACEOF
8048rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00008049if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8050 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008051 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008052 grep -v '^ *+' conftest.er1 >conftest.err
8053 rm -f conftest.er1
8054 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00008056 (exit $ac_status); } &&
8057 { ac_try='test -z "$ac_c_werror_flag"
8058 || test ! -s conftest.err'
8059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8060 (eval $ac_try) 2>&5
8061 ac_status=$?
8062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8063 (exit $ac_status); }; } &&
8064 { ac_try='test -s conftest.$ac_objext'
8065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8066 (eval $ac_try) 2>&5
8067 ac_status=$?
8068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8069 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008070 ac_cv_type_float=yes
8071else
8072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008073sed 's/^/| /' conftest.$ac_ext >&5
8074
Skip Montanaro89e975f2007-08-22 19:05:21 +00008075ac_cv_type_float=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008076fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008077rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon19fab762007-06-02 03:02:29 +00008078fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008079echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
8080echo "${ECHO_T}$ac_cv_type_float" >&6
Brett Cannon19fab762007-06-02 03:02:29 +00008081
Skip Montanaro89e975f2007-08-22 19:05:21 +00008082echo "$as_me:$LINENO: checking size of float" >&5
8083echo $ECHO_N "checking size of float... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008084if test "${ac_cv_sizeof_float+set}" = set; then
8085 echo $ECHO_N "(cached) $ECHO_C" >&6
8086else
Skip Montanaro89e975f2007-08-22 19:05:21 +00008087 if test "$ac_cv_type_float" = yes; then
8088 # The cast to unsigned long works around a bug in the HP C Compiler
8089 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8090 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8091 # This bug is HP SR number 8606223364.
Martin v. Löwis11437992002-04-12 09:54:03 +00008092 if test "$cross_compiling" = yes; then
8093 # Depending upon the size, compute the lo and hi bounds.
8094cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008095/* confdefs.h. */
8096_ACEOF
8097cat confdefs.h >>conftest.$ac_ext
8098cat >>conftest.$ac_ext <<_ACEOF
8099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008100$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008101int
8102main ()
8103{
Skip Montanaro89e975f2007-08-22 19:05:21 +00008104static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008105test_array [0] = 0
8106
8107 ;
8108 return 0;
8109}
8110_ACEOF
8111rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00008112if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8113 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008114 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008115 grep -v '^ *+' conftest.er1 >conftest.err
8116 rm -f conftest.er1
8117 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00008119 (exit $ac_status); } &&
8120 { ac_try='test -z "$ac_c_werror_flag"
8121 || test ! -s conftest.err'
8122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8123 (eval $ac_try) 2>&5
8124 ac_status=$?
8125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8126 (exit $ac_status); }; } &&
8127 { ac_try='test -s conftest.$ac_objext'
8128 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8129 (eval $ac_try) 2>&5
8130 ac_status=$?
8131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8132 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008133 ac_lo=0 ac_mid=0
8134 while :; do
8135 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008136/* confdefs.h. */
8137_ACEOF
8138cat confdefs.h >>conftest.$ac_ext
8139cat >>conftest.$ac_ext <<_ACEOF
8140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008141$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008142int
8143main ()
8144{
Skip Montanaro89e975f2007-08-22 19:05:21 +00008145static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008146test_array [0] = 0
8147
8148 ;
8149 return 0;
8150}
8151_ACEOF
8152rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00008153if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8154 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008155 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008156 grep -v '^ *+' conftest.er1 >conftest.err
8157 rm -f conftest.er1
8158 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00008160 (exit $ac_status); } &&
8161 { ac_try='test -z "$ac_c_werror_flag"
8162 || test ! -s conftest.err'
8163 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8164 (eval $ac_try) 2>&5
8165 ac_status=$?
8166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8167 (exit $ac_status); }; } &&
8168 { ac_try='test -s conftest.$ac_objext'
8169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8170 (eval $ac_try) 2>&5
8171 ac_status=$?
8172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8173 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008174 ac_hi=$ac_mid; break
8175else
8176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008177sed 's/^/| /' conftest.$ac_ext >&5
8178
Skip Montanaro89e975f2007-08-22 19:05:21 +00008179ac_lo=`expr $ac_mid + 1`
8180 if test $ac_lo -le $ac_mid; then
8181 ac_lo= ac_hi=
8182 break
8183 fi
8184 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008185fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008186rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008187 done
8188else
8189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008190sed 's/^/| /' conftest.$ac_ext >&5
8191
Skip Montanaro89e975f2007-08-22 19:05:21 +00008192cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008193/* confdefs.h. */
8194_ACEOF
8195cat confdefs.h >>conftest.$ac_ext
8196cat >>conftest.$ac_ext <<_ACEOF
8197/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008198$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008199int
8200main ()
8201{
Skip Montanaro89e975f2007-08-22 19:05:21 +00008202static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008203test_array [0] = 0
8204
8205 ;
8206 return 0;
8207}
8208_ACEOF
8209rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00008210if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8211 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008213 grep -v '^ *+' conftest.er1 >conftest.err
8214 rm -f conftest.er1
8215 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00008217 (exit $ac_status); } &&
8218 { ac_try='test -z "$ac_c_werror_flag"
8219 || test ! -s conftest.err'
8220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8221 (eval $ac_try) 2>&5
8222 ac_status=$?
8223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8224 (exit $ac_status); }; } &&
8225 { ac_try='test -s conftest.$ac_objext'
8226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8227 (eval $ac_try) 2>&5
8228 ac_status=$?
8229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8230 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008231 ac_hi=-1 ac_mid=-1
8232 while :; do
8233 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008234/* confdefs.h. */
8235_ACEOF
8236cat confdefs.h >>conftest.$ac_ext
8237cat >>conftest.$ac_ext <<_ACEOF
8238/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008239$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008240int
8241main ()
8242{
Skip Montanaro89e975f2007-08-22 19:05:21 +00008243static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008244test_array [0] = 0
8245
8246 ;
8247 return 0;
8248}
8249_ACEOF
8250rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00008251if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8252 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008254 grep -v '^ *+' conftest.er1 >conftest.err
8255 rm -f conftest.er1
8256 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00008258 (exit $ac_status); } &&
8259 { ac_try='test -z "$ac_c_werror_flag"
8260 || test ! -s conftest.err'
8261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8262 (eval $ac_try) 2>&5
8263 ac_status=$?
8264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8265 (exit $ac_status); }; } &&
8266 { ac_try='test -s conftest.$ac_objext'
8267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8268 (eval $ac_try) 2>&5
8269 ac_status=$?
8270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8271 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008272 ac_lo=$ac_mid; break
8273else
8274 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008275sed 's/^/| /' conftest.$ac_ext >&5
8276
Skip Montanaro89e975f2007-08-22 19:05:21 +00008277ac_hi=`expr '(' $ac_mid ')' - 1`
8278 if test $ac_mid -le $ac_hi; then
8279 ac_lo= ac_hi=
8280 break
8281 fi
8282 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008283fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008284rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008285 done
8286else
8287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008288sed 's/^/| /' conftest.$ac_ext >&5
8289
Skip Montanaro89e975f2007-08-22 19:05:21 +00008290ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008291fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008292rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008293fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008294rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008295# Binary search between lo and hi bounds.
8296while test "x$ac_lo" != "x$ac_hi"; do
8297 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8298 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008299/* confdefs.h. */
8300_ACEOF
8301cat confdefs.h >>conftest.$ac_ext
8302cat >>conftest.$ac_ext <<_ACEOF
8303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008304$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008305int
8306main ()
8307{
Skip Montanaro89e975f2007-08-22 19:05:21 +00008308static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008309test_array [0] = 0
8310
8311 ;
8312 return 0;
8313}
8314_ACEOF
8315rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00008316if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8317 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008319 grep -v '^ *+' conftest.er1 >conftest.err
8320 rm -f conftest.er1
8321 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00008323 (exit $ac_status); } &&
8324 { ac_try='test -z "$ac_c_werror_flag"
8325 || test ! -s conftest.err'
8326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8327 (eval $ac_try) 2>&5
8328 ac_status=$?
8329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8330 (exit $ac_status); }; } &&
8331 { ac_try='test -s conftest.$ac_objext'
8332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8333 (eval $ac_try) 2>&5
8334 ac_status=$?
8335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8336 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008337 ac_hi=$ac_mid
8338else
8339 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008340sed 's/^/| /' conftest.$ac_ext >&5
8341
Skip Montanaro89e975f2007-08-22 19:05:21 +00008342ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008343fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008344rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008345done
8346case $ac_lo in
8347?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro89e975f2007-08-22 19:05:21 +00008348'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00008349See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00008350echo "$as_me: error: cannot compute sizeof (float), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00008351See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +00008352 { (exit 1); exit 1; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008353esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008354else
Skip Montanaro89e975f2007-08-22 19:05:21 +00008355 if test "$cross_compiling" = yes; then
8356 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8357See \`config.log' for more details." >&5
8358echo "$as_me: error: cannot run test program while cross compiling
8359See \`config.log' for more details." >&2;}
8360 { (exit 1); exit 1; }; }
8361else
Martin v. Löwis11437992002-04-12 09:54:03 +00008362 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008363/* confdefs.h. */
8364_ACEOF
8365cat confdefs.h >>conftest.$ac_ext
8366cat >>conftest.$ac_ext <<_ACEOF
8367/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008368$ac_includes_default
Skip Montanaro89e975f2007-08-22 19:05:21 +00008369long longval () { return (long) (sizeof (float)); }
8370unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008371#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008372#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008373int
8374main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008375{
Martin v. Löwis11437992002-04-12 09:54:03 +00008376
8377 FILE *f = fopen ("conftest.val", "w");
8378 if (! f)
Skip Montanaro89e975f2007-08-22 19:05:21 +00008379 exit (1);
8380 if (((long) (sizeof (float))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008381 {
Skip Montanaro89e975f2007-08-22 19:05:21 +00008382 long i = longval ();
8383 if (i != ((long) (sizeof (float))))
8384 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00008385 fprintf (f, "%ld\n", i);
8386 }
8387 else
8388 {
Skip Montanaro89e975f2007-08-22 19:05:21 +00008389 unsigned long i = ulongval ();
8390 if (i != ((long) (sizeof (float))))
8391 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00008392 fprintf (f, "%lu\n", i);
8393 }
Skip Montanaro89e975f2007-08-22 19:05:21 +00008394 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis11437992002-04-12 09:54:03 +00008395
8396 ;
8397 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008398}
Martin v. Löwis11437992002-04-12 09:54:03 +00008399_ACEOF
8400rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00008401if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8402 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008403 ac_status=$?
8404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8405 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +00008406 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8407 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008408 ac_status=$?
8409 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8410 (exit $ac_status); }; }; then
8411 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008412else
Martin v. Löwis11437992002-04-12 09:54:03 +00008413 echo "$as_me: program exited with status $ac_status" >&5
8414echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008415sed 's/^/| /' conftest.$ac_ext >&5
8416
Martin v. Löwis11437992002-04-12 09:54:03 +00008417( exit $ac_status )
Skip Montanaro89e975f2007-08-22 19:05:21 +00008418{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00008419See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00008420echo "$as_me: error: cannot compute sizeof (float), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00008421See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +00008422 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008423fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008424rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8425fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008426fi
8427rm -f conftest.val
Skip Montanaro89e975f2007-08-22 19:05:21 +00008428else
8429 ac_cv_sizeof_float=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00008430fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008431fi
8432echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8433echo "${ECHO_T}$ac_cv_sizeof_float" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008434cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008435#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008436_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008437
8438
Skip Montanaro89e975f2007-08-22 19:05:21 +00008439echo "$as_me:$LINENO: checking for double" >&5
8440echo $ECHO_N "checking for double... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008441if test "${ac_cv_type_double+set}" = set; then
8442 echo $ECHO_N "(cached) $ECHO_C" >&6
8443else
8444 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008445/* confdefs.h. */
8446_ACEOF
8447cat confdefs.h >>conftest.$ac_ext
8448cat >>conftest.$ac_ext <<_ACEOF
8449/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008450$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008451int
8452main ()
8453{
Skip Montanaro89e975f2007-08-22 19:05:21 +00008454if ((double *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008455 return 0;
Skip Montanaro89e975f2007-08-22 19:05:21 +00008456if (sizeof (double))
Martin v. Löwis11437992002-04-12 09:54:03 +00008457 return 0;
8458 ;
8459 return 0;
8460}
8461_ACEOF
8462rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00008463if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8464 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008466 grep -v '^ *+' conftest.er1 >conftest.err
8467 rm -f conftest.er1
8468 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00008470 (exit $ac_status); } &&
8471 { ac_try='test -z "$ac_c_werror_flag"
8472 || test ! -s conftest.err'
8473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8474 (eval $ac_try) 2>&5
8475 ac_status=$?
8476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8477 (exit $ac_status); }; } &&
8478 { ac_try='test -s conftest.$ac_objext'
8479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8480 (eval $ac_try) 2>&5
8481 ac_status=$?
8482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8483 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008484 ac_cv_type_double=yes
8485else
8486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008487sed 's/^/| /' conftest.$ac_ext >&5
8488
Skip Montanaro89e975f2007-08-22 19:05:21 +00008489ac_cv_type_double=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008490fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008491rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon19fab762007-06-02 03:02:29 +00008492fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008493echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8494echo "${ECHO_T}$ac_cv_type_double" >&6
Brett Cannon19fab762007-06-02 03:02:29 +00008495
Skip Montanaro89e975f2007-08-22 19:05:21 +00008496echo "$as_me:$LINENO: checking size of double" >&5
8497echo $ECHO_N "checking size of double... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008498if test "${ac_cv_sizeof_double+set}" = set; then
8499 echo $ECHO_N "(cached) $ECHO_C" >&6
8500else
Skip Montanaro89e975f2007-08-22 19:05:21 +00008501 if test "$ac_cv_type_double" = yes; then
8502 # The cast to unsigned long works around a bug in the HP C Compiler
8503 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8504 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8505 # This bug is HP SR number 8606223364.
Martin v. Löwis11437992002-04-12 09:54:03 +00008506 if test "$cross_compiling" = yes; then
8507 # Depending upon the size, compute the lo and hi bounds.
8508cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008509/* confdefs.h. */
8510_ACEOF
8511cat confdefs.h >>conftest.$ac_ext
8512cat >>conftest.$ac_ext <<_ACEOF
8513/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008514$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008515int
8516main ()
8517{
Skip Montanaro89e975f2007-08-22 19:05:21 +00008518static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008519test_array [0] = 0
8520
8521 ;
8522 return 0;
8523}
8524_ACEOF
8525rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00008526if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8527 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008528 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008529 grep -v '^ *+' conftest.er1 >conftest.err
8530 rm -f conftest.er1
8531 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00008533 (exit $ac_status); } &&
8534 { ac_try='test -z "$ac_c_werror_flag"
8535 || test ! -s conftest.err'
8536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8537 (eval $ac_try) 2>&5
8538 ac_status=$?
8539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8540 (exit $ac_status); }; } &&
8541 { ac_try='test -s conftest.$ac_objext'
8542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8543 (eval $ac_try) 2>&5
8544 ac_status=$?
8545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8546 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008547 ac_lo=0 ac_mid=0
8548 while :; do
8549 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008550/* confdefs.h. */
8551_ACEOF
8552cat confdefs.h >>conftest.$ac_ext
8553cat >>conftest.$ac_ext <<_ACEOF
8554/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008555$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008556int
8557main ()
8558{
Skip Montanaro89e975f2007-08-22 19:05:21 +00008559static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008560test_array [0] = 0
8561
8562 ;
8563 return 0;
8564}
8565_ACEOF
8566rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00008567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8568 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008570 grep -v '^ *+' conftest.er1 >conftest.err
8571 rm -f conftest.er1
8572 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00008574 (exit $ac_status); } &&
8575 { ac_try='test -z "$ac_c_werror_flag"
8576 || test ! -s conftest.err'
8577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8578 (eval $ac_try) 2>&5
8579 ac_status=$?
8580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8581 (exit $ac_status); }; } &&
8582 { ac_try='test -s conftest.$ac_objext'
8583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8584 (eval $ac_try) 2>&5
8585 ac_status=$?
8586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8587 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008588 ac_hi=$ac_mid; break
8589else
8590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008591sed 's/^/| /' conftest.$ac_ext >&5
8592
Skip Montanaro89e975f2007-08-22 19:05:21 +00008593ac_lo=`expr $ac_mid + 1`
8594 if test $ac_lo -le $ac_mid; then
8595 ac_lo= ac_hi=
8596 break
8597 fi
8598 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008599fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008600rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008601 done
8602else
8603 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008604sed 's/^/| /' conftest.$ac_ext >&5
8605
Skip Montanaro89e975f2007-08-22 19:05:21 +00008606cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008607/* confdefs.h. */
8608_ACEOF
8609cat confdefs.h >>conftest.$ac_ext
8610cat >>conftest.$ac_ext <<_ACEOF
8611/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008612$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008613int
8614main ()
8615{
Skip Montanaro89e975f2007-08-22 19:05:21 +00008616static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008617test_array [0] = 0
8618
8619 ;
8620 return 0;
8621}
8622_ACEOF
8623rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00008624if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8625 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008626 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008627 grep -v '^ *+' conftest.er1 >conftest.err
8628 rm -f conftest.er1
8629 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00008631 (exit $ac_status); } &&
8632 { ac_try='test -z "$ac_c_werror_flag"
8633 || test ! -s conftest.err'
8634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8635 (eval $ac_try) 2>&5
8636 ac_status=$?
8637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8638 (exit $ac_status); }; } &&
8639 { ac_try='test -s conftest.$ac_objext'
8640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8641 (eval $ac_try) 2>&5
8642 ac_status=$?
8643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8644 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008645 ac_hi=-1 ac_mid=-1
8646 while :; do
8647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008648/* confdefs.h. */
8649_ACEOF
8650cat confdefs.h >>conftest.$ac_ext
8651cat >>conftest.$ac_ext <<_ACEOF
8652/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008653$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008654int
8655main ()
8656{
Skip Montanaro89e975f2007-08-22 19:05:21 +00008657static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008658test_array [0] = 0
8659
8660 ;
8661 return 0;
8662}
8663_ACEOF
8664rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00008665if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8666 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008668 grep -v '^ *+' conftest.er1 >conftest.err
8669 rm -f conftest.er1
8670 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00008672 (exit $ac_status); } &&
8673 { ac_try='test -z "$ac_c_werror_flag"
8674 || test ! -s conftest.err'
8675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8676 (eval $ac_try) 2>&5
8677 ac_status=$?
8678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8679 (exit $ac_status); }; } &&
8680 { ac_try='test -s conftest.$ac_objext'
8681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8682 (eval $ac_try) 2>&5
8683 ac_status=$?
8684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8685 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008686 ac_lo=$ac_mid; break
8687else
8688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008689sed 's/^/| /' conftest.$ac_ext >&5
8690
Skip Montanaro89e975f2007-08-22 19:05:21 +00008691ac_hi=`expr '(' $ac_mid ')' - 1`
8692 if test $ac_mid -le $ac_hi; then
8693 ac_lo= ac_hi=
8694 break
8695 fi
8696 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008697fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008698rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008699 done
8700else
8701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008702sed 's/^/| /' conftest.$ac_ext >&5
8703
Skip Montanaro89e975f2007-08-22 19:05:21 +00008704ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008705fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008706rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008707fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008708rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008709# Binary search between lo and hi bounds.
8710while test "x$ac_lo" != "x$ac_hi"; do
8711 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008713/* confdefs.h. */
8714_ACEOF
8715cat confdefs.h >>conftest.$ac_ext
8716cat >>conftest.$ac_ext <<_ACEOF
8717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008718$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008719int
8720main ()
8721{
Skip Montanaro89e975f2007-08-22 19:05:21 +00008722static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008723test_array [0] = 0
8724
8725 ;
8726 return 0;
8727}
8728_ACEOF
8729rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00008730if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8731 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008733 grep -v '^ *+' conftest.er1 >conftest.err
8734 rm -f conftest.er1
8735 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00008737 (exit $ac_status); } &&
8738 { ac_try='test -z "$ac_c_werror_flag"
8739 || test ! -s conftest.err'
8740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8741 (eval $ac_try) 2>&5
8742 ac_status=$?
8743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8744 (exit $ac_status); }; } &&
8745 { ac_try='test -s conftest.$ac_objext'
8746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8747 (eval $ac_try) 2>&5
8748 ac_status=$?
8749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8750 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008751 ac_hi=$ac_mid
8752else
8753 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008754sed 's/^/| /' conftest.$ac_ext >&5
8755
Skip Montanaro89e975f2007-08-22 19:05:21 +00008756ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008757fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008758rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008759done
8760case $ac_lo in
8761?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro89e975f2007-08-22 19:05:21 +00008762'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00008763See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00008764echo "$as_me: error: cannot compute sizeof (double), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00008765See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +00008766 { (exit 1); exit 1; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008767esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008768else
Skip Montanaro89e975f2007-08-22 19:05:21 +00008769 if test "$cross_compiling" = yes; then
8770 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8771See \`config.log' for more details." >&5
8772echo "$as_me: error: cannot run test program while cross compiling
8773See \`config.log' for more details." >&2;}
8774 { (exit 1); exit 1; }; }
8775else
Martin v. Löwis11437992002-04-12 09:54:03 +00008776 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008777/* confdefs.h. */
8778_ACEOF
8779cat confdefs.h >>conftest.$ac_ext
8780cat >>conftest.$ac_ext <<_ACEOF
8781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008782$ac_includes_default
Skip Montanaro89e975f2007-08-22 19:05:21 +00008783long longval () { return (long) (sizeof (double)); }
8784unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008785#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008786#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008787int
8788main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008789{
Martin v. Löwis11437992002-04-12 09:54:03 +00008790
8791 FILE *f = fopen ("conftest.val", "w");
8792 if (! f)
Skip Montanaro89e975f2007-08-22 19:05:21 +00008793 exit (1);
8794 if (((long) (sizeof (double))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008795 {
Skip Montanaro89e975f2007-08-22 19:05:21 +00008796 long i = longval ();
8797 if (i != ((long) (sizeof (double))))
8798 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00008799 fprintf (f, "%ld\n", i);
8800 }
8801 else
8802 {
Skip Montanaro89e975f2007-08-22 19:05:21 +00008803 unsigned long i = ulongval ();
8804 if (i != ((long) (sizeof (double))))
8805 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00008806 fprintf (f, "%lu\n", i);
8807 }
Skip Montanaro89e975f2007-08-22 19:05:21 +00008808 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis11437992002-04-12 09:54:03 +00008809
8810 ;
8811 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008812}
Martin v. Löwis11437992002-04-12 09:54:03 +00008813_ACEOF
8814rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00008815if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8816 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008817 ac_status=$?
8818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8819 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +00008820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8821 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008822 ac_status=$?
8823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8824 (exit $ac_status); }; }; then
8825 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008826else
Martin v. Löwis11437992002-04-12 09:54:03 +00008827 echo "$as_me: program exited with status $ac_status" >&5
8828echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008829sed 's/^/| /' conftest.$ac_ext >&5
8830
Martin v. Löwis11437992002-04-12 09:54:03 +00008831( exit $ac_status )
Skip Montanaro89e975f2007-08-22 19:05:21 +00008832{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00008833See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00008834echo "$as_me: error: cannot compute sizeof (double), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00008835See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +00008836 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008837fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008838rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
8839fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008840fi
8841rm -f conftest.val
Skip Montanaro89e975f2007-08-22 19:05:21 +00008842else
8843 ac_cv_sizeof_double=0
Guido van Rossumef2255b2000-03-10 22:30:29 +00008844fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008845fi
8846echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8847echo "${ECHO_T}$ac_cv_sizeof_double" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008848cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008849#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008850_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008851
8852
Skip Montanaro89e975f2007-08-22 19:05:21 +00008853echo "$as_me:$LINENO: checking for fpos_t" >&5
8854echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008855if test "${ac_cv_type_fpos_t+set}" = set; then
8856 echo $ECHO_N "(cached) $ECHO_C" >&6
8857else
8858 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008859/* confdefs.h. */
8860_ACEOF
8861cat confdefs.h >>conftest.$ac_ext
8862cat >>conftest.$ac_ext <<_ACEOF
8863/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008864$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008865int
8866main ()
8867{
Skip Montanaro89e975f2007-08-22 19:05:21 +00008868if ((fpos_t *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008869 return 0;
Skip Montanaro89e975f2007-08-22 19:05:21 +00008870if (sizeof (fpos_t))
Martin v. Löwis11437992002-04-12 09:54:03 +00008871 return 0;
8872 ;
8873 return 0;
8874}
8875_ACEOF
8876rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00008877if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8878 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008879 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008880 grep -v '^ *+' conftest.er1 >conftest.err
8881 rm -f conftest.er1
8882 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00008884 (exit $ac_status); } &&
8885 { ac_try='test -z "$ac_c_werror_flag"
8886 || test ! -s conftest.err'
8887 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8888 (eval $ac_try) 2>&5
8889 ac_status=$?
8890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8891 (exit $ac_status); }; } &&
8892 { ac_try='test -s conftest.$ac_objext'
8893 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8894 (eval $ac_try) 2>&5
8895 ac_status=$?
8896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8897 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008898 ac_cv_type_fpos_t=yes
8899else
8900 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008901sed 's/^/| /' conftest.$ac_ext >&5
8902
Skip Montanaro89e975f2007-08-22 19:05:21 +00008903ac_cv_type_fpos_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008904fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008905rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon19fab762007-06-02 03:02:29 +00008906fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00008907echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8908echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
Brett Cannon19fab762007-06-02 03:02:29 +00008909
Skip Montanaro89e975f2007-08-22 19:05:21 +00008910echo "$as_me:$LINENO: checking size of fpos_t" >&5
8911echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008912if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8913 echo $ECHO_N "(cached) $ECHO_C" >&6
8914else
Skip Montanaro89e975f2007-08-22 19:05:21 +00008915 if test "$ac_cv_type_fpos_t" = yes; then
8916 # The cast to unsigned long works around a bug in the HP C Compiler
8917 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8918 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8919 # This bug is HP SR number 8606223364.
Martin v. Löwis11437992002-04-12 09:54:03 +00008920 if test "$cross_compiling" = yes; then
8921 # Depending upon the size, compute the lo and hi bounds.
8922cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008923/* confdefs.h. */
8924_ACEOF
8925cat confdefs.h >>conftest.$ac_ext
8926cat >>conftest.$ac_ext <<_ACEOF
8927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008928$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008929int
8930main ()
8931{
Skip Montanaro89e975f2007-08-22 19:05:21 +00008932static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008933test_array [0] = 0
8934
8935 ;
8936 return 0;
8937}
8938_ACEOF
8939rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00008940if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8941 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008943 grep -v '^ *+' conftest.er1 >conftest.err
8944 rm -f conftest.er1
8945 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00008947 (exit $ac_status); } &&
8948 { ac_try='test -z "$ac_c_werror_flag"
8949 || test ! -s conftest.err'
8950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8951 (eval $ac_try) 2>&5
8952 ac_status=$?
8953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8954 (exit $ac_status); }; } &&
8955 { ac_try='test -s conftest.$ac_objext'
8956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8957 (eval $ac_try) 2>&5
8958 ac_status=$?
8959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8960 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008961 ac_lo=0 ac_mid=0
8962 while :; do
8963 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008964/* confdefs.h. */
8965_ACEOF
8966cat confdefs.h >>conftest.$ac_ext
8967cat >>conftest.$ac_ext <<_ACEOF
8968/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008969$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008970int
8971main ()
8972{
Skip Montanaro89e975f2007-08-22 19:05:21 +00008973static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008974test_array [0] = 0
8975
8976 ;
8977 return 0;
8978}
8979_ACEOF
8980rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00008981if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
8982 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008984 grep -v '^ *+' conftest.er1 >conftest.err
8985 rm -f conftest.er1
8986 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00008988 (exit $ac_status); } &&
8989 { ac_try='test -z "$ac_c_werror_flag"
8990 || test ! -s conftest.err'
8991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8992 (eval $ac_try) 2>&5
8993 ac_status=$?
8994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8995 (exit $ac_status); }; } &&
8996 { ac_try='test -s conftest.$ac_objext'
8997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8998 (eval $ac_try) 2>&5
8999 ac_status=$?
9000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9001 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009002 ac_hi=$ac_mid; break
9003else
9004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009005sed 's/^/| /' conftest.$ac_ext >&5
9006
Skip Montanaro89e975f2007-08-22 19:05:21 +00009007ac_lo=`expr $ac_mid + 1`
9008 if test $ac_lo -le $ac_mid; then
9009 ac_lo= ac_hi=
9010 break
9011 fi
9012 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009013fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009014rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009015 done
9016else
9017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009018sed 's/^/| /' conftest.$ac_ext >&5
9019
Skip Montanaro89e975f2007-08-22 19:05:21 +00009020cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009021/* confdefs.h. */
9022_ACEOF
9023cat confdefs.h >>conftest.$ac_ext
9024cat >>conftest.$ac_ext <<_ACEOF
9025/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009026$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009027int
9028main ()
9029{
Skip Montanaro89e975f2007-08-22 19:05:21 +00009030static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009031test_array [0] = 0
9032
9033 ;
9034 return 0;
9035}
9036_ACEOF
9037rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00009038if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9039 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009040 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009041 grep -v '^ *+' conftest.er1 >conftest.err
9042 rm -f conftest.er1
9043 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00009045 (exit $ac_status); } &&
9046 { ac_try='test -z "$ac_c_werror_flag"
9047 || test ! -s conftest.err'
9048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9049 (eval $ac_try) 2>&5
9050 ac_status=$?
9051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9052 (exit $ac_status); }; } &&
9053 { ac_try='test -s conftest.$ac_objext'
9054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9055 (eval $ac_try) 2>&5
9056 ac_status=$?
9057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9058 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009059 ac_hi=-1 ac_mid=-1
9060 while :; do
9061 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009062/* confdefs.h. */
9063_ACEOF
9064cat confdefs.h >>conftest.$ac_ext
9065cat >>conftest.$ac_ext <<_ACEOF
9066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009067$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009068int
9069main ()
9070{
Skip Montanaro89e975f2007-08-22 19:05:21 +00009071static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009072test_array [0] = 0
9073
9074 ;
9075 return 0;
9076}
9077_ACEOF
9078rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00009079if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9080 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009082 grep -v '^ *+' conftest.er1 >conftest.err
9083 rm -f conftest.er1
9084 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00009086 (exit $ac_status); } &&
9087 { ac_try='test -z "$ac_c_werror_flag"
9088 || test ! -s conftest.err'
9089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9090 (eval $ac_try) 2>&5
9091 ac_status=$?
9092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9093 (exit $ac_status); }; } &&
9094 { ac_try='test -s conftest.$ac_objext'
9095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9096 (eval $ac_try) 2>&5
9097 ac_status=$?
9098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9099 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009100 ac_lo=$ac_mid; break
9101else
9102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009103sed 's/^/| /' conftest.$ac_ext >&5
9104
Skip Montanaro89e975f2007-08-22 19:05:21 +00009105ac_hi=`expr '(' $ac_mid ')' - 1`
9106 if test $ac_mid -le $ac_hi; then
9107 ac_lo= ac_hi=
9108 break
9109 fi
9110 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009111fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009112rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009113 done
9114else
9115 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009116sed 's/^/| /' conftest.$ac_ext >&5
9117
Skip Montanaro89e975f2007-08-22 19:05:21 +00009118ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009119fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009120rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009121fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009122rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009123# Binary search between lo and hi bounds.
9124while test "x$ac_lo" != "x$ac_hi"; do
9125 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9126 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009127/* confdefs.h. */
9128_ACEOF
9129cat confdefs.h >>conftest.$ac_ext
9130cat >>conftest.$ac_ext <<_ACEOF
9131/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009132$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009133int
9134main ()
9135{
Skip Montanaro89e975f2007-08-22 19:05:21 +00009136static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009137test_array [0] = 0
9138
9139 ;
9140 return 0;
9141}
9142_ACEOF
9143rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00009144if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9145 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009147 grep -v '^ *+' conftest.er1 >conftest.err
9148 rm -f conftest.er1
9149 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00009151 (exit $ac_status); } &&
9152 { ac_try='test -z "$ac_c_werror_flag"
9153 || test ! -s conftest.err'
9154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9155 (eval $ac_try) 2>&5
9156 ac_status=$?
9157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9158 (exit $ac_status); }; } &&
9159 { ac_try='test -s conftest.$ac_objext'
9160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9161 (eval $ac_try) 2>&5
9162 ac_status=$?
9163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9164 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009165 ac_hi=$ac_mid
9166else
9167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009168sed 's/^/| /' conftest.$ac_ext >&5
9169
Skip Montanaro89e975f2007-08-22 19:05:21 +00009170ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009171fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009172rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009173done
9174case $ac_lo in
9175?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro89e975f2007-08-22 19:05:21 +00009176'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00009177See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00009178echo "$as_me: error: cannot compute sizeof (fpos_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00009179See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +00009180 { (exit 1); exit 1; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009181esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009182else
Skip Montanaro89e975f2007-08-22 19:05:21 +00009183 if test "$cross_compiling" = yes; then
9184 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9185See \`config.log' for more details." >&5
9186echo "$as_me: error: cannot run test program while cross compiling
9187See \`config.log' for more details." >&2;}
9188 { (exit 1); exit 1; }; }
9189else
Martin v. Löwis11437992002-04-12 09:54:03 +00009190 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009191/* confdefs.h. */
9192_ACEOF
9193cat confdefs.h >>conftest.$ac_ext
9194cat >>conftest.$ac_ext <<_ACEOF
9195/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009196$ac_includes_default
Skip Montanaro89e975f2007-08-22 19:05:21 +00009197long longval () { return (long) (sizeof (fpos_t)); }
9198unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009199#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009200#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009201int
9202main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009203{
Martin v. Löwis11437992002-04-12 09:54:03 +00009204
9205 FILE *f = fopen ("conftest.val", "w");
9206 if (! f)
Skip Montanaro89e975f2007-08-22 19:05:21 +00009207 exit (1);
9208 if (((long) (sizeof (fpos_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 {
Skip Montanaro89e975f2007-08-22 19:05:21 +00009210 long i = longval ();
9211 if (i != ((long) (sizeof (fpos_t))))
9212 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00009213 fprintf (f, "%ld\n", i);
9214 }
9215 else
9216 {
Skip Montanaro89e975f2007-08-22 19:05:21 +00009217 unsigned long i = ulongval ();
9218 if (i != ((long) (sizeof (fpos_t))))
9219 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +00009220 fprintf (f, "%lu\n", i);
9221 }
Skip Montanaro89e975f2007-08-22 19:05:21 +00009222 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis11437992002-04-12 09:54:03 +00009223
9224 ;
9225 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009226}
Martin v. Löwis11437992002-04-12 09:54:03 +00009227_ACEOF
9228rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00009229if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9230 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009231 ac_status=$?
9232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9233 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +00009234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9235 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009236 ac_status=$?
9237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9238 (exit $ac_status); }; }; then
9239 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009240else
Martin v. Löwis11437992002-04-12 09:54:03 +00009241 echo "$as_me: program exited with status $ac_status" >&5
9242echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009243sed 's/^/| /' conftest.$ac_ext >&5
9244
Martin v. Löwis11437992002-04-12 09:54:03 +00009245( exit $ac_status )
Skip Montanaro89e975f2007-08-22 19:05:21 +00009246{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00009247See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00009248echo "$as_me: error: cannot compute sizeof (fpos_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +00009249See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +00009250 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009251fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009252rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9253fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009254fi
9255rm -f conftest.val
Skip Montanaro89e975f2007-08-22 19:05:21 +00009256else
9257 ac_cv_sizeof_fpos_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009258fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009259fi
9260echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
9261echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009262cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009263#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009264_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009265
Michael W. Hudson54241132001-12-07 15:38:26 +00009266
Skip Montanaro89e975f2007-08-22 19:05:21 +00009267echo "$as_me:$LINENO: checking for size_t" >&5
9268echo $ECHO_N "checking for size_t... $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00009269if test "${ac_cv_type_size_t+set}" = set; then
9270 echo $ECHO_N "(cached) $ECHO_C" >&6
9271else
9272 cat >conftest.$ac_ext <<_ACEOF
9273/* confdefs.h. */
9274_ACEOF
9275cat confdefs.h >>conftest.$ac_ext
9276cat >>conftest.$ac_ext <<_ACEOF
9277/* end confdefs.h. */
9278$ac_includes_default
9279int
9280main ()
9281{
Skip Montanaro89e975f2007-08-22 19:05:21 +00009282if ((size_t *) 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009283 return 0;
Skip Montanaro89e975f2007-08-22 19:05:21 +00009284if (sizeof (size_t))
Martin v. Löwis18e16552006-02-15 17:27:45 +00009285 return 0;
9286 ;
9287 return 0;
9288}
9289_ACEOF
9290rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00009291if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9292 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009293 ac_status=$?
9294 grep -v '^ *+' conftest.er1 >conftest.err
9295 rm -f conftest.er1
9296 cat conftest.err >&5
9297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00009298 (exit $ac_status); } &&
9299 { ac_try='test -z "$ac_c_werror_flag"
9300 || test ! -s conftest.err'
9301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9302 (eval $ac_try) 2>&5
9303 ac_status=$?
9304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9305 (exit $ac_status); }; } &&
9306 { ac_try='test -s conftest.$ac_objext'
9307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9308 (eval $ac_try) 2>&5
9309 ac_status=$?
9310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9311 (exit $ac_status); }; }; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009312 ac_cv_type_size_t=yes
9313else
9314 echo "$as_me: failed program was:" >&5
9315sed 's/^/| /' conftest.$ac_ext >&5
9316
Skip Montanaro89e975f2007-08-22 19:05:21 +00009317ac_cv_type_size_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00009318fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009319rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon19fab762007-06-02 03:02:29 +00009320fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009321echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
9322echo "${ECHO_T}$ac_cv_type_size_t" >&6
Brett Cannon19fab762007-06-02 03:02:29 +00009323
Skip Montanaro89e975f2007-08-22 19:05:21 +00009324echo "$as_me:$LINENO: checking size of size_t" >&5
9325echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00009326if test "${ac_cv_sizeof_size_t+set}" = set; then
9327 echo $ECHO_N "(cached) $ECHO_C" >&6
9328else
Skip Montanaro89e975f2007-08-22 19:05:21 +00009329 if test "$ac_cv_type_size_t" = yes; then
9330 # The cast to unsigned long works around a bug in the HP C Compiler
9331 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9332 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9333 # This bug is HP SR number 8606223364.
Martin v. Löwis18e16552006-02-15 17:27:45 +00009334 if test "$cross_compiling" = yes; then
9335 # Depending upon the size, compute the lo and hi bounds.
9336cat >conftest.$ac_ext <<_ACEOF
9337/* confdefs.h. */
9338_ACEOF
9339cat confdefs.h >>conftest.$ac_ext
9340cat >>conftest.$ac_ext <<_ACEOF
9341/* end confdefs.h. */
9342$ac_includes_default
9343int
9344main ()
9345{
Skip Montanaro89e975f2007-08-22 19:05:21 +00009346static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009347test_array [0] = 0
9348
9349 ;
9350 return 0;
9351}
9352_ACEOF
9353rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00009354if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9355 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009356 ac_status=$?
9357 grep -v '^ *+' conftest.er1 >conftest.err
9358 rm -f conftest.er1
9359 cat conftest.err >&5
9360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00009361 (exit $ac_status); } &&
9362 { ac_try='test -z "$ac_c_werror_flag"
9363 || test ! -s conftest.err'
9364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9365 (eval $ac_try) 2>&5
9366 ac_status=$?
9367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9368 (exit $ac_status); }; } &&
9369 { ac_try='test -s conftest.$ac_objext'
9370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9371 (eval $ac_try) 2>&5
9372 ac_status=$?
9373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9374 (exit $ac_status); }; }; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009375 ac_lo=0 ac_mid=0
9376 while :; do
9377 cat >conftest.$ac_ext <<_ACEOF
9378/* confdefs.h. */
9379_ACEOF
9380cat confdefs.h >>conftest.$ac_ext
9381cat >>conftest.$ac_ext <<_ACEOF
9382/* end confdefs.h. */
9383$ac_includes_default
9384int
9385main ()
9386{
Skip Montanaro89e975f2007-08-22 19:05:21 +00009387static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009388test_array [0] = 0
9389
9390 ;
9391 return 0;
9392}
9393_ACEOF
9394rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00009395if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9396 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009397 ac_status=$?
9398 grep -v '^ *+' conftest.er1 >conftest.err
9399 rm -f conftest.er1
9400 cat conftest.err >&5
9401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00009402 (exit $ac_status); } &&
9403 { ac_try='test -z "$ac_c_werror_flag"
9404 || test ! -s conftest.err'
9405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9406 (eval $ac_try) 2>&5
9407 ac_status=$?
9408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9409 (exit $ac_status); }; } &&
9410 { ac_try='test -s conftest.$ac_objext'
9411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9412 (eval $ac_try) 2>&5
9413 ac_status=$?
9414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9415 (exit $ac_status); }; }; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009416 ac_hi=$ac_mid; break
9417else
9418 echo "$as_me: failed program was:" >&5
9419sed 's/^/| /' conftest.$ac_ext >&5
9420
Skip Montanaro89e975f2007-08-22 19:05:21 +00009421ac_lo=`expr $ac_mid + 1`
9422 if test $ac_lo -le $ac_mid; then
9423 ac_lo= ac_hi=
9424 break
9425 fi
9426 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009427fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009428rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009429 done
9430else
9431 echo "$as_me: failed program was:" >&5
9432sed 's/^/| /' conftest.$ac_ext >&5
9433
Skip Montanaro89e975f2007-08-22 19:05:21 +00009434cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00009435/* confdefs.h. */
9436_ACEOF
9437cat confdefs.h >>conftest.$ac_ext
9438cat >>conftest.$ac_ext <<_ACEOF
9439/* end confdefs.h. */
9440$ac_includes_default
9441int
9442main ()
9443{
Skip Montanaro89e975f2007-08-22 19:05:21 +00009444static int test_array [1 - 2 * !(((long) (sizeof (size_t))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009445test_array [0] = 0
9446
9447 ;
9448 return 0;
9449}
9450_ACEOF
9451rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00009452if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9453 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009454 ac_status=$?
9455 grep -v '^ *+' conftest.er1 >conftest.err
9456 rm -f conftest.er1
9457 cat conftest.err >&5
9458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00009459 (exit $ac_status); } &&
9460 { ac_try='test -z "$ac_c_werror_flag"
9461 || test ! -s conftest.err'
9462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9463 (eval $ac_try) 2>&5
9464 ac_status=$?
9465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9466 (exit $ac_status); }; } &&
9467 { ac_try='test -s conftest.$ac_objext'
9468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9469 (eval $ac_try) 2>&5
9470 ac_status=$?
9471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9472 (exit $ac_status); }; }; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009473 ac_hi=-1 ac_mid=-1
9474 while :; do
9475 cat >conftest.$ac_ext <<_ACEOF
9476/* confdefs.h. */
9477_ACEOF
9478cat confdefs.h >>conftest.$ac_ext
9479cat >>conftest.$ac_ext <<_ACEOF
9480/* end confdefs.h. */
9481$ac_includes_default
9482int
9483main ()
9484{
Skip Montanaro89e975f2007-08-22 19:05:21 +00009485static int test_array [1 - 2 * !(((long) (sizeof (size_t))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009486test_array [0] = 0
9487
9488 ;
9489 return 0;
9490}
9491_ACEOF
9492rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00009493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9494 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009495 ac_status=$?
9496 grep -v '^ *+' conftest.er1 >conftest.err
9497 rm -f conftest.er1
9498 cat conftest.err >&5
9499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00009500 (exit $ac_status); } &&
9501 { ac_try='test -z "$ac_c_werror_flag"
9502 || test ! -s conftest.err'
9503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9504 (eval $ac_try) 2>&5
9505 ac_status=$?
9506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9507 (exit $ac_status); }; } &&
9508 { ac_try='test -s conftest.$ac_objext'
9509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9510 (eval $ac_try) 2>&5
9511 ac_status=$?
9512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9513 (exit $ac_status); }; }; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009514 ac_lo=$ac_mid; break
9515else
9516 echo "$as_me: failed program was:" >&5
9517sed 's/^/| /' conftest.$ac_ext >&5
9518
Skip Montanaro89e975f2007-08-22 19:05:21 +00009519ac_hi=`expr '(' $ac_mid ')' - 1`
9520 if test $ac_mid -le $ac_hi; then
9521 ac_lo= ac_hi=
9522 break
9523 fi
9524 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009525fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009526rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009527 done
9528else
9529 echo "$as_me: failed program was:" >&5
9530sed 's/^/| /' conftest.$ac_ext >&5
9531
Skip Montanaro89e975f2007-08-22 19:05:21 +00009532ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +00009533fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009534rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009535fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009536rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009537# Binary search between lo and hi bounds.
9538while test "x$ac_lo" != "x$ac_hi"; do
9539 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9540 cat >conftest.$ac_ext <<_ACEOF
9541/* confdefs.h. */
9542_ACEOF
9543cat confdefs.h >>conftest.$ac_ext
9544cat >>conftest.$ac_ext <<_ACEOF
9545/* end confdefs.h. */
9546$ac_includes_default
9547int
9548main ()
9549{
Skip Montanaro89e975f2007-08-22 19:05:21 +00009550static int test_array [1 - 2 * !(((long) (sizeof (size_t))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +00009551test_array [0] = 0
9552
9553 ;
9554 return 0;
9555}
9556_ACEOF
9557rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00009558if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9559 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00009560 ac_status=$?
9561 grep -v '^ *+' conftest.er1 >conftest.err
9562 rm -f conftest.er1
9563 cat conftest.err >&5
9564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00009565 (exit $ac_status); } &&
9566 { ac_try='test -z "$ac_c_werror_flag"
9567 || test ! -s conftest.err'
9568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9569 (eval $ac_try) 2>&5
9570 ac_status=$?
9571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9572 (exit $ac_status); }; } &&
9573 { ac_try='test -s conftest.$ac_objext'
9574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9575 (eval $ac_try) 2>&5
9576 ac_status=$?
9577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9578 (exit $ac_status); }; }; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00009579 ac_hi=$ac_mid
9580else
9581 echo "$as_me: failed program was:" >&5
9582sed 's/^/| /' conftest.$ac_ext >&5
9583
Skip Montanaro89e975f2007-08-22 19:05:21 +00009584ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +00009585fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009586rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00009587done
9588case $ac_lo in
9589?*) ac_cv_sizeof_size_t=$ac_lo;;
Skip Montanaro89e975f2007-08-22 19:05:21 +00009590'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
Martin v. Löwis18e16552006-02-15 17:27:45 +00009591See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00009592echo "$as_me: error: cannot compute sizeof (size_t), 77
Martin v. Löwis18e16552006-02-15 17:27:45 +00009593See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +00009594 { (exit 1); exit 1; }; } ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +00009595esac
9596else
Skip Montanaro89e975f2007-08-22 19:05:21 +00009597 if test "$cross_compiling" = yes; then
9598 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9599See \`config.log' for more details." >&5
9600echo "$as_me: error: cannot run test program while cross compiling
9601See \`config.log' for more details." >&2;}
9602 { (exit 1); exit 1; }; }
9603else
Martin v. Löwis18e16552006-02-15 17:27:45 +00009604 cat >conftest.$ac_ext <<_ACEOF
9605/* confdefs.h. */
9606_ACEOF
9607cat confdefs.h >>conftest.$ac_ext
9608cat >>conftest.$ac_ext <<_ACEOF
9609/* end confdefs.h. */
9610$ac_includes_default
Skip Montanaro89e975f2007-08-22 19:05:21 +00009611long longval () { return (long) (sizeof (size_t)); }
9612unsigned long ulongval () { return (long) (sizeof (size_t)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009613#include <stdio.h>
9614#include <stdlib.h>
9615int
9616main ()
9617{
9618
9619 FILE *f = fopen ("conftest.val", "w");
9620 if (! f)
Skip Montanaro89e975f2007-08-22 19:05:21 +00009621 exit (1);
9622 if (((long) (sizeof (size_t))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +00009623 {
Skip Montanaro89e975f2007-08-22 19:05:21 +00009624 long i = longval ();
9625 if (i != ((long) (sizeof (size_t))))
9626 exit (1);
Martin v. Löwis18e16552006-02-15 17:27:45 +00009627 fprintf (f, "%ld\n", i);
9628 }
9629 else
9630 {
Skip Montanaro89e975f2007-08-22 19:05:21 +00009631 unsigned long i = ulongval ();
9632 if (i != ((long) (sizeof (size_t))))
9633 exit (1);
Martin v. Löwis18e16552006-02-15 17:27:45 +00009634 fprintf (f, "%lu\n", i);
9635 }
Skip Montanaro89e975f2007-08-22 19:05:21 +00009636 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis18e16552006-02-15 17:27:45 +00009637
9638 ;
9639 return 0;
9640}
9641_ACEOF
9642rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +00009643if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9644 (eval $ac_link) 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00009645 ac_status=$?
9646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9647 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +00009648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9649 (eval $ac_try) 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00009650 ac_status=$?
9651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9652 (exit $ac_status); }; }; then
9653 ac_cv_sizeof_size_t=`cat conftest.val`
9654else
9655 echo "$as_me: program exited with status $ac_status" >&5
9656echo "$as_me: failed program was:" >&5
9657sed 's/^/| /' conftest.$ac_ext >&5
9658
9659( exit $ac_status )
Skip Montanaro89e975f2007-08-22 19:05:21 +00009660{ { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77
Martin v. Löwis18e16552006-02-15 17:27:45 +00009661See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00009662echo "$as_me: error: cannot compute sizeof (size_t), 77
Martin v. Löwis18e16552006-02-15 17:27:45 +00009663See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +00009664 { (exit 1); exit 1; }; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00009665fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009666rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9667fi
Martin v. Löwis18e16552006-02-15 17:27:45 +00009668fi
9669rm -f conftest.val
Skip Montanaro89e975f2007-08-22 19:05:21 +00009670else
9671 ac_cv_sizeof_size_t=0
Martin v. Löwis18e16552006-02-15 17:27:45 +00009672fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009673fi
9674echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
9675echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00009676cat >>confdefs.h <<_ACEOF
9677#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
9678_ACEOF
9679
9680
Michael W. Hudson54241132001-12-07 15:38:26 +00009681
Skip Montanaro89e975f2007-08-22 19:05:21 +00009682echo "$as_me:$LINENO: checking for long long support" >&5
9683echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009684have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009685cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009686/* confdefs.h. */
9687_ACEOF
9688cat confdefs.h >>conftest.$ac_ext
9689cat >>conftest.$ac_ext <<_ACEOF
9690/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009691
Martin v. Löwis11437992002-04-12 09:54:03 +00009692int
9693main ()
9694{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009695long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009696 ;
9697 return 0;
9698}
9699_ACEOF
9700rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00009701if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9702 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009703 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009704 grep -v '^ *+' conftest.er1 >conftest.err
9705 rm -f conftest.er1
9706 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00009708 (exit $ac_status); } &&
9709 { ac_try='test -z "$ac_c_werror_flag"
9710 || test ! -s conftest.err'
9711 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9712 (eval $ac_try) 2>&5
9713 ac_status=$?
9714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9715 (exit $ac_status); }; } &&
9716 { ac_try='test -s conftest.$ac_objext'
9717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9718 (eval $ac_try) 2>&5
9719 ac_status=$?
9720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9721 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009722
9723
9724cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009725#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009726_ACEOF
9727
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009728 have_long_long=yes
9729
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009730else
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009732sed 's/^/| /' conftest.$ac_ext >&5
9733
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009734fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009735rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
9736echo "$as_me:$LINENO: result: $have_long_long" >&5
9737echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009738if test "$have_long_long" = yes ; then
Skip Montanaro89e975f2007-08-22 19:05:21 +00009739echo "$as_me:$LINENO: checking for long long" >&5
9740echo $ECHO_N "checking for long long... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009741if test "${ac_cv_type_long_long+set}" = set; then
9742 echo $ECHO_N "(cached) $ECHO_C" >&6
9743else
9744 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009745/* confdefs.h. */
9746_ACEOF
9747cat confdefs.h >>conftest.$ac_ext
9748cat >>conftest.$ac_ext <<_ACEOF
9749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009750$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009751int
9752main ()
9753{
Skip Montanaro89e975f2007-08-22 19:05:21 +00009754if ((long long *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009755 return 0;
Skip Montanaro89e975f2007-08-22 19:05:21 +00009756if (sizeof (long long))
Martin v. Löwis11437992002-04-12 09:54:03 +00009757 return 0;
9758 ;
9759 return 0;
9760}
9761_ACEOF
9762rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00009763if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9764 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009766 grep -v '^ *+' conftest.er1 >conftest.err
9767 rm -f conftest.er1
9768 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00009770 (exit $ac_status); } &&
9771 { ac_try='test -z "$ac_c_werror_flag"
9772 || test ! -s conftest.err'
9773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9774 (eval $ac_try) 2>&5
9775 ac_status=$?
9776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9777 (exit $ac_status); }; } &&
9778 { ac_try='test -s conftest.$ac_objext'
9779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9780 (eval $ac_try) 2>&5
9781 ac_status=$?
9782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9783 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009784 ac_cv_type_long_long=yes
9785else
9786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009787sed 's/^/| /' conftest.$ac_ext >&5
9788
Skip Montanaro89e975f2007-08-22 19:05:21 +00009789ac_cv_type_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009790fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009791rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon19fab762007-06-02 03:02:29 +00009792fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009793echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
9794echo "${ECHO_T}$ac_cv_type_long_long" >&6
Brett Cannon19fab762007-06-02 03:02:29 +00009795
Skip Montanaro89e975f2007-08-22 19:05:21 +00009796echo "$as_me:$LINENO: checking size of long long" >&5
9797echo $ECHO_N "checking size of long long... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009798if test "${ac_cv_sizeof_long_long+set}" = set; then
9799 echo $ECHO_N "(cached) $ECHO_C" >&6
9800else
Skip Montanaro89e975f2007-08-22 19:05:21 +00009801 if test "$ac_cv_type_long_long" = yes; then
9802 # The cast to unsigned long works around a bug in the HP C Compiler
9803 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9804 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9805 # This bug is HP SR number 8606223364.
Martin v. Löwis11437992002-04-12 09:54:03 +00009806 if test "$cross_compiling" = yes; then
9807 # Depending upon the size, compute the lo and hi bounds.
9808cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009809/* confdefs.h. */
9810_ACEOF
9811cat confdefs.h >>conftest.$ac_ext
9812cat >>conftest.$ac_ext <<_ACEOF
9813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009814$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009815int
9816main ()
9817{
Skip Montanaro89e975f2007-08-22 19:05:21 +00009818static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009819test_array [0] = 0
9820
9821 ;
9822 return 0;
9823}
9824_ACEOF
9825rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00009826if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9827 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009828 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009829 grep -v '^ *+' conftest.er1 >conftest.err
9830 rm -f conftest.er1
9831 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00009833 (exit $ac_status); } &&
9834 { ac_try='test -z "$ac_c_werror_flag"
9835 || test ! -s conftest.err'
9836 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9837 (eval $ac_try) 2>&5
9838 ac_status=$?
9839 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9840 (exit $ac_status); }; } &&
9841 { ac_try='test -s conftest.$ac_objext'
9842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9843 (eval $ac_try) 2>&5
9844 ac_status=$?
9845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9846 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009847 ac_lo=0 ac_mid=0
9848 while :; do
9849 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009850/* confdefs.h. */
9851_ACEOF
9852cat confdefs.h >>conftest.$ac_ext
9853cat >>conftest.$ac_ext <<_ACEOF
9854/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009855$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009856int
9857main ()
9858{
Skip Montanaro89e975f2007-08-22 19:05:21 +00009859static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009860test_array [0] = 0
9861
9862 ;
9863 return 0;
9864}
9865_ACEOF
9866rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00009867if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9868 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009870 grep -v '^ *+' conftest.er1 >conftest.err
9871 rm -f conftest.er1
9872 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00009874 (exit $ac_status); } &&
9875 { ac_try='test -z "$ac_c_werror_flag"
9876 || test ! -s conftest.err'
9877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9878 (eval $ac_try) 2>&5
9879 ac_status=$?
9880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9881 (exit $ac_status); }; } &&
9882 { ac_try='test -s conftest.$ac_objext'
9883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9884 (eval $ac_try) 2>&5
9885 ac_status=$?
9886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9887 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009888 ac_hi=$ac_mid; break
9889else
9890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009891sed 's/^/| /' conftest.$ac_ext >&5
9892
Skip Montanaro89e975f2007-08-22 19:05:21 +00009893ac_lo=`expr $ac_mid + 1`
9894 if test $ac_lo -le $ac_mid; then
9895 ac_lo= ac_hi=
9896 break
9897 fi
9898 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009899fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009900rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009901 done
9902else
9903 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009904sed 's/^/| /' conftest.$ac_ext >&5
9905
Skip Montanaro89e975f2007-08-22 19:05:21 +00009906cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009907/* confdefs.h. */
9908_ACEOF
9909cat confdefs.h >>conftest.$ac_ext
9910cat >>conftest.$ac_ext <<_ACEOF
9911/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009912$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009913int
9914main ()
9915{
Skip Montanaro89e975f2007-08-22 19:05:21 +00009916static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009917test_array [0] = 0
9918
9919 ;
9920 return 0;
9921}
9922_ACEOF
9923rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00009924if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9925 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009927 grep -v '^ *+' conftest.er1 >conftest.err
9928 rm -f conftest.er1
9929 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00009931 (exit $ac_status); } &&
9932 { ac_try='test -z "$ac_c_werror_flag"
9933 || test ! -s conftest.err'
9934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9935 (eval $ac_try) 2>&5
9936 ac_status=$?
9937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9938 (exit $ac_status); }; } &&
9939 { ac_try='test -s conftest.$ac_objext'
9940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9941 (eval $ac_try) 2>&5
9942 ac_status=$?
9943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9944 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009945 ac_hi=-1 ac_mid=-1
9946 while :; do
9947 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009948/* confdefs.h. */
9949_ACEOF
9950cat confdefs.h >>conftest.$ac_ext
9951cat >>conftest.$ac_ext <<_ACEOF
9952/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009953$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009954int
9955main ()
9956{
Skip Montanaro89e975f2007-08-22 19:05:21 +00009957static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009958test_array [0] = 0
9959
9960 ;
9961 return 0;
9962}
9963_ACEOF
9964rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +00009965if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
9966 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009967 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009968 grep -v '^ *+' conftest.er1 >conftest.err
9969 rm -f conftest.er1
9970 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00009972 (exit $ac_status); } &&
9973 { ac_try='test -z "$ac_c_werror_flag"
9974 || test ! -s conftest.err'
9975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9976 (eval $ac_try) 2>&5
9977 ac_status=$?
9978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9979 (exit $ac_status); }; } &&
9980 { ac_try='test -s conftest.$ac_objext'
9981 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9982 (eval $ac_try) 2>&5
9983 ac_status=$?
9984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9985 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009986 ac_lo=$ac_mid; break
9987else
9988 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009989sed 's/^/| /' conftest.$ac_ext >&5
9990
Skip Montanaro89e975f2007-08-22 19:05:21 +00009991ac_hi=`expr '(' $ac_mid ')' - 1`
9992 if test $ac_mid -le $ac_hi; then
9993 ac_lo= ac_hi=
9994 break
9995 fi
9996 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009997fi
Skip Montanaro89e975f2007-08-22 19:05:21 +00009998rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009999 done
10000else
10001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010002sed 's/^/| /' conftest.$ac_ext >&5
10003
Skip Montanaro89e975f2007-08-22 19:05:21 +000010004ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010005fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010006rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010007fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010008rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010009# Binary search between lo and hi bounds.
10010while test "x$ac_lo" != "x$ac_hi"; do
10011 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10012 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010013/* confdefs.h. */
10014_ACEOF
10015cat confdefs.h >>conftest.$ac_ext
10016cat >>conftest.$ac_ext <<_ACEOF
10017/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010018$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010019int
10020main ()
10021{
Skip Montanaro89e975f2007-08-22 19:05:21 +000010022static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010023test_array [0] = 0
10024
10025 ;
10026 return 0;
10027}
10028_ACEOF
10029rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000010030if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10031 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010032 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010033 grep -v '^ *+' conftest.er1 >conftest.err
10034 rm -f conftest.er1
10035 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000010037 (exit $ac_status); } &&
10038 { ac_try='test -z "$ac_c_werror_flag"
10039 || test ! -s conftest.err'
10040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10041 (eval $ac_try) 2>&5
10042 ac_status=$?
10043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10044 (exit $ac_status); }; } &&
10045 { ac_try='test -s conftest.$ac_objext'
10046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10047 (eval $ac_try) 2>&5
10048 ac_status=$?
10049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10050 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010051 ac_hi=$ac_mid
10052else
10053 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010054sed 's/^/| /' conftest.$ac_ext >&5
10055
Skip Montanaro89e975f2007-08-22 19:05:21 +000010056ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010057fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010058rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010059done
10060case $ac_lo in
10061?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro89e975f2007-08-22 19:05:21 +000010062'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000010063See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000010064echo "$as_me: error: cannot compute sizeof (long long), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000010065See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +000010066 { (exit 1); exit 1; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010067esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010068else
Skip Montanaro89e975f2007-08-22 19:05:21 +000010069 if test "$cross_compiling" = yes; then
10070 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
10071See \`config.log' for more details." >&5
10072echo "$as_me: error: cannot run test program while cross compiling
10073See \`config.log' for more details." >&2;}
10074 { (exit 1); exit 1; }; }
10075else
Martin v. Löwis11437992002-04-12 09:54:03 +000010076 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010077/* confdefs.h. */
10078_ACEOF
10079cat confdefs.h >>conftest.$ac_ext
10080cat >>conftest.$ac_ext <<_ACEOF
10081/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010082$ac_includes_default
Skip Montanaro89e975f2007-08-22 19:05:21 +000010083long longval () { return (long) (sizeof (long long)); }
10084unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010085#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010086#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010087int
10088main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010089{
Martin v. Löwis11437992002-04-12 09:54:03 +000010090
10091 FILE *f = fopen ("conftest.val", "w");
10092 if (! f)
Skip Montanaro89e975f2007-08-22 19:05:21 +000010093 exit (1);
10094 if (((long) (sizeof (long long))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010095 {
Skip Montanaro89e975f2007-08-22 19:05:21 +000010096 long i = longval ();
10097 if (i != ((long) (sizeof (long long))))
10098 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +000010099 fprintf (f, "%ld\n", i);
10100 }
10101 else
10102 {
Skip Montanaro89e975f2007-08-22 19:05:21 +000010103 unsigned long i = ulongval ();
10104 if (i != ((long) (sizeof (long long))))
10105 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +000010106 fprintf (f, "%lu\n", i);
10107 }
Skip Montanaro89e975f2007-08-22 19:05:21 +000010108 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000010109
10110 ;
10111 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010112}
Martin v. Löwis11437992002-04-12 09:54:03 +000010113_ACEOF
10114rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000010115if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10116 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010117 ac_status=$?
10118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10119 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +000010120 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10121 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010122 ac_status=$?
10123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10124 (exit $ac_status); }; }; then
10125 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010126else
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 echo "$as_me: program exited with status $ac_status" >&5
10128echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010129sed 's/^/| /' conftest.$ac_ext >&5
10130
Martin v. Löwis11437992002-04-12 09:54:03 +000010131( exit $ac_status )
Skip Montanaro89e975f2007-08-22 19:05:21 +000010132{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000010133See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000010134echo "$as_me: error: cannot compute sizeof (long long), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000010135See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +000010136 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010137fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010138rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10139fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010140fi
10141rm -f conftest.val
Skip Montanaro89e975f2007-08-22 19:05:21 +000010142else
10143 ac_cv_sizeof_long_long=0
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010144fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010145fi
10146echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
10147echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010148cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010149#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000010150_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010151
Michael W. Hudson54241132001-12-07 15:38:26 +000010152
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010153fi
10154
Skip Montanaro89e975f2007-08-22 19:05:21 +000010155echo "$as_me:$LINENO: checking for _Bool support" >&5
10156echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010157have_c99_bool=no
10158cat >conftest.$ac_ext <<_ACEOF
10159/* confdefs.h. */
10160_ACEOF
10161cat confdefs.h >>conftest.$ac_ext
10162cat >>conftest.$ac_ext <<_ACEOF
10163/* end confdefs.h. */
10164
10165int
10166main ()
10167{
10168_Bool x; x = (_Bool)0;
10169 ;
10170 return 0;
10171}
10172_ACEOF
10173rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000010174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10175 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010176 ac_status=$?
10177 grep -v '^ *+' conftest.er1 >conftest.err
10178 rm -f conftest.er1
10179 cat conftest.err >&5
10180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000010181 (exit $ac_status); } &&
10182 { ac_try='test -z "$ac_c_werror_flag"
10183 || test ! -s conftest.err'
10184 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10185 (eval $ac_try) 2>&5
10186 ac_status=$?
10187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10188 (exit $ac_status); }; } &&
10189 { ac_try='test -s conftest.$ac_objext'
10190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10191 (eval $ac_try) 2>&5
10192 ac_status=$?
10193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10194 (exit $ac_status); }; }; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010195
10196
10197cat >>confdefs.h <<\_ACEOF
10198#define HAVE_C99_BOOL 1
10199_ACEOF
10200
10201 have_c99_bool=yes
10202
10203else
10204 echo "$as_me: failed program was:" >&5
10205sed 's/^/| /' conftest.$ac_ext >&5
10206
10207fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010208rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
10209echo "$as_me:$LINENO: result: $have_c99_bool" >&5
10210echo "${ECHO_T}$have_c99_bool" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010211if test "$have_c99_bool" = yes ; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000010212echo "$as_me:$LINENO: checking for _Bool" >&5
10213echo $ECHO_N "checking for _Bool... $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010214if test "${ac_cv_type__Bool+set}" = set; then
10215 echo $ECHO_N "(cached) $ECHO_C" >&6
10216else
10217 cat >conftest.$ac_ext <<_ACEOF
10218/* confdefs.h. */
10219_ACEOF
10220cat confdefs.h >>conftest.$ac_ext
10221cat >>conftest.$ac_ext <<_ACEOF
10222/* end confdefs.h. */
10223$ac_includes_default
10224int
10225main ()
10226{
Skip Montanaro89e975f2007-08-22 19:05:21 +000010227if ((_Bool *) 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010228 return 0;
Skip Montanaro89e975f2007-08-22 19:05:21 +000010229if (sizeof (_Bool))
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010230 return 0;
10231 ;
10232 return 0;
10233}
10234_ACEOF
10235rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000010236if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10237 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010238 ac_status=$?
10239 grep -v '^ *+' conftest.er1 >conftest.err
10240 rm -f conftest.er1
10241 cat conftest.err >&5
10242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000010243 (exit $ac_status); } &&
10244 { ac_try='test -z "$ac_c_werror_flag"
10245 || test ! -s conftest.err'
10246 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10247 (eval $ac_try) 2>&5
10248 ac_status=$?
10249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10250 (exit $ac_status); }; } &&
10251 { ac_try='test -s conftest.$ac_objext'
10252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10253 (eval $ac_try) 2>&5
10254 ac_status=$?
10255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10256 (exit $ac_status); }; }; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010257 ac_cv_type__Bool=yes
10258else
10259 echo "$as_me: failed program was:" >&5
10260sed 's/^/| /' conftest.$ac_ext >&5
10261
Skip Montanaro89e975f2007-08-22 19:05:21 +000010262ac_cv_type__Bool=no
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010263fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010264rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon19fab762007-06-02 03:02:29 +000010265fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010266echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
10267echo "${ECHO_T}$ac_cv_type__Bool" >&6
Brett Cannon19fab762007-06-02 03:02:29 +000010268
Skip Montanaro89e975f2007-08-22 19:05:21 +000010269echo "$as_me:$LINENO: checking size of _Bool" >&5
10270echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010271if test "${ac_cv_sizeof__Bool+set}" = set; then
10272 echo $ECHO_N "(cached) $ECHO_C" >&6
10273else
Skip Montanaro89e975f2007-08-22 19:05:21 +000010274 if test "$ac_cv_type__Bool" = yes; then
10275 # The cast to unsigned long works around a bug in the HP C Compiler
10276 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10277 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10278 # This bug is HP SR number 8606223364.
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010279 if test "$cross_compiling" = yes; then
10280 # Depending upon the size, compute the lo and hi bounds.
10281cat >conftest.$ac_ext <<_ACEOF
10282/* confdefs.h. */
10283_ACEOF
10284cat confdefs.h >>conftest.$ac_ext
10285cat >>conftest.$ac_ext <<_ACEOF
10286/* end confdefs.h. */
10287$ac_includes_default
10288int
10289main ()
10290{
Skip Montanaro89e975f2007-08-22 19:05:21 +000010291static int test_array [1 - 2 * !(((long) (sizeof (_Bool))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010292test_array [0] = 0
10293
10294 ;
10295 return 0;
10296}
10297_ACEOF
10298rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000010299if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10300 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010301 ac_status=$?
10302 grep -v '^ *+' conftest.er1 >conftest.err
10303 rm -f conftest.er1
10304 cat conftest.err >&5
10305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000010306 (exit $ac_status); } &&
10307 { ac_try='test -z "$ac_c_werror_flag"
10308 || test ! -s conftest.err'
10309 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10310 (eval $ac_try) 2>&5
10311 ac_status=$?
10312 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10313 (exit $ac_status); }; } &&
10314 { ac_try='test -s conftest.$ac_objext'
10315 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10316 (eval $ac_try) 2>&5
10317 ac_status=$?
10318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10319 (exit $ac_status); }; }; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010320 ac_lo=0 ac_mid=0
10321 while :; do
10322 cat >conftest.$ac_ext <<_ACEOF
10323/* confdefs.h. */
10324_ACEOF
10325cat confdefs.h >>conftest.$ac_ext
10326cat >>conftest.$ac_ext <<_ACEOF
10327/* end confdefs.h. */
10328$ac_includes_default
10329int
10330main ()
10331{
Skip Montanaro89e975f2007-08-22 19:05:21 +000010332static int test_array [1 - 2 * !(((long) (sizeof (_Bool))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010333test_array [0] = 0
10334
10335 ;
10336 return 0;
10337}
10338_ACEOF
10339rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000010340if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10341 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010342 ac_status=$?
10343 grep -v '^ *+' conftest.er1 >conftest.err
10344 rm -f conftest.er1
10345 cat conftest.err >&5
10346 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000010347 (exit $ac_status); } &&
10348 { ac_try='test -z "$ac_c_werror_flag"
10349 || test ! -s conftest.err'
10350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10351 (eval $ac_try) 2>&5
10352 ac_status=$?
10353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10354 (exit $ac_status); }; } &&
10355 { ac_try='test -s conftest.$ac_objext'
10356 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10357 (eval $ac_try) 2>&5
10358 ac_status=$?
10359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10360 (exit $ac_status); }; }; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010361 ac_hi=$ac_mid; break
10362else
10363 echo "$as_me: failed program was:" >&5
10364sed 's/^/| /' conftest.$ac_ext >&5
10365
Skip Montanaro89e975f2007-08-22 19:05:21 +000010366ac_lo=`expr $ac_mid + 1`
10367 if test $ac_lo -le $ac_mid; then
10368 ac_lo= ac_hi=
10369 break
10370 fi
10371 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010372fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010373rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010374 done
10375else
10376 echo "$as_me: failed program was:" >&5
10377sed 's/^/| /' conftest.$ac_ext >&5
10378
Skip Montanaro89e975f2007-08-22 19:05:21 +000010379cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010380/* confdefs.h. */
10381_ACEOF
10382cat confdefs.h >>conftest.$ac_ext
10383cat >>conftest.$ac_ext <<_ACEOF
10384/* end confdefs.h. */
10385$ac_includes_default
10386int
10387main ()
10388{
Skip Montanaro89e975f2007-08-22 19:05:21 +000010389static int test_array [1 - 2 * !(((long) (sizeof (_Bool))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010390test_array [0] = 0
10391
10392 ;
10393 return 0;
10394}
10395_ACEOF
10396rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000010397if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10398 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010399 ac_status=$?
10400 grep -v '^ *+' conftest.er1 >conftest.err
10401 rm -f conftest.er1
10402 cat conftest.err >&5
10403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000010404 (exit $ac_status); } &&
10405 { ac_try='test -z "$ac_c_werror_flag"
10406 || test ! -s conftest.err'
10407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10408 (eval $ac_try) 2>&5
10409 ac_status=$?
10410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10411 (exit $ac_status); }; } &&
10412 { ac_try='test -s conftest.$ac_objext'
10413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10414 (eval $ac_try) 2>&5
10415 ac_status=$?
10416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10417 (exit $ac_status); }; }; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010418 ac_hi=-1 ac_mid=-1
10419 while :; do
10420 cat >conftest.$ac_ext <<_ACEOF
10421/* confdefs.h. */
10422_ACEOF
10423cat confdefs.h >>conftest.$ac_ext
10424cat >>conftest.$ac_ext <<_ACEOF
10425/* end confdefs.h. */
10426$ac_includes_default
10427int
10428main ()
10429{
Skip Montanaro89e975f2007-08-22 19:05:21 +000010430static int test_array [1 - 2 * !(((long) (sizeof (_Bool))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010431test_array [0] = 0
10432
10433 ;
10434 return 0;
10435}
10436_ACEOF
10437rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000010438if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10439 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010440 ac_status=$?
10441 grep -v '^ *+' conftest.er1 >conftest.err
10442 rm -f conftest.er1
10443 cat conftest.err >&5
10444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000010445 (exit $ac_status); } &&
10446 { ac_try='test -z "$ac_c_werror_flag"
10447 || test ! -s conftest.err'
10448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10449 (eval $ac_try) 2>&5
10450 ac_status=$?
10451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10452 (exit $ac_status); }; } &&
10453 { ac_try='test -s conftest.$ac_objext'
10454 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10455 (eval $ac_try) 2>&5
10456 ac_status=$?
10457 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10458 (exit $ac_status); }; }; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010459 ac_lo=$ac_mid; break
10460else
10461 echo "$as_me: failed program was:" >&5
10462sed 's/^/| /' conftest.$ac_ext >&5
10463
Skip Montanaro89e975f2007-08-22 19:05:21 +000010464ac_hi=`expr '(' $ac_mid ')' - 1`
10465 if test $ac_mid -le $ac_hi; then
10466 ac_lo= ac_hi=
10467 break
10468 fi
10469 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010470fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010471rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010472 done
10473else
10474 echo "$as_me: failed program was:" >&5
10475sed 's/^/| /' conftest.$ac_ext >&5
10476
Skip Montanaro89e975f2007-08-22 19:05:21 +000010477ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010478fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010479rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010480fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010481rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010482# Binary search between lo and hi bounds.
10483while test "x$ac_lo" != "x$ac_hi"; do
10484 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10485 cat >conftest.$ac_ext <<_ACEOF
10486/* confdefs.h. */
10487_ACEOF
10488cat confdefs.h >>conftest.$ac_ext
10489cat >>conftest.$ac_ext <<_ACEOF
10490/* end confdefs.h. */
10491$ac_includes_default
10492int
10493main ()
10494{
Skip Montanaro89e975f2007-08-22 19:05:21 +000010495static int test_array [1 - 2 * !(((long) (sizeof (_Bool))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010496test_array [0] = 0
10497
10498 ;
10499 return 0;
10500}
10501_ACEOF
10502rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000010503if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10504 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010505 ac_status=$?
10506 grep -v '^ *+' conftest.er1 >conftest.err
10507 rm -f conftest.er1
10508 cat conftest.err >&5
10509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000010510 (exit $ac_status); } &&
10511 { ac_try='test -z "$ac_c_werror_flag"
10512 || test ! -s conftest.err'
10513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10514 (eval $ac_try) 2>&5
10515 ac_status=$?
10516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10517 (exit $ac_status); }; } &&
10518 { ac_try='test -s conftest.$ac_objext'
10519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10520 (eval $ac_try) 2>&5
10521 ac_status=$?
10522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10523 (exit $ac_status); }; }; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010524 ac_hi=$ac_mid
10525else
10526 echo "$as_me: failed program was:" >&5
10527sed 's/^/| /' conftest.$ac_ext >&5
10528
Skip Montanaro89e975f2007-08-22 19:05:21 +000010529ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010530fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010531rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010532done
10533case $ac_lo in
10534?*) ac_cv_sizeof__Bool=$ac_lo;;
Skip Montanaro89e975f2007-08-22 19:05:21 +000010535'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool), 77
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010536See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000010537echo "$as_me: error: cannot compute sizeof (_Bool), 77
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010538See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +000010539 { (exit 1); exit 1; }; } ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010540esac
10541else
Skip Montanaro89e975f2007-08-22 19:05:21 +000010542 if test "$cross_compiling" = yes; then
10543 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
10544See \`config.log' for more details." >&5
10545echo "$as_me: error: cannot run test program while cross compiling
10546See \`config.log' for more details." >&2;}
10547 { (exit 1); exit 1; }; }
10548else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010549 cat >conftest.$ac_ext <<_ACEOF
10550/* confdefs.h. */
10551_ACEOF
10552cat confdefs.h >>conftest.$ac_ext
10553cat >>conftest.$ac_ext <<_ACEOF
10554/* end confdefs.h. */
10555$ac_includes_default
Skip Montanaro89e975f2007-08-22 19:05:21 +000010556long longval () { return (long) (sizeof (_Bool)); }
10557unsigned long ulongval () { return (long) (sizeof (_Bool)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010558#include <stdio.h>
10559#include <stdlib.h>
10560int
10561main ()
10562{
10563
10564 FILE *f = fopen ("conftest.val", "w");
10565 if (! f)
Skip Montanaro89e975f2007-08-22 19:05:21 +000010566 exit (1);
10567 if (((long) (sizeof (_Bool))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010568 {
Skip Montanaro89e975f2007-08-22 19:05:21 +000010569 long i = longval ();
10570 if (i != ((long) (sizeof (_Bool))))
10571 exit (1);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010572 fprintf (f, "%ld\n", i);
10573 }
10574 else
10575 {
Skip Montanaro89e975f2007-08-22 19:05:21 +000010576 unsigned long i = ulongval ();
10577 if (i != ((long) (sizeof (_Bool))))
10578 exit (1);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010579 fprintf (f, "%lu\n", i);
10580 }
Skip Montanaro89e975f2007-08-22 19:05:21 +000010581 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010582
10583 ;
10584 return 0;
10585}
10586_ACEOF
10587rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000010588if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10589 (eval $ac_link) 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010590 ac_status=$?
10591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10592 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +000010593 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10594 (eval $ac_try) 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010595 ac_status=$?
10596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10597 (exit $ac_status); }; }; then
10598 ac_cv_sizeof__Bool=`cat conftest.val`
10599else
10600 echo "$as_me: program exited with status $ac_status" >&5
10601echo "$as_me: failed program was:" >&5
10602sed 's/^/| /' conftest.$ac_ext >&5
10603
10604( exit $ac_status )
Skip Montanaro89e975f2007-08-22 19:05:21 +000010605{ { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool), 77
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010606See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000010607echo "$as_me: error: cannot compute sizeof (_Bool), 77
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010608See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +000010609 { (exit 1); exit 1; }; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010610fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010611rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10612fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010613fi
10614rm -f conftest.val
Skip Montanaro89e975f2007-08-22 19:05:21 +000010615else
10616 ac_cv_sizeof__Bool=0
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010617fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010618fi
10619echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
10620echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000010621cat >>confdefs.h <<_ACEOF
10622#define SIZEOF__BOOL $ac_cv_sizeof__Bool
10623_ACEOF
10624
10625
10626fi
10627
Skip Montanaro89e975f2007-08-22 19:05:21 +000010628echo "$as_me:$LINENO: checking for uintptr_t" >&5
10629echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000010630if test "${ac_cv_type_uintptr_t+set}" = set; then
10631 echo $ECHO_N "(cached) $ECHO_C" >&6
10632else
10633 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010634/* confdefs.h. */
10635_ACEOF
10636cat confdefs.h >>conftest.$ac_ext
10637cat >>conftest.$ac_ext <<_ACEOF
10638/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000010639#ifdef HAVE_STDINT_H
10640 #include <stdint.h>
10641 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010642
Martin v. Löwis11437992002-04-12 09:54:03 +000010643int
10644main ()
10645{
Skip Montanaro89e975f2007-08-22 19:05:21 +000010646if ((uintptr_t *) 0)
Martin v. Löwisebe26702006-10-02 14:55:51 +000010647 return 0;
Skip Montanaro89e975f2007-08-22 19:05:21 +000010648if (sizeof (uintptr_t))
Martin v. Löwisebe26702006-10-02 14:55:51 +000010649 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010650 ;
10651 return 0;
10652}
10653_ACEOF
10654rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000010655if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10656 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010657 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010658 grep -v '^ *+' conftest.er1 >conftest.err
10659 rm -f conftest.er1
10660 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000010662 (exit $ac_status); } &&
10663 { ac_try='test -z "$ac_c_werror_flag"
10664 || test ! -s conftest.err'
10665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10666 (eval $ac_try) 2>&5
10667 ac_status=$?
10668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10669 (exit $ac_status); }; } &&
10670 { ac_try='test -s conftest.$ac_objext'
10671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10672 (eval $ac_try) 2>&5
10673 ac_status=$?
10674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10675 (exit $ac_status); }; }; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000010676 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010677else
Martin v. Löwis11437992002-04-12 09:54:03 +000010678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010679sed 's/^/| /' conftest.$ac_ext >&5
10680
Skip Montanaro89e975f2007-08-22 19:05:21 +000010681ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000010682fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010683rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000010684fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010685echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
10686echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000010687if test $ac_cv_type_uintptr_t = yes; then
10688
10689cat >>confdefs.h <<_ACEOF
10690#define HAVE_UINTPTR_T 1
10691_ACEOF
10692
Skip Montanaro89e975f2007-08-22 19:05:21 +000010693echo "$as_me:$LINENO: checking for uintptr_t" >&5
10694echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010695if test "${ac_cv_type_uintptr_t+set}" = set; then
10696 echo $ECHO_N "(cached) $ECHO_C" >&6
10697else
10698 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010699/* confdefs.h. */
10700_ACEOF
10701cat confdefs.h >>conftest.$ac_ext
10702cat >>conftest.$ac_ext <<_ACEOF
10703/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010704$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010705int
10706main ()
10707{
Skip Montanaro89e975f2007-08-22 19:05:21 +000010708if ((uintptr_t *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010709 return 0;
Skip Montanaro89e975f2007-08-22 19:05:21 +000010710if (sizeof (uintptr_t))
Martin v. Löwis11437992002-04-12 09:54:03 +000010711 return 0;
10712 ;
10713 return 0;
10714}
10715_ACEOF
10716rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000010717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10718 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010720 grep -v '^ *+' conftest.er1 >conftest.err
10721 rm -f conftest.er1
10722 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000010724 (exit $ac_status); } &&
10725 { ac_try='test -z "$ac_c_werror_flag"
10726 || test ! -s conftest.err'
10727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10728 (eval $ac_try) 2>&5
10729 ac_status=$?
10730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10731 (exit $ac_status); }; } &&
10732 { ac_try='test -s conftest.$ac_objext'
10733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10734 (eval $ac_try) 2>&5
10735 ac_status=$?
10736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10737 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010738 ac_cv_type_uintptr_t=yes
10739else
10740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010741sed 's/^/| /' conftest.$ac_ext >&5
10742
Skip Montanaro89e975f2007-08-22 19:05:21 +000010743ac_cv_type_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010744fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010745rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon19fab762007-06-02 03:02:29 +000010746fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010747echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
10748echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
Brett Cannon19fab762007-06-02 03:02:29 +000010749
Skip Montanaro89e975f2007-08-22 19:05:21 +000010750echo "$as_me:$LINENO: checking size of uintptr_t" >&5
10751echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010752if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
10753 echo $ECHO_N "(cached) $ECHO_C" >&6
10754else
Skip Montanaro89e975f2007-08-22 19:05:21 +000010755 if test "$ac_cv_type_uintptr_t" = yes; then
10756 # The cast to unsigned long works around a bug in the HP C Compiler
10757 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10758 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10759 # This bug is HP SR number 8606223364.
Martin v. Löwis11437992002-04-12 09:54:03 +000010760 if test "$cross_compiling" = yes; then
10761 # Depending upon the size, compute the lo and hi bounds.
10762cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010763/* confdefs.h. */
10764_ACEOF
10765cat confdefs.h >>conftest.$ac_ext
10766cat >>conftest.$ac_ext <<_ACEOF
10767/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010768$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010769int
10770main ()
10771{
Skip Montanaro89e975f2007-08-22 19:05:21 +000010772static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010773test_array [0] = 0
10774
10775 ;
10776 return 0;
10777}
10778_ACEOF
10779rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000010780if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10781 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010783 grep -v '^ *+' conftest.er1 >conftest.err
10784 rm -f conftest.er1
10785 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000010787 (exit $ac_status); } &&
10788 { ac_try='test -z "$ac_c_werror_flag"
10789 || test ! -s conftest.err'
10790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10791 (eval $ac_try) 2>&5
10792 ac_status=$?
10793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10794 (exit $ac_status); }; } &&
10795 { ac_try='test -s conftest.$ac_objext'
10796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10797 (eval $ac_try) 2>&5
10798 ac_status=$?
10799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10800 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010801 ac_lo=0 ac_mid=0
10802 while :; do
10803 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010804/* confdefs.h. */
10805_ACEOF
10806cat confdefs.h >>conftest.$ac_ext
10807cat >>conftest.$ac_ext <<_ACEOF
10808/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010809$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010810int
10811main ()
10812{
Skip Montanaro89e975f2007-08-22 19:05:21 +000010813static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010814test_array [0] = 0
10815
10816 ;
10817 return 0;
10818}
10819_ACEOF
10820rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000010821if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10822 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010823 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010824 grep -v '^ *+' conftest.er1 >conftest.err
10825 rm -f conftest.er1
10826 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000010828 (exit $ac_status); } &&
10829 { ac_try='test -z "$ac_c_werror_flag"
10830 || test ! -s conftest.err'
10831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10832 (eval $ac_try) 2>&5
10833 ac_status=$?
10834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10835 (exit $ac_status); }; } &&
10836 { ac_try='test -s conftest.$ac_objext'
10837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10838 (eval $ac_try) 2>&5
10839 ac_status=$?
10840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10841 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010842 ac_hi=$ac_mid; break
10843else
10844 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010845sed 's/^/| /' conftest.$ac_ext >&5
10846
Skip Montanaro89e975f2007-08-22 19:05:21 +000010847ac_lo=`expr $ac_mid + 1`
10848 if test $ac_lo -le $ac_mid; then
10849 ac_lo= ac_hi=
10850 break
10851 fi
10852 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010853fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010854rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010855 done
10856else
10857 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010858sed 's/^/| /' conftest.$ac_ext >&5
10859
Skip Montanaro89e975f2007-08-22 19:05:21 +000010860cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010861/* confdefs.h. */
10862_ACEOF
10863cat confdefs.h >>conftest.$ac_ext
10864cat >>conftest.$ac_ext <<_ACEOF
10865/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010866$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010867int
10868main ()
10869{
Skip Montanaro89e975f2007-08-22 19:05:21 +000010870static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010871test_array [0] = 0
10872
10873 ;
10874 return 0;
10875}
10876_ACEOF
10877rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000010878if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10879 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010881 grep -v '^ *+' conftest.er1 >conftest.err
10882 rm -f conftest.er1
10883 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000010885 (exit $ac_status); } &&
10886 { ac_try='test -z "$ac_c_werror_flag"
10887 || test ! -s conftest.err'
10888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10889 (eval $ac_try) 2>&5
10890 ac_status=$?
10891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10892 (exit $ac_status); }; } &&
10893 { ac_try='test -s conftest.$ac_objext'
10894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10895 (eval $ac_try) 2>&5
10896 ac_status=$?
10897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10898 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010899 ac_hi=-1 ac_mid=-1
10900 while :; do
10901 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010902/* confdefs.h. */
10903_ACEOF
10904cat confdefs.h >>conftest.$ac_ext
10905cat >>conftest.$ac_ext <<_ACEOF
10906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010907$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010908int
10909main ()
10910{
Skip Montanaro89e975f2007-08-22 19:05:21 +000010911static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010912test_array [0] = 0
10913
10914 ;
10915 return 0;
10916}
10917_ACEOF
10918rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000010919if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10920 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010922 grep -v '^ *+' conftest.er1 >conftest.err
10923 rm -f conftest.er1
10924 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000010926 (exit $ac_status); } &&
10927 { ac_try='test -z "$ac_c_werror_flag"
10928 || test ! -s conftest.err'
10929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10930 (eval $ac_try) 2>&5
10931 ac_status=$?
10932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10933 (exit $ac_status); }; } &&
10934 { ac_try='test -s conftest.$ac_objext'
10935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10936 (eval $ac_try) 2>&5
10937 ac_status=$?
10938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10939 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010940 ac_lo=$ac_mid; break
10941else
10942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010943sed 's/^/| /' conftest.$ac_ext >&5
10944
Skip Montanaro89e975f2007-08-22 19:05:21 +000010945ac_hi=`expr '(' $ac_mid ')' - 1`
10946 if test $ac_mid -le $ac_hi; then
10947 ac_lo= ac_hi=
10948 break
10949 fi
10950 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010951fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010952rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010953 done
10954else
10955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010956sed 's/^/| /' conftest.$ac_ext >&5
10957
Skip Montanaro89e975f2007-08-22 19:05:21 +000010958ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010959fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010960rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010961fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000010962rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010963# Binary search between lo and hi bounds.
10964while test "x$ac_lo" != "x$ac_hi"; do
10965 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10966 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010967/* confdefs.h. */
10968_ACEOF
10969cat confdefs.h >>conftest.$ac_ext
10970cat >>conftest.$ac_ext <<_ACEOF
10971/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010972$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010973int
10974main ()
10975{
Skip Montanaro89e975f2007-08-22 19:05:21 +000010976static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010977test_array [0] = 0
10978
10979 ;
10980 return 0;
10981}
10982_ACEOF
10983rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000010984if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
10985 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010986 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010987 grep -v '^ *+' conftest.er1 >conftest.err
10988 rm -f conftest.er1
10989 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000010991 (exit $ac_status); } &&
10992 { ac_try='test -z "$ac_c_werror_flag"
10993 || test ! -s conftest.err'
10994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10995 (eval $ac_try) 2>&5
10996 ac_status=$?
10997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10998 (exit $ac_status); }; } &&
10999 { ac_try='test -s conftest.$ac_objext'
11000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11001 (eval $ac_try) 2>&5
11002 ac_status=$?
11003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11004 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011005 ac_hi=$ac_mid
11006else
11007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011008sed 's/^/| /' conftest.$ac_ext >&5
11009
Skip Montanaro89e975f2007-08-22 19:05:21 +000011010ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011011fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000011012rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011013done
11014case $ac_lo in
11015?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro89e975f2007-08-22 19:05:21 +000011016'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000011017See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000011018echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000011019See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +000011020 { (exit 1); exit 1; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011021esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011022else
Skip Montanaro89e975f2007-08-22 19:05:21 +000011023 if test "$cross_compiling" = yes; then
11024 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
11025See \`config.log' for more details." >&5
11026echo "$as_me: error: cannot run test program while cross compiling
11027See \`config.log' for more details." >&2;}
11028 { (exit 1); exit 1; }; }
11029else
Martin v. Löwis11437992002-04-12 09:54:03 +000011030 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011031/* confdefs.h. */
11032_ACEOF
11033cat confdefs.h >>conftest.$ac_ext
11034cat >>conftest.$ac_ext <<_ACEOF
11035/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011036$ac_includes_default
Skip Montanaro89e975f2007-08-22 19:05:21 +000011037long longval () { return (long) (sizeof (uintptr_t)); }
11038unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011039#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011040#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011041int
11042main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011043{
Martin v. Löwis11437992002-04-12 09:54:03 +000011044
11045 FILE *f = fopen ("conftest.val", "w");
11046 if (! f)
Skip Montanaro89e975f2007-08-22 19:05:21 +000011047 exit (1);
11048 if (((long) (sizeof (uintptr_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011049 {
Skip Montanaro89e975f2007-08-22 19:05:21 +000011050 long i = longval ();
11051 if (i != ((long) (sizeof (uintptr_t))))
11052 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +000011053 fprintf (f, "%ld\n", i);
11054 }
11055 else
11056 {
Skip Montanaro89e975f2007-08-22 19:05:21 +000011057 unsigned long i = ulongval ();
11058 if (i != ((long) (sizeof (uintptr_t))))
11059 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +000011060 fprintf (f, "%lu\n", i);
11061 }
Skip Montanaro89e975f2007-08-22 19:05:21 +000011062 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000011063
11064 ;
11065 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011066}
Martin v. Löwis11437992002-04-12 09:54:03 +000011067_ACEOF
11068rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000011069if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11070 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011071 ac_status=$?
11072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11073 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +000011074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11075 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011076 ac_status=$?
11077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11078 (exit $ac_status); }; }; then
11079 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011080else
Martin v. Löwis11437992002-04-12 09:54:03 +000011081 echo "$as_me: program exited with status $ac_status" >&5
11082echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011083sed 's/^/| /' conftest.$ac_ext >&5
11084
Martin v. Löwis11437992002-04-12 09:54:03 +000011085( exit $ac_status )
Skip Montanaro89e975f2007-08-22 19:05:21 +000011086{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000011087See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000011088echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000011089See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +000011090 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011091fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000011092rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11093fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011094fi
11095rm -f conftest.val
Skip Montanaro89e975f2007-08-22 19:05:21 +000011096else
11097 ac_cv_sizeof_uintptr_t=0
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011098fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000011099fi
11100echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
11101echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011102cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011103#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011104_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011105
Michael W. Hudson54241132001-12-07 15:38:26 +000011106
Barry Warsawbc7c7f92000-08-18 04:53:33 +000011107fi
11108
Martin v. Löwisebe26702006-10-02 14:55:51 +000011109
11110
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011111# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Skip Montanaro89e975f2007-08-22 19:05:21 +000011112echo "$as_me:$LINENO: checking size of off_t" >&5
11113echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011114if test "${ac_cv_sizeof_off_t+set}" = set; then
11115 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011116else
11117 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011118 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011119else
Martin v. Löwis11437992002-04-12 09:54:03 +000011120 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011121/* confdefs.h. */
11122_ACEOF
11123cat confdefs.h >>conftest.$ac_ext
11124cat >>conftest.$ac_ext <<_ACEOF
11125/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011126#include <stdio.h>
11127#include <sys/types.h>
11128main()
11129{
11130 FILE *f=fopen("conftestval", "w");
11131 if (!f) exit(1);
11132 fprintf(f, "%d\n", sizeof(off_t));
11133 exit(0);
11134}
Martin v. Löwis11437992002-04-12 09:54:03 +000011135_ACEOF
11136rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000011137if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11138 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011139 ac_status=$?
11140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11141 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +000011142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11143 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011144 ac_status=$?
11145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11146 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011147 ac_cv_sizeof_off_t=`cat conftestval`
11148else
Martin v. Löwis11437992002-04-12 09:54:03 +000011149 echo "$as_me: program exited with status $ac_status" >&5
11150echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011151sed 's/^/| /' conftest.$ac_ext >&5
11152
Martin v. Löwis11437992002-04-12 09:54:03 +000011153( exit $ac_status )
11154ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011155fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000011156rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011157fi
11158
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011159fi
11160
Skip Montanaro89e975f2007-08-22 19:05:21 +000011161echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
11162echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011163
11164cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011165#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011166_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011167
Michael W. Hudson54241132001-12-07 15:38:26 +000011168
Skip Montanaro89e975f2007-08-22 19:05:21 +000011169echo "$as_me:$LINENO: checking whether to enable large file support" >&5
11170echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011171if test "$have_long_long" = yes -a \
11172 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
11173 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011174
Martin v. Löwis11437992002-04-12 09:54:03 +000011175cat >>confdefs.h <<\_ACEOF
11176#define HAVE_LARGEFILE_SUPPORT 1
11177_ACEOF
11178
Skip Montanaro89e975f2007-08-22 19:05:21 +000011179 echo "$as_me:$LINENO: result: yes" >&5
11180echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011181else
Skip Montanaro89e975f2007-08-22 19:05:21 +000011182 echo "$as_me:$LINENO: result: no" >&5
11183echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000011184fi
11185
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011186# AC_CHECK_SIZEOF() doesn't include <time.h>.
Skip Montanaro89e975f2007-08-22 19:05:21 +000011187echo "$as_me:$LINENO: checking size of time_t" >&5
11188echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011189if test "${ac_cv_sizeof_time_t+set}" = set; then
11190 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011191else
11192 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011193 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011194else
Martin v. Löwis11437992002-04-12 09:54:03 +000011195 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011196/* confdefs.h. */
11197_ACEOF
11198cat confdefs.h >>conftest.$ac_ext
11199cat >>conftest.$ac_ext <<_ACEOF
11200/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011201#include <stdio.h>
11202#include <time.h>
11203main()
11204{
11205 FILE *f=fopen("conftestval", "w");
11206 if (!f) exit(1);
11207 fprintf(f, "%d\n", sizeof(time_t));
11208 exit(0);
11209}
Martin v. Löwis11437992002-04-12 09:54:03 +000011210_ACEOF
11211rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000011212if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11213 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011214 ac_status=$?
11215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11216 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +000011217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11218 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011219 ac_status=$?
11220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11221 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011222 ac_cv_sizeof_time_t=`cat conftestval`
11223else
Martin v. Löwis11437992002-04-12 09:54:03 +000011224 echo "$as_me: program exited with status $ac_status" >&5
11225echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011226sed 's/^/| /' conftest.$ac_ext >&5
11227
Martin v. Löwis11437992002-04-12 09:54:03 +000011228( exit $ac_status )
11229ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011230fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000011231rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011232fi
11233
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011234fi
11235
Skip Montanaro89e975f2007-08-22 19:05:21 +000011236echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
11237echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011238
11239cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011240#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011241_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000011242
Michael W. Hudson54241132001-12-07 15:38:26 +000011243
11244
Trent Mick635f6fb2000-08-23 21:33:05 +000011245# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000011246ac_save_cc="$CC"
11247if test "$ac_cv_kpthread" = "yes"
11248then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011249elif test "$ac_cv_kthread" = "yes"
11250then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011251elif test "$ac_cv_pthread" = "yes"
11252then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000011253fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000011254echo "$as_me:$LINENO: checking for pthread_t" >&5
11255echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000011256have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011257cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011258/* confdefs.h. */
11259_ACEOF
11260cat confdefs.h >>conftest.$ac_ext
11261cat >>conftest.$ac_ext <<_ACEOF
11262/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000011263#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011264int
11265main ()
11266{
Guido van Rossum12580492000-09-24 16:47:19 +000011267pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011268 ;
11269 return 0;
11270}
11271_ACEOF
11272rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000011273if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
11274 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011276 grep -v '^ *+' conftest.er1 >conftest.err
11277 rm -f conftest.er1
11278 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000011280 (exit $ac_status); } &&
11281 { ac_try='test -z "$ac_c_werror_flag"
11282 || test ! -s conftest.err'
11283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11284 (eval $ac_try) 2>&5
11285 ac_status=$?
11286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11287 (exit $ac_status); }; } &&
11288 { ac_try='test -s conftest.$ac_objext'
11289 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11290 (eval $ac_try) 2>&5
11291 ac_status=$?
11292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11293 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000011294 have_pthread_t=yes
11295else
Martin v. Löwis11437992002-04-12 09:54:03 +000011296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011297sed 's/^/| /' conftest.$ac_ext >&5
11298
Trent Mick635f6fb2000-08-23 21:33:05 +000011299fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000011300rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
11301echo "$as_me:$LINENO: result: $have_pthread_t" >&5
11302echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000011303if test "$have_pthread_t" = yes ; then
11304 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Skip Montanaro89e975f2007-08-22 19:05:21 +000011305 echo "$as_me:$LINENO: checking size of pthread_t" >&5
11306echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011307 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
11308 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000011309else
11310 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000011311 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000011312else
Martin v. Löwis11437992002-04-12 09:54:03 +000011313 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011314/* confdefs.h. */
11315_ACEOF
11316cat confdefs.h >>conftest.$ac_ext
11317cat >>conftest.$ac_ext <<_ACEOF
11318/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000011319#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011320#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000011321 main()
11322 {
11323 FILE *f=fopen("conftestval", "w");
11324 if (!f) exit(1);
11325 fprintf(f, "%d\n", sizeof(pthread_t));
11326 exit(0);
11327 }
Martin v. Löwis11437992002-04-12 09:54:03 +000011328_ACEOF
11329rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000011330if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11331 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011332 ac_status=$?
11333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11334 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +000011335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11336 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011337 ac_status=$?
11338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11339 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000011340 ac_cv_sizeof_pthread_t=`cat conftestval`
11341else
Martin v. Löwis11437992002-04-12 09:54:03 +000011342 echo "$as_me: program exited with status $ac_status" >&5
11343echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011344sed 's/^/| /' conftest.$ac_ext >&5
11345
Martin v. Löwis11437992002-04-12 09:54:03 +000011346( exit $ac_status )
11347ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000011348fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000011349rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +000011350fi
11351
Trent Mick635f6fb2000-08-23 21:33:05 +000011352fi
11353
Skip Montanaro89e975f2007-08-22 19:05:21 +000011354 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
11355echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011356
11357cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000011358#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000011359_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000011360
11361fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000011362CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000011363
Skip Montanaro89e975f2007-08-22 19:05:21 +000011364echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
11365echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
11366# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000011367if test "${enable_toolbox_glue+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000011368 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +000011369
Skip Montanaro89e975f2007-08-22 19:05:21 +000011370fi;
Jack Jansene578a632001-08-15 01:27:14 +000011371
11372if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000011373then
Jack Jansene578a632001-08-15 01:27:14 +000011374 case $ac_sys_system/$ac_sys_release in
11375 Darwin/*)
11376 enable_toolbox_glue="yes";;
11377 *)
11378 enable_toolbox_glue="no";;
11379 esac
11380fi
11381case "$enable_toolbox_glue" in
11382yes)
Jack Jansene578a632001-08-15 01:27:14 +000011383 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011384 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000011385
11386cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000011387#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011388_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000011389
11390 ;;
11391*)
Jack Jansene578a632001-08-15 01:27:14 +000011392 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000011393 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000011394 ;;
11395esac
Skip Montanaro89e975f2007-08-22 19:05:21 +000011396echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
11397echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000011398
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011399
11400case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000011401 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000011402 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
11403 ;;
11404 Darwin/*)
11405 OTHER_LIBTOOL_OPT=""
11406 ;;
11407esac
11408
11409
11410case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000011411 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000011412 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
11413 if test "${enable_universalsdk}"; then
11414 :
11415 else
11416 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
11417 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000011418 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000011419 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000011420 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000011421 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
11422 if test ${gcc_version} '<' 4.0
11423 then
11424 LIBTOOL_CRUFT="-lcc_dynamic"
11425 else
11426 LIBTOOL_CRUFT=""
11427 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000011428 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000011429 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000011430 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011431esac
11432
Skip Montanaro89e975f2007-08-22 19:05:21 +000011433echo "$as_me:$LINENO: checking for --enable-framework" >&5
11434echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000011435if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011436then
Skip Montanarodecc6a42003-01-01 20:07:49 +000011437 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000011438 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000011439 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011440
Martin v. Löwis11437992002-04-12 09:54:03 +000011441cat >>confdefs.h <<\_ACEOF
11442#define WITH_NEXT_FRAMEWORK 1
11443_ACEOF
11444
Skip Montanaro89e975f2007-08-22 19:05:21 +000011445 echo "$as_me:$LINENO: result: yes" >&5
11446echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011447else
Skip Montanaro89e975f2007-08-22 19:05:21 +000011448 echo "$as_me:$LINENO: result: no" >&5
11449echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011450fi
11451
Skip Montanaro89e975f2007-08-22 19:05:21 +000011452echo "$as_me:$LINENO: checking for dyld" >&5
11453echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011454case $ac_sys_system/$ac_sys_release in
11455 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011456
Martin v. Löwis11437992002-04-12 09:54:03 +000011457cat >>confdefs.h <<\_ACEOF
11458#define WITH_DYLD 1
11459_ACEOF
11460
Skip Montanaro89e975f2007-08-22 19:05:21 +000011461 echo "$as_me:$LINENO: result: always on for Darwin" >&5
11462echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011463 ;;
11464 *)
Skip Montanaro89e975f2007-08-22 19:05:21 +000011465 echo "$as_me:$LINENO: result: no" >&5
11466echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +000011467 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000011468esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011469
Guido van Rossum0a516c91994-09-12 10:58:40 +000011470# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000011471
Michael W. Hudson54241132001-12-07 15:38:26 +000011472
11473
11474
11475
Guido van Rossum0a516c91994-09-12 10:58:40 +000011476# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000011477# -- usually .so, .sl on HP-UX, .dll on Cygwin
Skip Montanaro89e975f2007-08-22 19:05:21 +000011478echo "$as_me:$LINENO: checking SO" >&5
11479echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011480if test -z "$SO"
11481then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011482 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000011483 hp*|HP*)
11484 case `uname -m` in
11485 ia64) SO=.so;;
11486 *) SO=.sl;;
11487 esac
11488 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000011489 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000011490 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011491 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000011492else
11493 # this might also be a termcap variable, see #610332
11494 echo
11495 echo '====================================================================='
11496 echo '+ +'
11497 echo '+ WARNING: You have set SO in your environment. +'
11498 echo '+ Do you really mean to change the extension for shared libraries? +'
11499 echo '+ Continuing in 10 seconds to let you to ponder. +'
11500 echo '+ +'
11501 echo '====================================================================='
11502 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000011503fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000011504echo "$as_me:$LINENO: result: $SO" >&5
11505echo "${ECHO_T}$SO" >&6
Neal Norwitz58e28882006-05-19 07:00:58 +000011506
11507cat >>confdefs.h <<_ACEOF
11508#define SHLIB_EXT "$SO"
11509_ACEOF
11510
Guido van Rossum0a516c91994-09-12 10:58:40 +000011511# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000011512# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011513# (Shared libraries in this instance are shared modules to be loaded into
11514# Python, as opposed to building Python itself as a shared library.)
Skip Montanaro89e975f2007-08-22 19:05:21 +000011515echo "$as_me:$LINENO: checking LDSHARED" >&5
11516echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011517if test -z "$LDSHARED"
11518then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011519 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011520 AIX*)
11521 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000011522 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011523 ;;
11524 BeOS*)
11525 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000011526 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011527 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000011528 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000011529 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000011530 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000011531 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000011532 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000011533 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000011534 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011535 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000011536 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000011537 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000011538 LDSHARED='$(CC) $(LDFLAGS) -bundle'
11539 if test "$enable_framework" ; then
11540 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000011541 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
11542 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000011543 else
11544 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000011545 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000011546 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000011547 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000011548 LDSHARED='$(CC) $(LDFLAGS) -bundle'
11549 if test "$enable_framework" ; then
11550 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000011551 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
11552 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000011553 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000011554 # No framework, use the Python app as bundle-loader
11555 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000011556 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011557 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000011558 Darwin/*)
11559 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
11560 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000011561 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Ronald Oussoren988117f2006-04-29 11:31:35 +000011562 if test ${cur_target} '>' 10.2; then
11563 cur_target=10.3
11564 fi
Jack Jansenc110f862005-01-07 10:49:32 +000011565 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Ronald Oussoren988117f2006-04-29 11:31:35 +000011566 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
Jack Jansenbe954622004-12-26 23:07:48 +000011567 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000011568 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000011569 if test "${enable_universalsdk}"; then
11570 LDFLAGS="-arch i386 -arch ppc -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
11571 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000011572 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
11573 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000011574 else
11575 LDSHARED='$(CC) $(LDFLAGS) -bundle'
11576 if test "$enable_framework" ; then
11577 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000011578 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
11579 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000011580 else
11581 # No framework, use the Python app as bundle-loader
11582 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
11583 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
11584 fi
11585 fi
11586 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000011587 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000011588 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000011589 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000011590 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000011591 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000011592 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000011593 else
11594 LDSHARED="ld -Bshareable ${LDFLAGS}"
11595 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000011596 OpenBSD*)
11597 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
11598 then
11599 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
11600 else
11601 case `uname -r` in
11602 [01].* | 2.[0-7] | 2.[0-7].*)
11603 LDSHARED="ld -Bshareable ${LDFLAGS}"
11604 ;;
11605 *)
11606 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
11607 ;;
11608 esac
11609 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000011610 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000011611 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000011612 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000011613 then LDSHARED='$(CC) -shared'
11614 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000011615 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000011616 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000011617 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000011618 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011619 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011620 *) LDSHARED="ld";;
11621 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000011622fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000011623echo "$as_me:$LINENO: result: $LDSHARED" >&5
11624echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011625BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000011626# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011627# library (module) -- this is only needed for a few systems
Skip Montanaro89e975f2007-08-22 19:05:21 +000011628echo "$as_me:$LINENO: checking CCSHARED" >&5
11629echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011630if test -z "$CCSHARED"
11631then
Guido van Rossum07397971997-04-29 21:49:50 +000011632 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000011633 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000011634 then CCSHARED="-fPIC";
11635 elif test `uname -p` = sparc;
11636 then CCSHARED="-xcode=pic32";
11637 else CCSHARED="-Kpic";
11638 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000011639 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000011640 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000011641 else CCSHARED="+z";
11642 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011643 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000011644 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000011645 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000011646 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000011647 if test "$GCC" = "yes"
11648 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011649 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000011650 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000011651 SCO_SV*)
11652 if test "$GCC" = "yes"
11653 then CCSHARED="-fPIC"
11654 else CCSHARED="-Kpic -belf"
11655 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000011656 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000011657 IRIX*/6*) case $CC in
11658 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000011659 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000011660 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011661 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011662 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000011663fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000011664echo "$as_me:$LINENO: result: $CCSHARED" >&5
11665echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011666# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011667# the python executable -- this is only needed for a few systems
Skip Montanaro89e975f2007-08-22 19:05:21 +000011668echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
11669echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011670if test -z "$LINKFORSHARED"
11671then
Guido van Rossum07397971997-04-29 21:49:50 +000011672 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000011673 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000011674 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000011675 LINKFORSHARED="-Wl,-E -Wl,+s";;
11676# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000011677 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011678 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000011679 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000011680 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011681 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
11682 # which is
Jack Jansene578a632001-08-15 01:27:14 +000011683 # not used by the core itself but which needs to be in the core so
11684 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000011685 # -prebind is no longer used, because it actually seems to give a
11686 # slowdown in stead of a speedup, maybe due to the large number of
11687 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011688
11689 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000011690 if test "$enable_framework"
11691 then
Jack Jansenda49e192005-01-07 13:08:22 +000011692 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000011693 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000011694 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000011695 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000011696 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000011697 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000011698 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000011699 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
11700 then
11701 LINKFORSHARED="-Wl,--export-dynamic"
11702 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000011703 SunOS/5*) case $CC in
11704 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000011705 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000011706 then
11707 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000011708 fi;;
11709 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000011710 CYGWIN*)
11711 if test $enable_shared = "no"
11712 then
11713 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
11714 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000011715 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000011716fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000011717echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
11718echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000011719
Michael W. Hudson54241132001-12-07 15:38:26 +000011720
Skip Montanaro89e975f2007-08-22 19:05:21 +000011721echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
11722echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000011723if test ! "$LIBRARY" = "$LDLIBRARY"
11724then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000011725 case $ac_sys_system in
11726 CYGWIN*)
11727 # Cygwin needs CCSHARED when building extension DLLs
11728 # but not when building the interpreter DLL.
11729 CFLAGSFORSHARED='';;
11730 *)
11731 CFLAGSFORSHARED='$(CCSHARED)'
11732 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000011733fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000011734echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
11735echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000011736
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011737# SHLIBS are libraries (except -lc and -lm) to link to the python shared
11738# library (with --enable-shared).
11739# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000011740# symbols, this must be set to $(LIBS) (expanded by make). We do this even
11741# if it is not required, since it creates a dependency of the shared library
11742# to LIBS. This, in turn, means that applications linking the shared libpython
11743# don't need to link LIBS explicitly. The default should be only changed
11744# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011745
Skip Montanaro89e975f2007-08-22 19:05:21 +000011746echo "$as_me:$LINENO: checking SHLIBS" >&5
11747echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011748case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011749 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000011750 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011751esac
Skip Montanaro89e975f2007-08-22 19:05:21 +000011752echo "$as_me:$LINENO: result: $SHLIBS" >&5
11753echo "${ECHO_T}$SHLIBS" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011754
11755
Guido van Rossum627b2d71993-12-24 10:39:16 +000011756# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000011757
Skip Montanaro89e975f2007-08-22 19:05:21 +000011758echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
11759echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011760if test "${ac_cv_lib_dl_dlopen+set}" = set; then
11761 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011762else
Martin v. Löwis11437992002-04-12 09:54:03 +000011763 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011764LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011765cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011766/* confdefs.h. */
11767_ACEOF
11768cat confdefs.h >>conftest.$ac_ext
11769cat >>conftest.$ac_ext <<_ACEOF
11770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011771
Skip Montanaro89e975f2007-08-22 19:05:21 +000011772/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011773#ifdef __cplusplus
11774extern "C"
11775#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000011776/* We use char because int might match the return type of a gcc2
11777 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011778char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011779int
11780main ()
11781{
Skip Montanaro89e975f2007-08-22 19:05:21 +000011782dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011783 ;
11784 return 0;
11785}
11786_ACEOF
11787rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000011788if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11789 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011790 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011791 grep -v '^ *+' conftest.er1 >conftest.err
11792 rm -f conftest.er1
11793 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000011795 (exit $ac_status); } &&
11796 { ac_try='test -z "$ac_c_werror_flag"
11797 || test ! -s conftest.err'
11798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11799 (eval $ac_try) 2>&5
11800 ac_status=$?
11801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11802 (exit $ac_status); }; } &&
11803 { ac_try='test -s conftest$ac_exeext'
11804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11805 (eval $ac_try) 2>&5
11806 ac_status=$?
11807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11808 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011809 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011810else
Martin v. Löwis11437992002-04-12 09:54:03 +000011811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011812sed 's/^/| /' conftest.$ac_ext >&5
11813
Skip Montanaro89e975f2007-08-22 19:05:21 +000011814ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011815fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000011816rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000011817 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011818LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000011819fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000011820echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
11821echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011822if test $ac_cv_lib_dl_dlopen = yes; then
11823 cat >>confdefs.h <<_ACEOF
11824#define HAVE_LIBDL 1
11825_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011826
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011827 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000011828
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011829fi
11830 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000011831
Skip Montanaro89e975f2007-08-22 19:05:21 +000011832echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
11833echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011834if test "${ac_cv_lib_dld_shl_load+set}" = set; then
11835 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011836else
Martin v. Löwis11437992002-04-12 09:54:03 +000011837 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011838LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011839cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011840/* confdefs.h. */
11841_ACEOF
11842cat confdefs.h >>conftest.$ac_ext
11843cat >>conftest.$ac_ext <<_ACEOF
11844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011845
Skip Montanaro89e975f2007-08-22 19:05:21 +000011846/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011847#ifdef __cplusplus
11848extern "C"
11849#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000011850/* We use char because int might match the return type of a gcc2
11851 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011852char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011853int
11854main ()
11855{
Skip Montanaro89e975f2007-08-22 19:05:21 +000011856shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011857 ;
11858 return 0;
11859}
11860_ACEOF
11861rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000011862if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11863 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011864 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011865 grep -v '^ *+' conftest.er1 >conftest.err
11866 rm -f conftest.er1
11867 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000011869 (exit $ac_status); } &&
11870 { ac_try='test -z "$ac_c_werror_flag"
11871 || test ! -s conftest.err'
11872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11873 (eval $ac_try) 2>&5
11874 ac_status=$?
11875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11876 (exit $ac_status); }; } &&
11877 { ac_try='test -s conftest$ac_exeext'
11878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11879 (eval $ac_try) 2>&5
11880 ac_status=$?
11881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11882 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011883 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011884else
Martin v. Löwis11437992002-04-12 09:54:03 +000011885 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011886sed 's/^/| /' conftest.$ac_ext >&5
11887
Skip Montanaro89e975f2007-08-22 19:05:21 +000011888ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011889fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000011890rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000011891 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011892LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000011893fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000011894echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
11895echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011896if test $ac_cv_lib_dld_shl_load = yes; then
11897 cat >>confdefs.h <<_ACEOF
11898#define HAVE_LIBDLD 1
11899_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011900
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011901 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011902
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011903fi
11904 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000011905
11906# only check for sem_ini if thread support is requested
11907if test "$with_threads" = "yes" -o -z "$with_threads"; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000011908 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
11909echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011910if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011911 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000011912else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011913 ac_func_search_save_LIBS=$LIBS
Skip Montanaro89e975f2007-08-22 19:05:21 +000011914ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011915cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011916/* confdefs.h. */
11917_ACEOF
11918cat confdefs.h >>conftest.$ac_ext
11919cat >>conftest.$ac_ext <<_ACEOF
11920/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011921
Skip Montanaro89e975f2007-08-22 19:05:21 +000011922/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011923#ifdef __cplusplus
11924extern "C"
11925#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000011926/* We use char because int might match the return type of a gcc2
11927 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011928char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011929int
11930main ()
11931{
Skip Montanaro89e975f2007-08-22 19:05:21 +000011932sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011933 ;
11934 return 0;
11935}
11936_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +000011937rm -f conftest.$ac_objext conftest$ac_exeext
11938if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11939 (eval $ac_link) 2>conftest.er1
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011940 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011941 grep -v '^ *+' conftest.er1 >conftest.err
11942 rm -f conftest.er1
11943 cat conftest.err >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000011945 (exit $ac_status); } &&
11946 { ac_try='test -z "$ac_c_werror_flag"
11947 || test ! -s conftest.err'
11948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11949 (eval $ac_try) 2>&5
11950 ac_status=$?
11951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11952 (exit $ac_status); }; } &&
11953 { ac_try='test -s conftest$ac_exeext'
11954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11955 (eval $ac_try) 2>&5
11956 ac_status=$?
11957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11958 (exit $ac_status); }; }; then
11959 ac_cv_search_sem_init="none required"
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011960else
11961 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011962sed 's/^/| /' conftest.$ac_ext >&5
11963
Martin v. Löwis82c19a72002-10-06 11:48:09 +000011964fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000011965rm -f conftest.err conftest.$ac_objext \
11966 conftest$ac_exeext conftest.$ac_ext
11967if test "$ac_cv_search_sem_init" = no; then
11968 for ac_lib in pthread rt posix4; do
11969 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11970 cat >conftest.$ac_ext <<_ACEOF
11971/* confdefs.h. */
11972_ACEOF
11973cat confdefs.h >>conftest.$ac_ext
11974cat >>conftest.$ac_ext <<_ACEOF
11975/* end confdefs.h. */
Brett Cannon19fab762007-06-02 03:02:29 +000011976
Skip Montanaro89e975f2007-08-22 19:05:21 +000011977/* Override any gcc2 internal prototype to avoid an error. */
11978#ifdef __cplusplus
11979extern "C"
11980#endif
11981/* We use char because int might match the return type of a gcc2
11982 builtin and then its argument prototype would still apply. */
11983char sem_init ();
11984int
11985main ()
11986{
11987sem_init ();
11988 ;
11989 return 0;
11990}
11991_ACEOF
11992rm -f conftest.$ac_objext conftest$ac_exeext
11993if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11994 (eval $ac_link) 2>conftest.er1
11995 ac_status=$?
11996 grep -v '^ *+' conftest.er1 >conftest.err
11997 rm -f conftest.er1
11998 cat conftest.err >&5
11999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12000 (exit $ac_status); } &&
12001 { ac_try='test -z "$ac_c_werror_flag"
12002 || test ! -s conftest.err'
12003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12004 (eval $ac_try) 2>&5
12005 ac_status=$?
12006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12007 (exit $ac_status); }; } &&
12008 { ac_try='test -s conftest$ac_exeext'
12009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12010 (eval $ac_try) 2>&5
12011 ac_status=$?
12012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12013 (exit $ac_status); }; }; then
12014 ac_cv_search_sem_init="-l$ac_lib"
12015break
Brett Cannon19fab762007-06-02 03:02:29 +000012016else
Skip Montanaro89e975f2007-08-22 19:05:21 +000012017 echo "$as_me: failed program was:" >&5
12018sed 's/^/| /' conftest.$ac_ext >&5
12019
Brett Cannon19fab762007-06-02 03:02:29 +000012020fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000012021rm -f conftest.err conftest.$ac_objext \
12022 conftest$ac_exeext conftest.$ac_ext
12023 done
12024fi
Martin v. Löwis82c19a72002-10-06 11:48:09 +000012025LIBS=$ac_func_search_save_LIBS
12026fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000012027echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
12028echo "${ECHO_T}$ac_cv_search_sem_init" >&6
12029if test "$ac_cv_search_sem_init" != no; then
12030 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012031
Martin v. Löwis41933dd2002-03-21 15:10:58 +000012032fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000012033 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000012034 # posix4 on Solaris 2.6
12035 # pthread (first!) on Linux
12036fi
12037
Martin v. Löwis19d17342003-06-14 21:03:05 +000012038# check if we need libintl for locale functions
Skip Montanaro89e975f2007-08-22 19:05:21 +000012039echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
12040echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000012041if test "${ac_cv_lib_intl_textdomain+set}" = set; then
12042 echo $ECHO_N "(cached) $ECHO_C" >&6
12043else
12044 ac_check_lib_save_LIBS=$LIBS
12045LIBS="-lintl $LIBS"
12046cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012047/* confdefs.h. */
12048_ACEOF
12049cat confdefs.h >>conftest.$ac_ext
12050cat >>conftest.$ac_ext <<_ACEOF
12051/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012052
Skip Montanaro89e975f2007-08-22 19:05:21 +000012053/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012054#ifdef __cplusplus
12055extern "C"
12056#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000012057/* We use char because int might match the return type of a gcc2
12058 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000012059char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012060int
12061main ()
12062{
Skip Montanaro89e975f2007-08-22 19:05:21 +000012063textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000012064 ;
12065 return 0;
12066}
12067_ACEOF
12068rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000012069if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12070 (eval $ac_link) 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000012071 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012072 grep -v '^ *+' conftest.er1 >conftest.err
12073 rm -f conftest.er1
12074 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000012075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000012076 (exit $ac_status); } &&
12077 { ac_try='test -z "$ac_c_werror_flag"
12078 || test ! -s conftest.err'
12079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12080 (eval $ac_try) 2>&5
12081 ac_status=$?
12082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12083 (exit $ac_status); }; } &&
12084 { ac_try='test -s conftest$ac_exeext'
12085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12086 (eval $ac_try) 2>&5
12087 ac_status=$?
12088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12089 (exit $ac_status); }; }; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000012090 ac_cv_lib_intl_textdomain=yes
12091else
12092 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012093sed 's/^/| /' conftest.$ac_ext >&5
12094
Skip Montanaro89e975f2007-08-22 19:05:21 +000012095ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000012096fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000012097rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012098 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000012099LIBS=$ac_check_lib_save_LIBS
12100fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000012101echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
12102echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000012103if test $ac_cv_lib_intl_textdomain = yes; then
12104
12105cat >>confdefs.h <<\_ACEOF
12106#define WITH_LIBINTL 1
12107_ACEOF
12108
12109fi
12110
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012111
12112# checks for system dependent C++ extensions support
12113case "$ac_sys_system" in
Skip Montanaro89e975f2007-08-22 19:05:21 +000012114 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
12115echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012116 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012117/* confdefs.h. */
12118_ACEOF
12119cat confdefs.h >>conftest.$ac_ext
12120cat >>conftest.$ac_ext <<_ACEOF
12121/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012122#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000012123int
12124main ()
12125{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012126loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000012127 ;
12128 return 0;
12129}
12130_ACEOF
12131rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000012132if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12133 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012135 grep -v '^ *+' conftest.er1 >conftest.err
12136 rm -f conftest.er1
12137 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000012139 (exit $ac_status); } &&
12140 { ac_try='test -z "$ac_c_werror_flag"
12141 || test ! -s conftest.err'
12142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12143 (eval $ac_try) 2>&5
12144 ac_status=$?
12145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12146 (exit $ac_status); }; } &&
12147 { ac_try='test -s conftest$ac_exeext'
12148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12149 (eval $ac_try) 2>&5
12150 ac_status=$?
12151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12152 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012153
Martin v. Löwis11437992002-04-12 09:54:03 +000012154cat >>confdefs.h <<\_ACEOF
12155#define AIX_GENUINE_CPLUSPLUS 1
12156_ACEOF
12157
Skip Montanaro89e975f2007-08-22 19:05:21 +000012158 echo "$as_me:$LINENO: result: yes" >&5
12159echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012160else
Martin v. Löwis11437992002-04-12 09:54:03 +000012161 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012162sed 's/^/| /' conftest.$ac_ext >&5
12163
Skip Montanaro89e975f2007-08-22 19:05:21 +000012164echo "$as_me:$LINENO: result: no" >&5
12165echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012166fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000012167rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012168 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000012169 *) ;;
12170esac
12171
Guido van Rossum70c7f481998-03-26 18:44:10 +000012172# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012173# BeOS' sockets are stashed in libnet.
Skip Montanaro89e975f2007-08-22 19:05:21 +000012174echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
12175echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012176if test "${ac_cv_lib_nsl_t_open+set}" = set; then
12177 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012178else
Martin v. Löwis11437992002-04-12 09:54:03 +000012179 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012180LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012181cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012182/* confdefs.h. */
12183_ACEOF
12184cat confdefs.h >>conftest.$ac_ext
12185cat >>conftest.$ac_ext <<_ACEOF
12186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012187
Skip Montanaro89e975f2007-08-22 19:05:21 +000012188/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012189#ifdef __cplusplus
12190extern "C"
12191#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000012192/* We use char because int might match the return type of a gcc2
12193 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012194char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012195int
12196main ()
12197{
Skip Montanaro89e975f2007-08-22 19:05:21 +000012198t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012199 ;
12200 return 0;
12201}
12202_ACEOF
12203rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000012204if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12205 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012206 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012207 grep -v '^ *+' conftest.er1 >conftest.err
12208 rm -f conftest.er1
12209 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000012211 (exit $ac_status); } &&
12212 { ac_try='test -z "$ac_c_werror_flag"
12213 || test ! -s conftest.err'
12214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12215 (eval $ac_try) 2>&5
12216 ac_status=$?
12217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12218 (exit $ac_status); }; } &&
12219 { ac_try='test -s conftest$ac_exeext'
12220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12221 (eval $ac_try) 2>&5
12222 ac_status=$?
12223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12224 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012225 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012226else
Martin v. Löwis11437992002-04-12 09:54:03 +000012227 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012228sed 's/^/| /' conftest.$ac_ext >&5
12229
Skip Montanaro89e975f2007-08-22 19:05:21 +000012230ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012231fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000012232rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012233 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012234LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012235fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000012236echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
12237echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012238if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012239 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000012240fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000012241 # SVR4
Skip Montanaro89e975f2007-08-22 19:05:21 +000012242echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
12243echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012244if test "${ac_cv_lib_socket_socket+set}" = set; then
12245 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012246else
Martin v. Löwis11437992002-04-12 09:54:03 +000012247 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012248LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012249cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012250/* confdefs.h. */
12251_ACEOF
12252cat confdefs.h >>conftest.$ac_ext
12253cat >>conftest.$ac_ext <<_ACEOF
12254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012255
Skip Montanaro89e975f2007-08-22 19:05:21 +000012256/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012257#ifdef __cplusplus
12258extern "C"
12259#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000012260/* We use char because int might match the return type of a gcc2
12261 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012262char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012263int
12264main ()
12265{
Skip Montanaro89e975f2007-08-22 19:05:21 +000012266socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012267 ;
12268 return 0;
12269}
12270_ACEOF
12271rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000012272if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12273 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012274 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012275 grep -v '^ *+' conftest.er1 >conftest.err
12276 rm -f conftest.er1
12277 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000012279 (exit $ac_status); } &&
12280 { ac_try='test -z "$ac_c_werror_flag"
12281 || test ! -s conftest.err'
12282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12283 (eval $ac_try) 2>&5
12284 ac_status=$?
12285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12286 (exit $ac_status); }; } &&
12287 { ac_try='test -s conftest$ac_exeext'
12288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12289 (eval $ac_try) 2>&5
12290 ac_status=$?
12291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12292 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012293 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012294else
Martin v. Löwis11437992002-04-12 09:54:03 +000012295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012296sed 's/^/| /' conftest.$ac_ext >&5
12297
Skip Montanaro89e975f2007-08-22 19:05:21 +000012298ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012299fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000012300rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012301 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012302LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012303fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000012304echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
12305echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012306if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000012307 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000012308fi
12309 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000012310
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000012311case "$ac_sys_system" in
12312BeOS*)
Skip Montanaro89e975f2007-08-22 19:05:21 +000012313echo "$as_me:$LINENO: checking for socket in -lnet" >&5
12314echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012315if test "${ac_cv_lib_net_socket+set}" = set; then
12316 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000012317else
Martin v. Löwis11437992002-04-12 09:54:03 +000012318 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000012319LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012320cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012321/* confdefs.h. */
12322_ACEOF
12323cat confdefs.h >>conftest.$ac_ext
12324cat >>conftest.$ac_ext <<_ACEOF
12325/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012326
Skip Montanaro89e975f2007-08-22 19:05:21 +000012327/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012328#ifdef __cplusplus
12329extern "C"
12330#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000012331/* We use char because int might match the return type of a gcc2
12332 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012333char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012334int
12335main ()
12336{
Skip Montanaro89e975f2007-08-22 19:05:21 +000012337socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012338 ;
12339 return 0;
12340}
12341_ACEOF
12342rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000012343if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12344 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012345 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012346 grep -v '^ *+' conftest.er1 >conftest.err
12347 rm -f conftest.er1
12348 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000012350 (exit $ac_status); } &&
12351 { ac_try='test -z "$ac_c_werror_flag"
12352 || test ! -s conftest.err'
12353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12354 (eval $ac_try) 2>&5
12355 ac_status=$?
12356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12357 (exit $ac_status); }; } &&
12358 { ac_try='test -s conftest$ac_exeext'
12359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12360 (eval $ac_try) 2>&5
12361 ac_status=$?
12362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12363 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012364 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000012365else
Martin v. Löwis11437992002-04-12 09:54:03 +000012366 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012367sed 's/^/| /' conftest.$ac_ext >&5
12368
Skip Montanaro89e975f2007-08-22 19:05:21 +000012369ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000012370fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000012371rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000012372 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012373LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000012374fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000012375echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
12376echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012377if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012378 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012379fi
12380 # BeOS
12381;;
12382esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000012383
Skip Montanaro89e975f2007-08-22 19:05:21 +000012384echo "$as_me:$LINENO: checking for --with-libs" >&5
12385echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012386
Skip Montanaro89e975f2007-08-22 19:05:21 +000012387# Check whether --with-libs or --without-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000012388if test "${with_libs+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000012389 withval="$with_libs"
12390
12391echo "$as_me:$LINENO: result: $withval" >&5
12392echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000012393LIBS="$withval $LIBS"
12394
12395else
Skip Montanaro89e975f2007-08-22 19:05:21 +000012396 echo "$as_me:$LINENO: result: no" >&5
12397echo "${ECHO_T}no" >&6
12398fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000012399
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012400# Check for use of the system libffi library
Skip Montanaro89e975f2007-08-22 19:05:21 +000012401echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
12402echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012403
Skip Montanaro89e975f2007-08-22 19:05:21 +000012404# Check whether --with-system_ffi or --without-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012405if test "${with_system_ffi+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000012406 withval="$with_system_ffi"
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012407
Skip Montanaro89e975f2007-08-22 19:05:21 +000012408fi;
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012409
12410if test -z "$with_system_ffi"
12411then with_system_ffi="no"
12412fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000012413echo "$as_me:$LINENO: result: $with_system_ffi" >&5
12414echo "${ECHO_T}$with_system_ffi" >&6
Martin v. Löwis9176fc12006-04-11 11:12:43 +000012415
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012416# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012417
12418
Skip Montanaro89e975f2007-08-22 19:05:21 +000012419echo "$as_me:$LINENO: checking for --with-signal-module" >&5
12420echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012421
Skip Montanaro89e975f2007-08-22 19:05:21 +000012422# Check whether --with-signal-module or --without-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012423if test "${with_signal_module+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000012424 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012425
Skip Montanaro89e975f2007-08-22 19:05:21 +000012426fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012427
12428if test -z "$with_signal_module"
12429then with_signal_module="yes"
12430fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000012431echo "$as_me:$LINENO: result: $with_signal_module" >&5
12432echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000012433
12434if test "${with_signal_module}" = "yes"; then
12435 USE_SIGNAL_MODULE=""
12436 SIGNAL_OBJS=""
12437else
12438 USE_SIGNAL_MODULE="#"
12439 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
12440fi
12441
Guido van Rossum3d15bd82001-01-10 18:53:48 +000012442# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000012443
Barry Warsawc0d24d82000-06-29 16:12:00 +000012444USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000012445
Skip Montanaro89e975f2007-08-22 19:05:21 +000012446echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
12447echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012448
Guido van Rossumec2f0731997-01-22 20:54:01 +000012449
Skip Montanaro89e975f2007-08-22 19:05:21 +000012450# Check whether --with-dec-threads or --without-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000012451if test "${with_dec_threads+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000012452 withval="$with_dec_threads"
12453
12454echo "$as_me:$LINENO: result: $withval" >&5
12455echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000012456LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000012457if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000012458 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000012459fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000012460else
Skip Montanaro89e975f2007-08-22 19:05:21 +000012461 echo "$as_me:$LINENO: result: no" >&5
12462echo "${ECHO_T}no" >&6
12463fi;
Martin v. Löwis11437992002-04-12 09:54:03 +000012464
12465# Templates for things AC_DEFINEd more than once.
12466# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000012467
12468
Martin v. Löwis11437992002-04-12 09:54:03 +000012469
12470
12471
12472
12473
Skip Montanaro89e975f2007-08-22 19:05:21 +000012474echo "$as_me:$LINENO: checking for --with-threads" >&5
12475echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012476
Skip Montanaro89e975f2007-08-22 19:05:21 +000012477# Check whether --with-threads or --without-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000012478if test "${with_threads+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000012479 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000012480
Skip Montanaro89e975f2007-08-22 19:05:21 +000012481fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000012482
Barry Warsawc0d24d82000-06-29 16:12:00 +000012483# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000012484
Skip Montanaro89e975f2007-08-22 19:05:21 +000012485# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012486if test "${with_thread+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000012487 withval="$with_thread"
12488 with_threads=$with_thread
12489fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +000012490
12491if test -z "$with_threads"
12492then with_threads="yes"
12493fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000012494echo "$as_me:$LINENO: result: $with_threads" >&5
12495echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +000012496
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012497
Barry Warsawc0d24d82000-06-29 16:12:00 +000012498if test "$with_threads" = "no"
12499then
12500 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012501elif test "$ac_cv_pthread_is_default" = yes
12502then
Martin v. Löwis11437992002-04-12 09:54:03 +000012503 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012504#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012505_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012506
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012507 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000012508 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012509#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012510_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012511
12512 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000012513 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012514elif test "$ac_cv_kpthread" = "yes"
12515then
12516 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000012517 if test "$ac_cv_cxx_thread" = "yes"; then
12518 CXX="$CXX -Kpthread"
12519 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012520 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000012521#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012522_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000012523
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012524 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012525 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012526elif test "$ac_cv_kthread" = "yes"
12527then
12528 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000012529 if test "$ac_cv_cxx_thread" = "yes"; then
12530 CXX="$CXX -Kthread"
12531 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012532 cat >>confdefs.h <<\_ACEOF
12533#define WITH_THREAD 1
12534_ACEOF
12535
12536 posix_threads=yes
12537 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012538elif test "$ac_cv_pthread" = "yes"
12539then
12540 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000012541 if test "$ac_cv_cxx_thread" = "yes"; then
12542 CXX="$CXX -pthread"
12543 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012544 cat >>confdefs.h <<\_ACEOF
12545#define WITH_THREAD 1
12546_ACEOF
12547
12548 posix_threads=yes
12549 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012550else
12551 if test ! -z "$with_threads" -a -d "$with_threads"
12552 then LDFLAGS="$LDFLAGS -L$with_threads"
12553 fi
12554 if test ! -z "$withval" -a -d "$withval"
12555 then LDFLAGS="$LDFLAGS -L$withval"
12556 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012557
12558 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000012559 # define _POSIX_THREADS in unistd.h. Some apparently don't
12560 # (e.g. gnu pth with pthread emulation)
Skip Montanaro89e975f2007-08-22 19:05:21 +000012561 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
12562echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012563 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012564/* confdefs.h. */
12565_ACEOF
12566cat confdefs.h >>conftest.$ac_ext
12567cat >>conftest.$ac_ext <<_ACEOF
12568/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012569
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012570#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000012571#ifdef _POSIX_THREADS
12572yes
12573#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012574
12575_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012576if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012577 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012578 unistd_defines_pthreads=yes
12579else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012580 unistd_defines_pthreads=no
12581fi
12582rm -f conftest*
12583
Skip Montanaro89e975f2007-08-22 19:05:21 +000012584 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
12585echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012586
Martin v. Löwis11437992002-04-12 09:54:03 +000012587 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000012588#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012589_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000012590
Martin v. Löwis11437992002-04-12 09:54:03 +000012591 if test "${ac_cv_header_cthreads_h+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000012592 echo "$as_me:$LINENO: checking for cthreads.h" >&5
12593echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012594if test "${ac_cv_header_cthreads_h+set}" = set; then
12595 echo $ECHO_N "(cached) $ECHO_C" >&6
12596fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000012597echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
12598echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012599else
Martin v. Löwis11437992002-04-12 09:54:03 +000012600 # Is the header compilable?
Skip Montanaro89e975f2007-08-22 19:05:21 +000012601echo "$as_me:$LINENO: checking cthreads.h usability" >&5
12602echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012603cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012604/* confdefs.h. */
12605_ACEOF
12606cat confdefs.h >>conftest.$ac_ext
12607cat >>conftest.$ac_ext <<_ACEOF
12608/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012609$ac_includes_default
12610#include <cthreads.h>
12611_ACEOF
12612rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000012613if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12614 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012616 grep -v '^ *+' conftest.er1 >conftest.err
12617 rm -f conftest.er1
12618 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000012620 (exit $ac_status); } &&
12621 { ac_try='test -z "$ac_c_werror_flag"
12622 || test ! -s conftest.err'
12623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12624 (eval $ac_try) 2>&5
12625 ac_status=$?
12626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12627 (exit $ac_status); }; } &&
12628 { ac_try='test -s conftest.$ac_objext'
12629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12630 (eval $ac_try) 2>&5
12631 ac_status=$?
12632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12633 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012634 ac_header_compiler=yes
12635else
12636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012637sed 's/^/| /' conftest.$ac_ext >&5
12638
Skip Montanaro89e975f2007-08-22 19:05:21 +000012639ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012640fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000012641rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12642echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12643echo "${ECHO_T}$ac_header_compiler" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012644
12645# Is the header present?
Skip Montanaro89e975f2007-08-22 19:05:21 +000012646echo "$as_me:$LINENO: checking cthreads.h presence" >&5
12647echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012648cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012649/* confdefs.h. */
12650_ACEOF
12651cat confdefs.h >>conftest.$ac_ext
12652cat >>conftest.$ac_ext <<_ACEOF
12653/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012654#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012655_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +000012656if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12657 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012658 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012659 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012660 rm -f conftest.er1
12661 cat conftest.err >&5
12662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000012663 (exit $ac_status); } >/dev/null; then
12664 if test -s conftest.err; then
12665 ac_cpp_err=$ac_c_preproc_warn_flag
12666 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12667 else
12668 ac_cpp_err=
12669 fi
12670else
12671 ac_cpp_err=yes
12672fi
12673if test -z "$ac_cpp_err"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012674 ac_header_preproc=yes
12675else
12676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012677sed 's/^/| /' conftest.$ac_ext >&5
12678
Martin v. Löwis11437992002-04-12 09:54:03 +000012679 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012680fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012681rm -f conftest.err conftest.$ac_ext
Skip Montanaro89e975f2007-08-22 19:05:21 +000012682echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12683echo "${ECHO_T}$ac_header_preproc" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012684
12685# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012686case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12687 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012688 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
12689echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012690 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
12691echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
12692 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012693 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012694 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012695 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
12696echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012697 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
12698echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
12699 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
12700echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
12701 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
12702echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012703 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
12704echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012705 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
12706echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +000012707 (
12708 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012709## ------------------------------------------------ ##
12710## Report this to http://www.python.org/python-bugs ##
12711## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012712_ASBOX
Skip Montanaro89e975f2007-08-22 19:05:21 +000012713 ) |
12714 sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000012715 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012716esac
Skip Montanaro89e975f2007-08-22 19:05:21 +000012717echo "$as_me:$LINENO: checking for cthreads.h" >&5
12718echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012719if test "${ac_cv_header_cthreads_h+set}" = set; then
12720 echo $ECHO_N "(cached) $ECHO_C" >&6
12721else
12722 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012723fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000012724echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
12725echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012726
12727fi
12728if test $ac_cv_header_cthreads_h = yes; then
12729 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012730#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012731_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012732
Martin v. Löwis11437992002-04-12 09:54:03 +000012733 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012734#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012735_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012736
Martin v. Löwis11437992002-04-12 09:54:03 +000012737
12738cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012739#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012740_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012741
12742 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012743 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012744else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012745
Martin v. Löwis11437992002-04-12 09:54:03 +000012746 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000012747 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
12748echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012749if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
12750 echo $ECHO_N "(cached) $ECHO_C" >&6
12751fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000012752echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
12753echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012754else
Martin v. Löwis11437992002-04-12 09:54:03 +000012755 # Is the header compilable?
Skip Montanaro89e975f2007-08-22 19:05:21 +000012756echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
12757echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012758cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012759/* confdefs.h. */
12760_ACEOF
12761cat confdefs.h >>conftest.$ac_ext
12762cat >>conftest.$ac_ext <<_ACEOF
12763/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012764$ac_includes_default
12765#include <mach/cthreads.h>
12766_ACEOF
12767rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000012768if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
12769 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012771 grep -v '^ *+' conftest.er1 >conftest.err
12772 rm -f conftest.er1
12773 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000012775 (exit $ac_status); } &&
12776 { ac_try='test -z "$ac_c_werror_flag"
12777 || test ! -s conftest.err'
12778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12779 (eval $ac_try) 2>&5
12780 ac_status=$?
12781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12782 (exit $ac_status); }; } &&
12783 { ac_try='test -s conftest.$ac_objext'
12784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12785 (eval $ac_try) 2>&5
12786 ac_status=$?
12787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12788 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012789 ac_header_compiler=yes
12790else
12791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012792sed 's/^/| /' conftest.$ac_ext >&5
12793
Skip Montanaro89e975f2007-08-22 19:05:21 +000012794ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012795fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000012796rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
12797echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12798echo "${ECHO_T}$ac_header_compiler" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012799
12800# Is the header present?
Skip Montanaro89e975f2007-08-22 19:05:21 +000012801echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
12802echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012803cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012804/* confdefs.h. */
12805_ACEOF
12806cat confdefs.h >>conftest.$ac_ext
12807cat >>conftest.$ac_ext <<_ACEOF
12808/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012809#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012810_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +000012811if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12812 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012813 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012814 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012815 rm -f conftest.er1
12816 cat conftest.err >&5
12817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000012818 (exit $ac_status); } >/dev/null; then
12819 if test -s conftest.err; then
12820 ac_cpp_err=$ac_c_preproc_warn_flag
12821 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
12822 else
12823 ac_cpp_err=
12824 fi
12825else
12826 ac_cpp_err=yes
12827fi
12828if test -z "$ac_cpp_err"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012829 ac_header_preproc=yes
12830else
12831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012832sed 's/^/| /' conftest.$ac_ext >&5
12833
Martin v. Löwis11437992002-04-12 09:54:03 +000012834 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012835fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012836rm -f conftest.err conftest.$ac_ext
Skip Montanaro89e975f2007-08-22 19:05:21 +000012837echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12838echo "${ECHO_T}$ac_header_preproc" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012839
12840# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012841case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12842 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012843 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
12844echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012845 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
12846echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
12847 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012848 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012849 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012850 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
12851echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012852 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
12853echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
12854 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
12855echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
12856 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
12857echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012858 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
12859echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012860 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
12861echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +000012862 (
12863 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000012864## ------------------------------------------------ ##
12865## Report this to http://www.python.org/python-bugs ##
12866## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012867_ASBOX
Skip Montanaro89e975f2007-08-22 19:05:21 +000012868 ) |
12869 sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000012870 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012871esac
Skip Montanaro89e975f2007-08-22 19:05:21 +000012872echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
12873echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012874if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
12875 echo $ECHO_N "(cached) $ECHO_C" >&6
12876else
12877 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012878fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000012879echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
12880echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012881
12882fi
12883if test $ac_cv_header_mach_cthreads_h = yes; then
12884 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012885#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012886_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012887
Martin v. Löwis11437992002-04-12 09:54:03 +000012888 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012889#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012890_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012891
Martin v. Löwis11437992002-04-12 09:54:03 +000012892
12893cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012894#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012895_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012896
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012897 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012898else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012899
Skip Montanaro89e975f2007-08-22 19:05:21 +000012900 echo "$as_me:$LINENO: checking for --with-pth" >&5
12901echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012902
Skip Montanaro89e975f2007-08-22 19:05:21 +000012903# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012904if test "${with_pth+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000012905 withval="$with_pth"
12906 echo "$as_me:$LINENO: result: $withval" >&5
12907echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012908 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000012909#define WITH_THREAD 1
12910_ACEOF
12911
12912
12913cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012914#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012915_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012916
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000012917 LIBS="-lpth $LIBS"
12918 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000012919else
Skip Montanaro89e975f2007-08-22 19:05:21 +000012920 echo "$as_me:$LINENO: result: no" >&5
12921echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012922
12923 # Just looking for pthread_create in libpthread is not enough:
12924 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
12925 # So we really have to include pthread.h, and then link.
12926 _libs=$LIBS
12927 LIBS="$LIBS -lpthread"
Skip Montanaro89e975f2007-08-22 19:05:21 +000012928 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
12929echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012931/* confdefs.h. */
12932_ACEOF
12933cat confdefs.h >>conftest.$ac_ext
12934cat >>conftest.$ac_ext <<_ACEOF
12935/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012936#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000012937
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012938void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000012939int
12940main ()
12941{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012942
12943pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000012944 ;
12945 return 0;
12946}
12947_ACEOF
12948rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000012949if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12950 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012952 grep -v '^ *+' conftest.er1 >conftest.err
12953 rm -f conftest.er1
12954 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000012956 (exit $ac_status); } &&
12957 { ac_try='test -z "$ac_c_werror_flag"
12958 || test ! -s conftest.err'
12959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12960 (eval $ac_try) 2>&5
12961 ac_status=$?
12962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12963 (exit $ac_status); }; } &&
12964 { ac_try='test -s conftest$ac_exeext'
12965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12966 (eval $ac_try) 2>&5
12967 ac_status=$?
12968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12969 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012970
Skip Montanaro89e975f2007-08-22 19:05:21 +000012971 echo "$as_me:$LINENO: result: yes" >&5
12972echo "${ECHO_T}yes" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012973 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000012974#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012975_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000012976
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000012977 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012978 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000012979else
Martin v. Löwis11437992002-04-12 09:54:03 +000012980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012981sed 's/^/| /' conftest.$ac_ext >&5
12982
Martin v. Löwis11437992002-04-12 09:54:03 +000012983
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000012984 LIBS=$_libs
Skip Montanaro89e975f2007-08-22 19:05:21 +000012985 echo "$as_me:$LINENO: checking for pthread_detach" >&5
12986echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012987if test "${ac_cv_func_pthread_detach+set}" = set; then
12988 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000012989else
Martin v. Löwis11437992002-04-12 09:54:03 +000012990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012991/* confdefs.h. */
12992_ACEOF
12993cat confdefs.h >>conftest.$ac_ext
12994cat >>conftest.$ac_ext <<_ACEOF
12995/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000012996/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
12997 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12998#define pthread_detach innocuous_pthread_detach
12999
Guido van Rossumad678af1998-10-02 14:42:15 +000013000/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013001 which can conflict with char pthread_detach (); below.
13002 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013003 <limits.h> exists even on freestanding compilers. */
13004
13005#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013006# include <limits.h>
13007#else
13008# include <assert.h>
13009#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013010
13011#undef pthread_detach
13012
Skip Montanaro89e975f2007-08-22 19:05:21 +000013013/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013014#ifdef __cplusplus
13015extern "C"
Skip Montanaro89e975f2007-08-22 19:05:21 +000013016{
Martin v. Löwis11437992002-04-12 09:54:03 +000013017#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000013018/* We use char because int might match the return type of a gcc2
13019 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013020char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000013021/* The GNU C library defines this for functions which it implements
13022 to always fail with ENOSYS. Some functions are actually named
13023 something starting with __ and the normal name is an alias. */
Skip Montanaro89e975f2007-08-22 19:05:21 +000013024#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000013025choke me
Skip Montanaro89e975f2007-08-22 19:05:21 +000013026#else
13027char (*f) () = pthread_detach;
13028#endif
13029#ifdef __cplusplus
13030}
Guido van Rossumad678af1998-10-02 14:42:15 +000013031#endif
13032
Skip Montanaro6dead952003-09-25 14:50:04 +000013033int
13034main ()
13035{
Skip Montanaro89e975f2007-08-22 19:05:21 +000013036return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000013037 ;
13038 return 0;
13039}
13040_ACEOF
13041rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000013042if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13043 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013045 grep -v '^ *+' conftest.er1 >conftest.err
13046 rm -f conftest.er1
13047 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000013049 (exit $ac_status); } &&
13050 { ac_try='test -z "$ac_c_werror_flag"
13051 || test ! -s conftest.err'
13052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13053 (eval $ac_try) 2>&5
13054 ac_status=$?
13055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13056 (exit $ac_status); }; } &&
13057 { ac_try='test -s conftest$ac_exeext'
13058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13059 (eval $ac_try) 2>&5
13060 ac_status=$?
13061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13062 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013063 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000013064else
Martin v. Löwis11437992002-04-12 09:54:03 +000013065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013066sed 's/^/| /' conftest.$ac_ext >&5
13067
Skip Montanaro89e975f2007-08-22 19:05:21 +000013068ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000013069fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013070rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013071 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000013072fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013073echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
13074echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013075if test $ac_cv_func_pthread_detach = yes; then
13076 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013077#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013078_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000013079
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000013080 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013081 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000013082else
Guido van Rossumad678af1998-10-02 14:42:15 +000013083
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013084 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000013085 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13086echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013087if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13088 echo $ECHO_N "(cached) $ECHO_C" >&6
13089fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013090echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13091echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013092else
13093 # Is the header compilable?
Skip Montanaro89e975f2007-08-22 19:05:21 +000013094echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
13095echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013096cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013097/* confdefs.h. */
13098_ACEOF
13099cat confdefs.h >>conftest.$ac_ext
13100cat >>conftest.$ac_ext <<_ACEOF
13101/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013102$ac_includes_default
13103#include <atheos/threads.h>
13104_ACEOF
13105rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000013106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13107 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013109 grep -v '^ *+' conftest.er1 >conftest.err
13110 rm -f conftest.er1
13111 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000013113 (exit $ac_status); } &&
13114 { ac_try='test -z "$ac_c_werror_flag"
13115 || test ! -s conftest.err'
13116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13117 (eval $ac_try) 2>&5
13118 ac_status=$?
13119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13120 (exit $ac_status); }; } &&
13121 { ac_try='test -s conftest.$ac_objext'
13122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13123 (eval $ac_try) 2>&5
13124 ac_status=$?
13125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13126 (exit $ac_status); }; }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013127 ac_header_compiler=yes
13128else
13129 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013130sed 's/^/| /' conftest.$ac_ext >&5
13131
Skip Montanaro89e975f2007-08-22 19:05:21 +000013132ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013133fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013134rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13135echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13136echo "${ECHO_T}$ac_header_compiler" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013137
13138# Is the header present?
Skip Montanaro89e975f2007-08-22 19:05:21 +000013139echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
13140echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013141cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013142/* confdefs.h. */
13143_ACEOF
13144cat confdefs.h >>conftest.$ac_ext
13145cat >>conftest.$ac_ext <<_ACEOF
13146/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013147#include <atheos/threads.h>
13148_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +000013149if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13150 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013151 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013152 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013153 rm -f conftest.er1
13154 cat conftest.err >&5
13155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000013156 (exit $ac_status); } >/dev/null; then
13157 if test -s conftest.err; then
13158 ac_cpp_err=$ac_c_preproc_warn_flag
13159 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13160 else
13161 ac_cpp_err=
13162 fi
13163else
13164 ac_cpp_err=yes
13165fi
13166if test -z "$ac_cpp_err"; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013167 ac_header_preproc=yes
13168else
13169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013170sed 's/^/| /' conftest.$ac_ext >&5
13171
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013172 ac_header_preproc=no
13173fi
13174rm -f conftest.err conftest.$ac_ext
Skip Montanaro89e975f2007-08-22 19:05:21 +000013175echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13176echo "${ECHO_T}$ac_header_preproc" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013177
13178# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013179case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13180 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013181 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
13182echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013183 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
13184echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
13185 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013186 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013187 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013188 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
13189echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013190 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
13191echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
13192 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
13193echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
13194 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
13195echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013196 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
13197echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013198 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
13199echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +000013200 (
13201 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013202## ------------------------------------------------ ##
13203## Report this to http://www.python.org/python-bugs ##
13204## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013205_ASBOX
Skip Montanaro89e975f2007-08-22 19:05:21 +000013206 ) |
13207 sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013208 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013209esac
Skip Montanaro89e975f2007-08-22 19:05:21 +000013210echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
13211echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013212if test "${ac_cv_header_atheos_threads_h+set}" = set; then
13213 echo $ECHO_N "(cached) $ECHO_C" >&6
13214else
13215 ac_cv_header_atheos_threads_h=$ac_header_preproc
13216fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013217echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
13218echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013219
13220fi
13221if test $ac_cv_header_atheos_threads_h = yes; then
13222 cat >>confdefs.h <<\_ACEOF
13223#define WITH_THREAD 1
13224_ACEOF
13225
13226
13227cat >>confdefs.h <<\_ACEOF
13228#define ATHEOS_THREADS 1
13229_ACEOF
13230
13231 THREADOBJ="Python/thread.o"
13232else
13233
Martin v. Löwis11437992002-04-12 09:54:03 +000013234 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000013235 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
13236echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013237if test "${ac_cv_header_kernel_OS_h+set}" = set; then
13238 echo $ECHO_N "(cached) $ECHO_C" >&6
13239fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013240echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
13241echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013242else
Martin v. Löwis11437992002-04-12 09:54:03 +000013243 # Is the header compilable?
Skip Montanaro89e975f2007-08-22 19:05:21 +000013244echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
13245echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013246cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013247/* confdefs.h. */
13248_ACEOF
13249cat confdefs.h >>conftest.$ac_ext
13250cat >>conftest.$ac_ext <<_ACEOF
13251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013252$ac_includes_default
13253#include <kernel/OS.h>
13254_ACEOF
13255rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000013256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
13257 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013258 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013259 grep -v '^ *+' conftest.er1 >conftest.err
13260 rm -f conftest.er1
13261 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000013263 (exit $ac_status); } &&
13264 { ac_try='test -z "$ac_c_werror_flag"
13265 || test ! -s conftest.err'
13266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13267 (eval $ac_try) 2>&5
13268 ac_status=$?
13269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13270 (exit $ac_status); }; } &&
13271 { ac_try='test -s conftest.$ac_objext'
13272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13273 (eval $ac_try) 2>&5
13274 ac_status=$?
13275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13276 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013277 ac_header_compiler=yes
13278else
13279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013280sed 's/^/| /' conftest.$ac_ext >&5
13281
Skip Montanaro89e975f2007-08-22 19:05:21 +000013282ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013283fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013284rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
13285echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13286echo "${ECHO_T}$ac_header_compiler" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013287
13288# Is the header present?
Skip Montanaro89e975f2007-08-22 19:05:21 +000013289echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
13290echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013291cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013292/* confdefs.h. */
13293_ACEOF
13294cat confdefs.h >>conftest.$ac_ext
13295cat >>conftest.$ac_ext <<_ACEOF
13296/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013297#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013298_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +000013299if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
13300 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013301 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000013302 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000013303 rm -f conftest.er1
13304 cat conftest.err >&5
13305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000013306 (exit $ac_status); } >/dev/null; then
13307 if test -s conftest.err; then
13308 ac_cpp_err=$ac_c_preproc_warn_flag
13309 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
13310 else
13311 ac_cpp_err=
13312 fi
13313else
13314 ac_cpp_err=yes
13315fi
13316if test -z "$ac_cpp_err"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013317 ac_header_preproc=yes
13318else
13319 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013320sed 's/^/| /' conftest.$ac_ext >&5
13321
Martin v. Löwis11437992002-04-12 09:54:03 +000013322 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013323fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013324rm -f conftest.err conftest.$ac_ext
Skip Montanaro89e975f2007-08-22 19:05:21 +000013325echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13326echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013327
Martin v. Löwis11437992002-04-12 09:54:03 +000013328# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013329case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13330 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000013331 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
13332echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013333 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
13334echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
13335 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013336 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000013337 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013338 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
13339echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013340 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
13341echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
13342 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
13343echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
13344 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
13345echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013346 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
13347echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000013348 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
13349echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +000013350 (
13351 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000013352## ------------------------------------------------ ##
13353## Report this to http://www.python.org/python-bugs ##
13354## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000013355_ASBOX
Skip Montanaro89e975f2007-08-22 19:05:21 +000013356 ) |
13357 sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000013358 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013359esac
Skip Montanaro89e975f2007-08-22 19:05:21 +000013360echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
13361echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013362if test "${ac_cv_header_kernel_OS_h+set}" = set; then
13363 echo $ECHO_N "(cached) $ECHO_C" >&6
13364else
13365 ac_cv_header_kernel_OS_h=$ac_header_preproc
13366fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013367echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
13368echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013369
13370fi
13371if test $ac_cv_header_kernel_OS_h = yes; then
13372 cat >>confdefs.h <<\_ACEOF
13373#define WITH_THREAD 1
13374_ACEOF
13375
13376
13377cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013378#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013379_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013380
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013381 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013382else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013383
Skip Montanaro89e975f2007-08-22 19:05:21 +000013384 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
13385echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013386if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
13387 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013388else
Martin v. Löwis11437992002-04-12 09:54:03 +000013389 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013390LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013391cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013392/* confdefs.h. */
13393_ACEOF
13394cat confdefs.h >>conftest.$ac_ext
13395cat >>conftest.$ac_ext <<_ACEOF
13396/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013397
Skip Montanaro89e975f2007-08-22 19:05:21 +000013398/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013399#ifdef __cplusplus
13400extern "C"
13401#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000013402/* We use char because int might match the return type of a gcc2
13403 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013404char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013405int
13406main ()
13407{
Skip Montanaro89e975f2007-08-22 19:05:21 +000013408pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013409 ;
13410 return 0;
13411}
13412_ACEOF
13413rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000013414if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13415 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013417 grep -v '^ *+' conftest.er1 >conftest.err
13418 rm -f conftest.er1
13419 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000013421 (exit $ac_status); } &&
13422 { ac_try='test -z "$ac_c_werror_flag"
13423 || test ! -s conftest.err'
13424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13425 (eval $ac_try) 2>&5
13426 ac_status=$?
13427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13428 (exit $ac_status); }; } &&
13429 { ac_try='test -s conftest$ac_exeext'
13430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13431 (eval $ac_try) 2>&5
13432 ac_status=$?
13433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13434 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013435 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000013436else
Martin v. Löwis11437992002-04-12 09:54:03 +000013437 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013438sed 's/^/| /' conftest.$ac_ext >&5
13439
Skip Montanaro89e975f2007-08-22 19:05:21 +000013440ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000013441fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013442rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013443 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013444LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000013445fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013446echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
13447echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013448if test $ac_cv_lib_pthreads_pthread_create = yes; then
13449 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000013450#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013451_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000013452
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013453 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000013454 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013455 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000013456else
Greg Steinadf63d62000-07-05 10:38:09 +000013457
Skip Montanaro89e975f2007-08-22 19:05:21 +000013458 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
13459echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013460if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
13461 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000013462else
Martin v. Löwis11437992002-04-12 09:54:03 +000013463 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000013464LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013465cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013466/* confdefs.h. */
13467_ACEOF
13468cat confdefs.h >>conftest.$ac_ext
13469cat >>conftest.$ac_ext <<_ACEOF
13470/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013471
Skip Montanaro89e975f2007-08-22 19:05:21 +000013472/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013473#ifdef __cplusplus
13474extern "C"
13475#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000013476/* We use char because int might match the return type of a gcc2
13477 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013478char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013479int
13480main ()
13481{
Skip Montanaro89e975f2007-08-22 19:05:21 +000013482pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013483 ;
13484 return 0;
13485}
13486_ACEOF
13487rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000013488if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13489 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013491 grep -v '^ *+' conftest.er1 >conftest.err
13492 rm -f conftest.er1
13493 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000013495 (exit $ac_status); } &&
13496 { ac_try='test -z "$ac_c_werror_flag"
13497 || test ! -s conftest.err'
13498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13499 (eval $ac_try) 2>&5
13500 ac_status=$?
13501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13502 (exit $ac_status); }; } &&
13503 { ac_try='test -s conftest$ac_exeext'
13504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13505 (eval $ac_try) 2>&5
13506 ac_status=$?
13507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13508 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013509 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000013510else
Martin v. Löwis11437992002-04-12 09:54:03 +000013511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013512sed 's/^/| /' conftest.$ac_ext >&5
13513
Skip Montanaro89e975f2007-08-22 19:05:21 +000013514ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000013515fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013516rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013517 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013518LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000013519fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013520echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
13521echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013522if test $ac_cv_lib_c_r_pthread_create = yes; then
13523 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000013524#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013525_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000013526
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013527 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000013528 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013529 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000013530else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000013531
Skip Montanaro89e975f2007-08-22 19:05:21 +000013532 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
13533echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013534if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
13535 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013536else
Martin v. Löwis11437992002-04-12 09:54:03 +000013537 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013538LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013539cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013540/* confdefs.h. */
13541_ACEOF
13542cat confdefs.h >>conftest.$ac_ext
13543cat >>conftest.$ac_ext <<_ACEOF
13544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013545
Skip Montanaro89e975f2007-08-22 19:05:21 +000013546/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013547#ifdef __cplusplus
13548extern "C"
13549#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000013550/* We use char because int might match the return type of a gcc2
13551 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013552char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013553int
13554main ()
13555{
Skip Montanaro89e975f2007-08-22 19:05:21 +000013556__pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013557 ;
13558 return 0;
13559}
13560_ACEOF
13561rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000013562if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13563 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013565 grep -v '^ *+' conftest.er1 >conftest.err
13566 rm -f conftest.er1
13567 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000013569 (exit $ac_status); } &&
13570 { ac_try='test -z "$ac_c_werror_flag"
13571 || test ! -s conftest.err'
13572 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13573 (eval $ac_try) 2>&5
13574 ac_status=$?
13575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13576 (exit $ac_status); }; } &&
13577 { ac_try='test -s conftest$ac_exeext'
13578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13579 (eval $ac_try) 2>&5
13580 ac_status=$?
13581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13582 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013583 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013584else
Martin v. Löwis11437992002-04-12 09:54:03 +000013585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013586sed 's/^/| /' conftest.$ac_ext >&5
13587
Skip Montanaro89e975f2007-08-22 19:05:21 +000013588ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013589fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013590rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013591 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013592LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013593fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013594echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
13595echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013596if test $ac_cv_lib_pthread___pthread_create_system = yes; then
13597 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013598#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013599_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013600
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013601 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000013602 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013603 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013604else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000013605
Skip Montanaro89e975f2007-08-22 19:05:21 +000013606 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
13607echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013608if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
13609 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000013610else
Martin v. Löwis11437992002-04-12 09:54:03 +000013611 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000013612LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013613cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013614/* confdefs.h. */
13615_ACEOF
13616cat confdefs.h >>conftest.$ac_ext
13617cat >>conftest.$ac_ext <<_ACEOF
13618/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013619
Skip Montanaro89e975f2007-08-22 19:05:21 +000013620/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013621#ifdef __cplusplus
13622extern "C"
13623#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000013624/* We use char because int might match the return type of a gcc2
13625 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013626char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013627int
13628main ()
13629{
Skip Montanaro89e975f2007-08-22 19:05:21 +000013630pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013631 ;
13632 return 0;
13633}
13634_ACEOF
13635rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000013636if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13637 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013639 grep -v '^ *+' conftest.er1 >conftest.err
13640 rm -f conftest.er1
13641 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000013643 (exit $ac_status); } &&
13644 { ac_try='test -z "$ac_c_werror_flag"
13645 || test ! -s conftest.err'
13646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13647 (eval $ac_try) 2>&5
13648 ac_status=$?
13649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13650 (exit $ac_status); }; } &&
13651 { ac_try='test -s conftest$ac_exeext'
13652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13653 (eval $ac_try) 2>&5
13654 ac_status=$?
13655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13656 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013657 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000013658else
Martin v. Löwis11437992002-04-12 09:54:03 +000013659 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013660sed 's/^/| /' conftest.$ac_ext >&5
13661
Skip Montanaro89e975f2007-08-22 19:05:21 +000013662ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000013663fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013664rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013665 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013666LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000013667fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013668echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
13669echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013670if test $ac_cv_lib_cma_pthread_create = yes; then
13671 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000013672#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013673_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000013674
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013675 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000013676 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013677 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000013678else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000013679
Martin v. Löwis130fb172001-07-19 11:00:41 +000013680 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000013681fi
13682
Guido van Rossum627b2d71993-12-24 10:39:16 +000013683
Guido van Rossum7b3853f1996-07-30 18:09:35 +000013684fi
13685
Guido van Rossum0be3e491997-05-22 20:33:33 +000013686fi
13687
Guido van Rossum49545951997-12-02 19:28:29 +000013688fi
13689
Guido van Rossumb93a8621998-05-07 13:27:32 +000013690fi
13691
Guido van Rossum07bd90e2000-05-08 13:41:38 +000013692
Michael W. Hudson54241132001-12-07 15:38:26 +000013693fi
13694
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013695
13696fi
13697
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013698fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013699rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013700 conftest$ac_exeext conftest.$ac_ext
Skip Montanaro89e975f2007-08-22 19:05:21 +000013701fi;
Martin v. Löwis11437992002-04-12 09:54:03 +000013702fi
13703
13704
13705fi
13706
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013707
Michael W. Hudson54241132001-12-07 15:38:26 +000013708
Skip Montanaro89e975f2007-08-22 19:05:21 +000013709 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
13710echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013711if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
13712 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013713else
Martin v. Löwis11437992002-04-12 09:54:03 +000013714 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013715LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013716cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013717/* confdefs.h. */
13718_ACEOF
13719cat confdefs.h >>conftest.$ac_ext
13720cat >>conftest.$ac_ext <<_ACEOF
13721/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013722
Skip Montanaro89e975f2007-08-22 19:05:21 +000013723/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013724#ifdef __cplusplus
13725extern "C"
13726#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000013727/* We use char because int might match the return type of a gcc2
13728 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013729char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013730int
13731main ()
13732{
Skip Montanaro89e975f2007-08-22 19:05:21 +000013733usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013734 ;
13735 return 0;
13736}
13737_ACEOF
13738rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000013739if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13740 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013742 grep -v '^ *+' conftest.er1 >conftest.err
13743 rm -f conftest.er1
13744 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000013746 (exit $ac_status); } &&
13747 { ac_try='test -z "$ac_c_werror_flag"
13748 || test ! -s conftest.err'
13749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13750 (eval $ac_try) 2>&5
13751 ac_status=$?
13752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13753 (exit $ac_status); }; } &&
13754 { ac_try='test -s conftest$ac_exeext'
13755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13756 (eval $ac_try) 2>&5
13757 ac_status=$?
13758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13759 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013760 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013761else
Martin v. Löwis11437992002-04-12 09:54:03 +000013762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013763sed 's/^/| /' conftest.$ac_ext >&5
13764
Skip Montanaro89e975f2007-08-22 19:05:21 +000013765ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013766fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013767rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013768 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013769LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013770fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013771echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
13772echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013773if test $ac_cv_lib_mpc_usconfig = yes; then
13774 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013775#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013776_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013777
Martin v. Löwis130fb172001-07-19 11:00:41 +000013778 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013779 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013780 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000013781fi
13782
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013783
Neal Norwitza978ab02002-11-02 16:58:05 +000013784 if test "$posix_threads" != "yes"; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000013785 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
13786echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013787if test "${ac_cv_lib_thread_thr_create+set}" = set; then
13788 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013789else
Martin v. Löwis11437992002-04-12 09:54:03 +000013790 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013791LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013792cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013793/* confdefs.h. */
13794_ACEOF
13795cat confdefs.h >>conftest.$ac_ext
13796cat >>conftest.$ac_ext <<_ACEOF
13797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013798
Skip Montanaro89e975f2007-08-22 19:05:21 +000013799/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013800#ifdef __cplusplus
13801extern "C"
13802#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000013803/* We use char because int might match the return type of a gcc2
13804 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013805char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013806int
13807main ()
13808{
Skip Montanaro89e975f2007-08-22 19:05:21 +000013809thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013810 ;
13811 return 0;
13812}
13813_ACEOF
13814rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000013815if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13816 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013818 grep -v '^ *+' conftest.er1 >conftest.err
13819 rm -f conftest.er1
13820 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000013822 (exit $ac_status); } &&
13823 { ac_try='test -z "$ac_c_werror_flag"
13824 || test ! -s conftest.err'
13825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13826 (eval $ac_try) 2>&5
13827 ac_status=$?
13828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13829 (exit $ac_status); }; } &&
13830 { ac_try='test -s conftest$ac_exeext'
13831 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13832 (eval $ac_try) 2>&5
13833 ac_status=$?
13834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13835 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013836 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013837else
Martin v. Löwis11437992002-04-12 09:54:03 +000013838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013839sed 's/^/| /' conftest.$ac_ext >&5
13840
Skip Montanaro89e975f2007-08-22 19:05:21 +000013841ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013842fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013843rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013844 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013845LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013846fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013847echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
13848echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000013849if test $ac_cv_lib_thread_thr_create = yes; then
13850 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013851#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013852_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013853
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013854 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000013855 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013856 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000013857fi
13858
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000013859 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000013860
Martin v. Löwis130fb172001-07-19 11:00:41 +000013861 if test "$USE_THREAD_MODULE" != "#"
13862 then
13863 # If the above checks didn't disable threads, (at least) OSF1
13864 # needs this '-threads' argument during linking.
13865 case $ac_sys_system in
13866 OSF1) LDLAST=-threads;;
13867 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000013868 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013869fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013870
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013871if test "$posix_threads" = "yes"; then
13872 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013873
13874cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013875#define _POSIX_THREADS 1
13876_ACEOF
13877
13878 fi
13879
13880 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
13881 case $ac_sys_system/$ac_sys_release in
13882 SunOS/5.6)
13883cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013884#define HAVE_PTHREAD_DESTRUCTOR 1
13885_ACEOF
13886
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013887 ;;
13888 SunOS/5.8)
13889cat >>confdefs.h <<\_ACEOF
13890#define HAVE_BROKEN_POSIX_SEMAPHORES 1
13891_ACEOF
13892
13893 ;;
13894 esac
13895
Skip Montanaro89e975f2007-08-22 19:05:21 +000013896 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
13897echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013898 if test "${ac_cv_pthread_system_supported+set}" = set; then
13899 echo $ECHO_N "(cached) $ECHO_C" >&6
13900else
13901 if test "$cross_compiling" = yes; then
13902 ac_cv_pthread_system_supported=no
13903else
13904 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013905/* confdefs.h. */
13906_ACEOF
13907cat confdefs.h >>conftest.$ac_ext
13908cat >>conftest.$ac_ext <<_ACEOF
13909/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013910#include <pthread.h>
13911 void *foo(void *parm) {
13912 return NULL;
13913 }
13914 main() {
13915 pthread_attr_t attr;
13916 pthread_t id;
13917 if (pthread_attr_init(&attr)) exit(-1);
13918 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
13919 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
13920 exit(0);
13921 }
13922_ACEOF
13923rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000013924if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
13925 (eval $ac_link) 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013926 ac_status=$?
13927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13928 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +000013929 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13930 (eval $ac_try) 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013931 ac_status=$?
13932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13933 (exit $ac_status); }; }; then
13934 ac_cv_pthread_system_supported=yes
13935else
13936 echo "$as_me: program exited with status $ac_status" >&5
13937echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013938sed 's/^/| /' conftest.$ac_ext >&5
13939
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013940( exit $ac_status )
13941ac_cv_pthread_system_supported=no
13942fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000013943rm -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 +000013944fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000013945
Guido van Rossum627b2d71993-12-24 10:39:16 +000013946fi
13947
Skip Montanaro89e975f2007-08-22 19:05:21 +000013948 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
13949echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013950 if test "$ac_cv_pthread_system_supported" = "yes"; then
13951
13952cat >>confdefs.h <<\_ACEOF
13953#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
13954_ACEOF
13955
13956 fi
13957
13958for ac_func in pthread_sigmask
13959do
13960as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaro89e975f2007-08-22 19:05:21 +000013961echo "$as_me:$LINENO: checking for $ac_func" >&5
13962echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13963if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013964 echo $ECHO_N "(cached) $ECHO_C" >&6
13965else
13966 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013967/* confdefs.h. */
13968_ACEOF
13969cat confdefs.h >>conftest.$ac_ext
13970cat >>conftest.$ac_ext <<_ACEOF
13971/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013972/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13973 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13974#define $ac_func innocuous_$ac_func
13975
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013976/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013977 which can conflict with char $ac_func (); below.
13978 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013979 <limits.h> exists even on freestanding compilers. */
13980
13981#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000013982# include <limits.h>
13983#else
13984# include <assert.h>
13985#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000013986
13987#undef $ac_func
13988
Skip Montanaro89e975f2007-08-22 19:05:21 +000013989/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013990#ifdef __cplusplus
13991extern "C"
Skip Montanaro89e975f2007-08-22 19:05:21 +000013992{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013993#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000013994/* We use char because int might match the return type of a gcc2
13995 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013996char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013997/* The GNU C library defines this for functions which it implements
13998 to always fail with ENOSYS. Some functions are actually named
13999 something starting with __ and the normal name is an alias. */
Skip Montanaro89e975f2007-08-22 19:05:21 +000014000#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014001choke me
Skip Montanaro89e975f2007-08-22 19:05:21 +000014002#else
14003char (*f) () = $ac_func;
14004#endif
14005#ifdef __cplusplus
14006}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014007#endif
14008
Skip Montanaro6dead952003-09-25 14:50:04 +000014009int
14010main ()
14011{
Skip Montanaro89e975f2007-08-22 19:05:21 +000014012return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014013 ;
14014 return 0;
14015}
14016_ACEOF
14017rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000014018if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14019 (eval $ac_link) 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014021 grep -v '^ *+' conftest.er1 >conftest.err
14022 rm -f conftest.er1
14023 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000014025 (exit $ac_status); } &&
14026 { ac_try='test -z "$ac_c_werror_flag"
14027 || test ! -s conftest.err'
14028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14029 (eval $ac_try) 2>&5
14030 ac_status=$?
14031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14032 (exit $ac_status); }; } &&
14033 { ac_try='test -s conftest$ac_exeext'
14034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14035 (eval $ac_try) 2>&5
14036 ac_status=$?
14037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14038 (exit $ac_status); }; }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014039 eval "$as_ac_var=yes"
14040else
14041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014042sed 's/^/| /' conftest.$ac_ext >&5
14043
Skip Montanaro89e975f2007-08-22 19:05:21 +000014044eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014045fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000014046rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014047 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014048fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000014049echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14050echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014051if test `eval echo '${'$as_ac_var'}'` = yes; then
14052 cat >>confdefs.h <<_ACEOF
14053#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14054_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000014055 case $ac_sys_system in
14056 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014057
Jason Tishlerfac083d2003-07-22 15:20:49 +000014058cat >>confdefs.h <<\_ACEOF
14059#define HAVE_BROKEN_PTHREAD_SIGMASK 1
14060_ACEOF
14061
14062 ;;
14063 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014064fi
14065done
14066
14067fi
14068
14069
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014070# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000014071
14072
Skip Montanaro89e975f2007-08-22 19:05:21 +000014073echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
14074echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
14075# Check whether --enable-ipv6 or --disable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014076if test "${enable_ipv6+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000014077 enableval="$enable_ipv6"
14078 case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014079 no)
Skip Montanaro89e975f2007-08-22 19:05:21 +000014080 echo "$as_me:$LINENO: result: no" >&5
14081echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014082 ipv6=no
14083 ;;
Skip Montanaro89e975f2007-08-22 19:05:21 +000014084 *) echo "$as_me:$LINENO: result: yes" >&5
14085echo "${ECHO_T}yes" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014086 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014087#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014088_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014089
14090 ipv6=yes
14091 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014092 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014093else
Martin v. Löwis11437992002-04-12 09:54:03 +000014094
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014095 if test "$cross_compiling" = yes; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000014096 echo "$as_me:$LINENO: result: no" >&5
14097echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014098 ipv6=no
14099
14100else
Martin v. Löwis11437992002-04-12 09:54:03 +000014101 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014102/* confdefs.h. */
14103_ACEOF
14104cat confdefs.h >>conftest.$ac_ext
14105cat >>conftest.$ac_ext <<_ACEOF
14106/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014107 /* AF_INET6 available check */
14108#include <sys/types.h>
14109#include <sys/socket.h>
14110main()
14111{
14112 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
14113 exit(1);
14114 else
14115 exit(0);
14116}
14117
Martin v. Löwis11437992002-04-12 09:54:03 +000014118_ACEOF
14119rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000014120if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14121 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014122 ac_status=$?
14123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14124 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +000014125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14126 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014127 ac_status=$?
14128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14129 (exit $ac_status); }; }; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000014130 echo "$as_me:$LINENO: result: yes" >&5
14131echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014132 ipv6=yes
14133else
Martin v. Löwis11437992002-04-12 09:54:03 +000014134 echo "$as_me: program exited with status $ac_status" >&5
14135echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014136sed 's/^/| /' conftest.$ac_ext >&5
14137
Martin v. Löwis11437992002-04-12 09:54:03 +000014138( exit $ac_status )
Skip Montanaro89e975f2007-08-22 19:05:21 +000014139echo "$as_me:$LINENO: result: no" >&5
14140echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014141 ipv6=no
14142fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000014143rm -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 +000014144fi
14145
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014146if test "$ipv6" = "yes"; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000014147 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
14148echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014149 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014150/* confdefs.h. */
14151_ACEOF
14152cat confdefs.h >>conftest.$ac_ext
14153cat >>conftest.$ac_ext <<_ACEOF
14154/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014155#include <sys/types.h>
14156#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014157int
14158main ()
14159{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014160struct sockaddr_in6 x;
14161x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000014162 ;
14163 return 0;
14164}
14165_ACEOF
14166rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000014167if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14168 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014170 grep -v '^ *+' conftest.er1 >conftest.err
14171 rm -f conftest.er1
14172 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000014174 (exit $ac_status); } &&
14175 { ac_try='test -z "$ac_c_werror_flag"
14176 || test ! -s conftest.err'
14177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14178 (eval $ac_try) 2>&5
14179 ac_status=$?
14180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14181 (exit $ac_status); }; } &&
14182 { ac_try='test -s conftest.$ac_objext'
14183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14184 (eval $ac_try) 2>&5
14185 ac_status=$?
14186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14187 (exit $ac_status); }; }; then
14188 echo "$as_me:$LINENO: result: yes" >&5
14189echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014190 ipv6=yes
14191else
Martin v. Löwis11437992002-04-12 09:54:03 +000014192 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014193sed 's/^/| /' conftest.$ac_ext >&5
14194
Skip Montanaro89e975f2007-08-22 19:05:21 +000014195echo "$as_me:$LINENO: result: no" >&5
14196echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014197 ipv6=no
14198fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000014199rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014200fi
14201
14202if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014203 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014204#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014205_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000014206
14207fi
14208
Skip Montanaro89e975f2007-08-22 19:05:21 +000014209fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014210
14211ipv6type=unknown
14212ipv6lib=none
14213ipv6trylibc=no
14214
14215if test "$ipv6" = "yes"; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000014216 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
14217echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000014218 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
14219 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014220 case $i in
14221 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000014222 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014223/* confdefs.h. */
14224_ACEOF
14225cat confdefs.h >>conftest.$ac_ext
14226cat >>conftest.$ac_ext <<_ACEOF
14227/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014228
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014229#include <netinet/in.h>
14230#ifdef IPV6_INRIA_VERSION
14231yes
14232#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014233_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014234if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014235 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000014236 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014237fi
14238rm -f conftest*
14239
14240 ;;
14241 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000014242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014243/* confdefs.h. */
14244_ACEOF
14245cat confdefs.h >>conftest.$ac_ext
14246cat >>conftest.$ac_ext <<_ACEOF
14247/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014248
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014249#include <netinet/in.h>
14250#ifdef __KAME__
14251yes
14252#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014253_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014254if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014255 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014256 ipv6type=$i;
14257 ipv6lib=inet6
14258 ipv6libdir=/usr/local/v6/lib
14259 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014260fi
14261rm -f conftest*
14262
14263 ;;
14264 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000014265 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014266/* confdefs.h. */
14267_ACEOF
14268cat confdefs.h >>conftest.$ac_ext
14269cat >>conftest.$ac_ext <<_ACEOF
14270/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014271
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014272#include <features.h>
14273#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
14274yes
14275#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014276_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014277if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014278 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014279 ipv6type=$i;
14280 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014281fi
14282rm -f conftest*
14283
14284 ;;
14285 linux-inet6)
14286 if test -d /usr/inet6; then
14287 ipv6type=$i
14288 ipv6lib=inet6
14289 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000014290 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014291 fi
14292 ;;
14293 solaris)
14294 if test -f /etc/netconfig; then
14295 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
14296 ipv6type=$i
14297 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014298 fi
14299 fi
14300 ;;
14301 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000014302 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014303/* confdefs.h. */
14304_ACEOF
14305cat confdefs.h >>conftest.$ac_ext
14306cat >>conftest.$ac_ext <<_ACEOF
14307/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014308
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014309#include <sys/param.h>
14310#ifdef _TOSHIBA_INET6
14311yes
14312#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014313_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014314if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014315 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014316 ipv6type=$i;
14317 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000014318 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014319fi
14320rm -f conftest*
14321
14322 ;;
14323 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000014324 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014325/* confdefs.h. */
14326_ACEOF
14327cat confdefs.h >>conftest.$ac_ext
14328cat >>conftest.$ac_ext <<_ACEOF
14329/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014330
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014331#include </usr/local/v6/include/sys/v6config.h>
14332#ifdef __V6D__
14333yes
14334#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014335_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014336if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014337 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014338 ipv6type=$i;
14339 ipv6lib=v6;
14340 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000014341 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014342fi
14343rm -f conftest*
14344
14345 ;;
14346 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000014347 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014348/* confdefs.h. */
14349_ACEOF
14350cat confdefs.h >>conftest.$ac_ext
14351cat >>conftest.$ac_ext <<_ACEOF
14352/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014353
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014354#include <sys/param.h>
14355#ifdef _ZETA_MINAMI_INET6
14356yes
14357#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014358_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014359if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014360 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014361 ipv6type=$i;
14362 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000014363 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014364fi
14365rm -f conftest*
14366
14367 ;;
14368 esac
14369 if test "$ipv6type" != "unknown"; then
14370 break
14371 fi
14372 done
Skip Montanaro89e975f2007-08-22 19:05:21 +000014373 echo "$as_me:$LINENO: result: $ipv6type" >&5
14374echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000014375fi
14376
14377if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
14378 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
14379 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
14380 echo "using lib$ipv6lib"
14381 else
14382 if test $ipv6trylibc = "yes"; then
14383 echo "using libc"
14384 else
14385 echo 'Fatal: no $ipv6lib library found. cannot continue.'
14386 echo "You need to fetch lib$ipv6lib.a from appropriate"
14387 echo 'ipv6 kit and compile beforehand.'
14388 exit 1
14389 fi
14390 fi
14391fi
14392
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014393# Check for --with-doc-strings
Skip Montanaro89e975f2007-08-22 19:05:21 +000014394echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
14395echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014396
Skip Montanaro89e975f2007-08-22 19:05:21 +000014397# Check whether --with-doc-strings or --without-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014398if test "${with_doc_strings+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000014399 withval="$with_doc_strings"
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014400
Skip Montanaro89e975f2007-08-22 19:05:21 +000014401fi;
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014402
14403if test -z "$with_doc_strings"
14404then with_doc_strings="yes"
14405fi
14406if test "$with_doc_strings" != "no"
14407then
14408
14409cat >>confdefs.h <<\_ACEOF
14410#define WITH_DOC_STRINGS 1
14411_ACEOF
14412
14413fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000014414echo "$as_me:$LINENO: result: $with_doc_strings" >&5
14415echo "${ECHO_T}$with_doc_strings" >&6
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000014416
Neil Schemenauera35c6882001-02-27 04:45:05 +000014417# Check for Python-specific malloc support
Skip Montanaro89e975f2007-08-22 19:05:21 +000014418echo "$as_me:$LINENO: checking for --with-tsc" >&5
14419echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014420
Skip Montanaro89e975f2007-08-22 19:05:21 +000014421# Check whether --with-tsc or --without-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014422if test "${with_tsc+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000014423 withval="$with_tsc"
14424
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014425if test "$withval" != no
14426then
14427
14428cat >>confdefs.h <<\_ACEOF
14429#define WITH_TSC 1
14430_ACEOF
14431
Skip Montanaro89e975f2007-08-22 19:05:21 +000014432 echo "$as_me:$LINENO: result: yes" >&5
14433echo "${ECHO_T}yes" >&6
14434else echo "$as_me:$LINENO: result: no" >&5
14435echo "${ECHO_T}no" >&6
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014436fi
14437else
Skip Montanaro89e975f2007-08-22 19:05:21 +000014438 echo "$as_me:$LINENO: result: no" >&5
14439echo "${ECHO_T}no" >&6
14440fi;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000014441
14442# Check for Python-specific malloc support
Skip Montanaro89e975f2007-08-22 19:05:21 +000014443echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
14444echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014445
Skip Montanaro89e975f2007-08-22 19:05:21 +000014446# Check whether --with-pymalloc or --without-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000014447if test "${with_pymalloc+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000014448 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000014449
Skip Montanaro89e975f2007-08-22 19:05:21 +000014450fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000014451
Neil Schemenauer16c22972002-03-22 15:34:49 +000014452if test -z "$with_pymalloc"
14453then with_pymalloc="yes"
14454fi
14455if test "$with_pymalloc" != "no"
14456then
Martin v. Löwis11437992002-04-12 09:54:03 +000014457
14458cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000014459#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014460_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000014461
14462fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000014463echo "$as_me:$LINENO: result: $with_pymalloc" >&5
14464echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000014465
Barry Warsawef82cd72000-06-30 16:21:01 +000014466# Check for --with-wctype-functions
Skip Montanaro89e975f2007-08-22 19:05:21 +000014467echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
14468echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014469
Skip Montanaro89e975f2007-08-22 19:05:21 +000014470# Check whether --with-wctype-functions or --without-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000014471if test "${with_wctype_functions+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000014472 withval="$with_wctype_functions"
14473
Barry Warsawef82cd72000-06-30 16:21:01 +000014474if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000014475then
14476
14477cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000014478#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014479_ACEOF
14480
Skip Montanaro89e975f2007-08-22 19:05:21 +000014481 echo "$as_me:$LINENO: result: yes" >&5
14482echo "${ECHO_T}yes" >&6
14483else echo "$as_me:$LINENO: result: no" >&5
14484echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000014485fi
14486else
Skip Montanaro89e975f2007-08-22 19:05:21 +000014487 echo "$as_me:$LINENO: result: no" >&5
14488echo "${ECHO_T}no" >&6
14489fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000014490
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014491# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000014492
Guido van Rossum98935bf2001-09-05 19:13:16 +000014493DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000014494
Guido van Rossume97ee181999-12-20 21:27:22 +000014495# the dlopen() function means we might want to use dynload_shlib.o. some
14496# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000014497
Thomas Wouters3a584202000-08-05 23:28:51 +000014498for ac_func in dlopen
14499do
Martin v. Löwis11437992002-04-12 09:54:03 +000014500as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaro89e975f2007-08-22 19:05:21 +000014501echo "$as_me:$LINENO: checking for $ac_func" >&5
14502echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14503if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014504 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000014505else
Martin v. Löwis11437992002-04-12 09:54:03 +000014506 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014507/* confdefs.h. */
14508_ACEOF
14509cat confdefs.h >>conftest.$ac_ext
14510cat >>conftest.$ac_ext <<_ACEOF
14511/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014512/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14513 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14514#define $ac_func innocuous_$ac_func
14515
Guido van Rossume97ee181999-12-20 21:27:22 +000014516/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014517 which can conflict with char $ac_func (); below.
14518 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014519 <limits.h> exists even on freestanding compilers. */
14520
14521#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014522# include <limits.h>
14523#else
14524# include <assert.h>
14525#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014526
14527#undef $ac_func
14528
Skip Montanaro89e975f2007-08-22 19:05:21 +000014529/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014530#ifdef __cplusplus
14531extern "C"
Skip Montanaro89e975f2007-08-22 19:05:21 +000014532{
Martin v. Löwis11437992002-04-12 09:54:03 +000014533#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000014534/* We use char because int might match the return type of a gcc2
14535 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014536char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000014537/* The GNU C library defines this for functions which it implements
14538 to always fail with ENOSYS. Some functions are actually named
14539 something starting with __ and the normal name is an alias. */
Skip Montanaro89e975f2007-08-22 19:05:21 +000014540#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000014541choke me
Skip Montanaro89e975f2007-08-22 19:05:21 +000014542#else
14543char (*f) () = $ac_func;
14544#endif
14545#ifdef __cplusplus
14546}
Guido van Rossume97ee181999-12-20 21:27:22 +000014547#endif
14548
Skip Montanaro6dead952003-09-25 14:50:04 +000014549int
14550main ()
14551{
Skip Montanaro89e975f2007-08-22 19:05:21 +000014552return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014553 ;
14554 return 0;
14555}
14556_ACEOF
14557rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000014558if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14559 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014561 grep -v '^ *+' conftest.er1 >conftest.err
14562 rm -f conftest.er1
14563 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000014565 (exit $ac_status); } &&
14566 { ac_try='test -z "$ac_c_werror_flag"
14567 || test ! -s conftest.err'
14568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14569 (eval $ac_try) 2>&5
14570 ac_status=$?
14571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14572 (exit $ac_status); }; } &&
14573 { ac_try='test -s conftest$ac_exeext'
14574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14575 (eval $ac_try) 2>&5
14576 ac_status=$?
14577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14578 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014579 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014580else
Martin v. Löwis11437992002-04-12 09:54:03 +000014581 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014582sed 's/^/| /' conftest.$ac_ext >&5
14583
Skip Montanaro89e975f2007-08-22 19:05:21 +000014584eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014585fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000014586rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014587 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014588fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000014589echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14590echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014591if test `eval echo '${'$as_ac_var'}'` = yes; then
14592 cat >>confdefs.h <<_ACEOF
14593#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14594_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000014595
Guido van Rossume97ee181999-12-20 21:27:22 +000014596fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014597done
Guido van Rossume97ee181999-12-20 21:27:22 +000014598
Michael W. Hudson54241132001-12-07 15:38:26 +000014599
Guido van Rossume97ee181999-12-20 21:27:22 +000014600# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
14601# loading of modules.
14602
Skip Montanaro89e975f2007-08-22 19:05:21 +000014603echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
14604echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000014605if test -z "$DYNLOADFILE"
14606then
14607 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000014608 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
14609 if test "$ac_cv_func_dlopen" = yes
14610 then DYNLOADFILE="dynload_shlib.o"
14611 else DYNLOADFILE="dynload_aix.o"
14612 fi
14613 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000014614 BeOS*) DYNLOADFILE="dynload_beos.o";;
14615 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000014616 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
14617 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014618 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000014619 *)
14620 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
14621 # out any dynamic loading
14622 if test "$ac_cv_func_dlopen" = yes
14623 then DYNLOADFILE="dynload_shlib.o"
14624 else DYNLOADFILE="dynload_stub.o"
14625 fi
14626 ;;
14627 esac
14628fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000014629echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
14630echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000014631if test "$DYNLOADFILE" != "dynload_stub.o"
14632then
Martin v. Löwis11437992002-04-12 09:54:03 +000014633
14634cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000014635#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014636_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000014637
14638fi
14639
Neil Schemenauer4e425612001-06-19 15:44:15 +000014640# MACHDEP_OBJS can be set to platform-specific object files needed by Python
14641
Michael W. Hudson54241132001-12-07 15:38:26 +000014642
Skip Montanaro89e975f2007-08-22 19:05:21 +000014643echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
14644echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000014645if test -z "$MACHDEP_OBJS"
14646then
Jack Jansene578a632001-08-15 01:27:14 +000014647 MACHDEP_OBJS=$extra_machdep_objs
14648else
14649 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000014650fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000014651echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
14652echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000014653
Guido van Rossum627b2d71993-12-24 10:39:16 +000014654# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000014655
14656
14657
14658
14659
14660
14661
14662
14663
14664
14665
14666
14667
14668
14669
14670
14671
14672
14673
14674
14675
14676
14677
14678
14679
14680
14681
14682
14683
14684
14685
14686
14687
14688
14689
14690
14691
14692
14693
14694
14695
14696
14697
14698
14699
14700
14701
14702
14703
14704
14705
14706
14707
14708
14709
14710
14711
14712
14713
14714
14715
14716
14717
14718
14719
14720
14721
14722
14723
14724
14725
Martin v. Löwisd6320502004-08-12 13:45:08 +000014726
Martin v. Löwisc3001752005-01-23 09:27:24 +000014727
14728
Neal Norwitz05a45592006-03-20 06:30:08 +000014729
14730
Martin v. Löwis382abef2007-02-19 10:55:19 +000014731
14732
14733for ac_func in alarm bind_textdomain_codeset chflags chown clock confstr \
14734 ctermid execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000014735 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000014736 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis382abef2007-02-19 10:55:19 +000014737 kill killpg lchflags lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000014738 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000014739 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000014740 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000014741 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000014742 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000014743 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000014744 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000014745do
Martin v. Löwis11437992002-04-12 09:54:03 +000014746as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaro89e975f2007-08-22 19:05:21 +000014747echo "$as_me:$LINENO: checking for $ac_func" >&5
14748echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14749if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014750 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014751else
Martin v. Löwis11437992002-04-12 09:54:03 +000014752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014753/* confdefs.h. */
14754_ACEOF
14755cat confdefs.h >>conftest.$ac_ext
14756cat >>conftest.$ac_ext <<_ACEOF
14757/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014758/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14759 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14760#define $ac_func innocuous_$ac_func
14761
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014762/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014763 which can conflict with char $ac_func (); below.
14764 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014765 <limits.h> exists even on freestanding compilers. */
14766
14767#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014768# include <limits.h>
14769#else
14770# include <assert.h>
14771#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014772
14773#undef $ac_func
14774
Skip Montanaro89e975f2007-08-22 19:05:21 +000014775/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014776#ifdef __cplusplus
14777extern "C"
Skip Montanaro89e975f2007-08-22 19:05:21 +000014778{
Martin v. Löwis11437992002-04-12 09:54:03 +000014779#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000014780/* We use char because int might match the return type of a gcc2
14781 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014782char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000014783/* The GNU C library defines this for functions which it implements
14784 to always fail with ENOSYS. Some functions are actually named
14785 something starting with __ and the normal name is an alias. */
Skip Montanaro89e975f2007-08-22 19:05:21 +000014786#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000014787choke me
Skip Montanaro89e975f2007-08-22 19:05:21 +000014788#else
14789char (*f) () = $ac_func;
14790#endif
14791#ifdef __cplusplus
14792}
Guido van Rossum627b2d71993-12-24 10:39:16 +000014793#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014794
Skip Montanaro6dead952003-09-25 14:50:04 +000014795int
14796main ()
14797{
Skip Montanaro89e975f2007-08-22 19:05:21 +000014798return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014799 ;
14800 return 0;
14801}
14802_ACEOF
14803rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000014804if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14805 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014807 grep -v '^ *+' conftest.er1 >conftest.err
14808 rm -f conftest.er1
14809 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000014811 (exit $ac_status); } &&
14812 { ac_try='test -z "$ac_c_werror_flag"
14813 || test ! -s conftest.err'
14814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14815 (eval $ac_try) 2>&5
14816 ac_status=$?
14817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14818 (exit $ac_status); }; } &&
14819 { ac_try='test -s conftest$ac_exeext'
14820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14821 (eval $ac_try) 2>&5
14822 ac_status=$?
14823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14824 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014825 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014826else
Martin v. Löwis11437992002-04-12 09:54:03 +000014827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014828sed 's/^/| /' conftest.$ac_ext >&5
14829
Skip Montanaro89e975f2007-08-22 19:05:21 +000014830eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014831fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000014832rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014833 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014834fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000014835echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14836echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014837if test `eval echo '${'$as_ac_var'}'` = yes; then
14838 cat >>confdefs.h <<_ACEOF
14839#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14840_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014841
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014842fi
14843done
14844
Michael W. Hudson54241132001-12-07 15:38:26 +000014845
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014846# For some functions, having a definition is not sufficient, since
14847# we want to take their address.
Skip Montanaro89e975f2007-08-22 19:05:21 +000014848echo "$as_me:$LINENO: checking for chroot" >&5
14849echo $ECHO_N "checking for chroot... $ECHO_C" >&6
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014850cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014851/* confdefs.h. */
14852_ACEOF
14853cat confdefs.h >>conftest.$ac_ext
14854cat >>conftest.$ac_ext <<_ACEOF
14855/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014856#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014857int
14858main ()
14859{
14860void *x=chroot
14861 ;
14862 return 0;
14863}
14864_ACEOF
14865rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000014866if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14867 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014868 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014869 grep -v '^ *+' conftest.er1 >conftest.err
14870 rm -f conftest.er1
14871 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000014873 (exit $ac_status); } &&
14874 { ac_try='test -z "$ac_c_werror_flag"
14875 || test ! -s conftest.err'
14876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14877 (eval $ac_try) 2>&5
14878 ac_status=$?
14879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14880 (exit $ac_status); }; } &&
14881 { ac_try='test -s conftest.$ac_objext'
14882 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14883 (eval $ac_try) 2>&5
14884 ac_status=$?
14885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14886 (exit $ac_status); }; }; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014887
14888cat >>confdefs.h <<\_ACEOF
14889#define HAVE_CHROOT 1
14890_ACEOF
14891
Skip Montanaro89e975f2007-08-22 19:05:21 +000014892 echo "$as_me:$LINENO: result: yes" >&5
14893echo "${ECHO_T}yes" >&6
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014894else
14895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014896sed 's/^/| /' conftest.$ac_ext >&5
14897
Skip Montanaro89e975f2007-08-22 19:05:21 +000014898echo "$as_me:$LINENO: result: no" >&5
14899echo "${ECHO_T}no" >&6
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014900
14901fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000014902rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14903echo "$as_me:$LINENO: checking for link" >&5
14904echo $ECHO_N "checking for link... $ECHO_C" >&6
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014905cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014906/* confdefs.h. */
14907_ACEOF
14908cat confdefs.h >>conftest.$ac_ext
14909cat >>conftest.$ac_ext <<_ACEOF
14910/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014911#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014912int
14913main ()
14914{
14915void *x=link
14916 ;
14917 return 0;
14918}
14919_ACEOF
14920rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000014921if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14922 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014923 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014924 grep -v '^ *+' conftest.er1 >conftest.err
14925 rm -f conftest.er1
14926 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000014928 (exit $ac_status); } &&
14929 { ac_try='test -z "$ac_c_werror_flag"
14930 || test ! -s conftest.err'
14931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14932 (eval $ac_try) 2>&5
14933 ac_status=$?
14934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14935 (exit $ac_status); }; } &&
14936 { ac_try='test -s conftest.$ac_objext'
14937 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14938 (eval $ac_try) 2>&5
14939 ac_status=$?
14940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14941 (exit $ac_status); }; }; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014942
14943cat >>confdefs.h <<\_ACEOF
14944#define HAVE_LINK 1
14945_ACEOF
14946
Skip Montanaro89e975f2007-08-22 19:05:21 +000014947 echo "$as_me:$LINENO: result: yes" >&5
14948echo "${ECHO_T}yes" >&6
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014949else
14950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014951sed 's/^/| /' conftest.$ac_ext >&5
14952
Skip Montanaro89e975f2007-08-22 19:05:21 +000014953echo "$as_me:$LINENO: result: no" >&5
14954echo "${ECHO_T}no" >&6
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014955
14956fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000014957rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
14958echo "$as_me:$LINENO: checking for symlink" >&5
14959echo $ECHO_N "checking for symlink... $ECHO_C" >&6
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014960cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014961/* confdefs.h. */
14962_ACEOF
14963cat confdefs.h >>conftest.$ac_ext
14964cat >>conftest.$ac_ext <<_ACEOF
14965/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014966#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014967int
14968main ()
14969{
14970void *x=symlink
14971 ;
14972 return 0;
14973}
14974_ACEOF
14975rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000014976if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
14977 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014979 grep -v '^ *+' conftest.er1 >conftest.err
14980 rm -f conftest.er1
14981 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014982 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000014983 (exit $ac_status); } &&
14984 { ac_try='test -z "$ac_c_werror_flag"
14985 || test ! -s conftest.err'
14986 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14987 (eval $ac_try) 2>&5
14988 ac_status=$?
14989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14990 (exit $ac_status); }; } &&
14991 { ac_try='test -s conftest.$ac_objext'
14992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14993 (eval $ac_try) 2>&5
14994 ac_status=$?
14995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14996 (exit $ac_status); }; }; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000014997
14998cat >>confdefs.h <<\_ACEOF
14999#define HAVE_SYMLINK 1
15000_ACEOF
15001
Skip Montanaro89e975f2007-08-22 19:05:21 +000015002 echo "$as_me:$LINENO: result: yes" >&5
15003echo "${ECHO_T}yes" >&6
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015004else
15005 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015006sed 's/^/| /' conftest.$ac_ext >&5
15007
Skip Montanaro89e975f2007-08-22 19:05:21 +000015008echo "$as_me:$LINENO: result: no" >&5
15009echo "${ECHO_T}no" >&6
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015010
15011fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000015012rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15013echo "$as_me:$LINENO: checking for fchdir" >&5
15014echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015015cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015016/* confdefs.h. */
15017_ACEOF
15018cat confdefs.h >>conftest.$ac_ext
15019cat >>conftest.$ac_ext <<_ACEOF
15020/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015021#include <unistd.h>
15022int
15023main ()
15024{
15025void *x=fchdir
15026 ;
15027 return 0;
15028}
15029_ACEOF
15030rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000015031if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15032 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015034 grep -v '^ *+' conftest.er1 >conftest.err
15035 rm -f conftest.er1
15036 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015038 (exit $ac_status); } &&
15039 { ac_try='test -z "$ac_c_werror_flag"
15040 || test ! -s conftest.err'
15041 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15042 (eval $ac_try) 2>&5
15043 ac_status=$?
15044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15045 (exit $ac_status); }; } &&
15046 { ac_try='test -s conftest.$ac_objext'
15047 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15048 (eval $ac_try) 2>&5
15049 ac_status=$?
15050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15051 (exit $ac_status); }; }; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015052
15053cat >>confdefs.h <<\_ACEOF
15054#define HAVE_FCHDIR 1
15055_ACEOF
15056
Skip Montanaro89e975f2007-08-22 19:05:21 +000015057 echo "$as_me:$LINENO: result: yes" >&5
15058echo "${ECHO_T}yes" >&6
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015059else
15060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015061sed 's/^/| /' conftest.$ac_ext >&5
15062
Skip Montanaro89e975f2007-08-22 19:05:21 +000015063echo "$as_me:$LINENO: result: no" >&5
15064echo "${ECHO_T}no" >&6
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015065
15066fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000015067rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15068echo "$as_me:$LINENO: checking for fsync" >&5
15069echo $ECHO_N "checking for fsync... $ECHO_C" >&6
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015070cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015071/* confdefs.h. */
15072_ACEOF
15073cat confdefs.h >>conftest.$ac_ext
15074cat >>conftest.$ac_ext <<_ACEOF
15075/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015076#include <unistd.h>
15077int
15078main ()
15079{
15080void *x=fsync
15081 ;
15082 return 0;
15083}
15084_ACEOF
15085rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000015086if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15087 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015088 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015089 grep -v '^ *+' conftest.er1 >conftest.err
15090 rm -f conftest.er1
15091 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015093 (exit $ac_status); } &&
15094 { ac_try='test -z "$ac_c_werror_flag"
15095 || test ! -s conftest.err'
15096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15097 (eval $ac_try) 2>&5
15098 ac_status=$?
15099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15100 (exit $ac_status); }; } &&
15101 { ac_try='test -s conftest.$ac_objext'
15102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15103 (eval $ac_try) 2>&5
15104 ac_status=$?
15105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15106 (exit $ac_status); }; }; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015107
15108cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015109#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015110_ACEOF
15111
Skip Montanaro89e975f2007-08-22 19:05:21 +000015112 echo "$as_me:$LINENO: result: yes" >&5
15113echo "${ECHO_T}yes" >&6
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015114else
15115 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015116sed 's/^/| /' conftest.$ac_ext >&5
15117
Skip Montanaro89e975f2007-08-22 19:05:21 +000015118echo "$as_me:$LINENO: result: no" >&5
15119echo "${ECHO_T}no" >&6
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015120
15121fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000015122rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
15123echo "$as_me:$LINENO: checking for fdatasync" >&5
15124echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015125cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015126/* confdefs.h. */
15127_ACEOF
15128cat confdefs.h >>conftest.$ac_ext
15129cat >>conftest.$ac_ext <<_ACEOF
15130/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015131#include <unistd.h>
15132int
15133main ()
15134{
15135void *x=fdatasync
15136 ;
15137 return 0;
15138}
15139_ACEOF
15140rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000015141if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15142 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015144 grep -v '^ *+' conftest.er1 >conftest.err
15145 rm -f conftest.er1
15146 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015148 (exit $ac_status); } &&
15149 { ac_try='test -z "$ac_c_werror_flag"
15150 || test ! -s conftest.err'
15151 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15152 (eval $ac_try) 2>&5
15153 ac_status=$?
15154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15155 (exit $ac_status); }; } &&
15156 { ac_try='test -s conftest.$ac_objext'
15157 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15158 (eval $ac_try) 2>&5
15159 ac_status=$?
15160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15161 (exit $ac_status); }; }; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015162
15163cat >>confdefs.h <<\_ACEOF
15164#define HAVE_FDATASYNC 1
15165_ACEOF
15166
Skip Montanaro89e975f2007-08-22 19:05:21 +000015167 echo "$as_me:$LINENO: result: yes" >&5
15168echo "${ECHO_T}yes" >&6
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015169else
15170 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015171sed 's/^/| /' conftest.$ac_ext >&5
15172
Skip Montanaro89e975f2007-08-22 19:05:21 +000015173echo "$as_me:$LINENO: result: no" >&5
15174echo "${ECHO_T}no" >&6
Martin v. Löwisa64988c2003-09-20 15:30:20 +000015175
15176fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000015177rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000015178
Martin v. Löwisd5843682002-11-21 20:41:28 +000015179# On some systems (eg. FreeBSD 5), we would find a definition of the
15180# functions ctermid_r, setgroups in the library, but no prototype
15181# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
15182# address to avoid compiler warnings and potential miscompilations
15183# because of the missing prototypes.
15184
Skip Montanaro89e975f2007-08-22 19:05:21 +000015185echo "$as_me:$LINENO: checking for ctermid_r" >&5
15186echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
Martin v. Löwisd5843682002-11-21 20:41:28 +000015187cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015188/* confdefs.h. */
15189_ACEOF
15190cat confdefs.h >>conftest.$ac_ext
15191cat >>conftest.$ac_ext <<_ACEOF
15192/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000015193
15194#include "confdefs.h"
15195#include <stdio.h>
15196
Martin v. Löwisd5843682002-11-21 20:41:28 +000015197int
15198main ()
15199{
15200void* p = ctermid_r
15201 ;
15202 return 0;
15203}
15204_ACEOF
15205rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000015206if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15207 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000015208 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015209 grep -v '^ *+' conftest.er1 >conftest.err
15210 rm -f conftest.er1
15211 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000015212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015213 (exit $ac_status); } &&
15214 { ac_try='test -z "$ac_c_werror_flag"
15215 || test ! -s conftest.err'
15216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15217 (eval $ac_try) 2>&5
15218 ac_status=$?
15219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15220 (exit $ac_status); }; } &&
15221 { ac_try='test -s conftest.$ac_objext'
15222 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15223 (eval $ac_try) 2>&5
15224 ac_status=$?
15225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15226 (exit $ac_status); }; }; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000015227
15228cat >>confdefs.h <<\_ACEOF
15229#define HAVE_CTERMID_R 1
15230_ACEOF
15231
Skip Montanaro89e975f2007-08-22 19:05:21 +000015232 echo "$as_me:$LINENO: result: yes" >&5
15233echo "${ECHO_T}yes" >&6
Martin v. Löwisd5843682002-11-21 20:41:28 +000015234else
15235 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015236sed 's/^/| /' conftest.$ac_ext >&5
15237
Skip Montanaro89e975f2007-08-22 19:05:21 +000015238echo "$as_me:$LINENO: result: no" >&5
15239echo "${ECHO_T}no" >&6
Martin v. Löwisd5843682002-11-21 20:41:28 +000015240
15241fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000015242rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000015243
Skip Montanaro89e975f2007-08-22 19:05:21 +000015244echo "$as_me:$LINENO: checking for flock" >&5
15245echo $ECHO_N "checking for flock... $ECHO_C" >&6
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015246cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015247/* confdefs.h. */
15248_ACEOF
15249cat confdefs.h >>conftest.$ac_ext
15250cat >>conftest.$ac_ext <<_ACEOF
15251/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015252
15253#include "confdefs.h"
15254#include <sys/file.h>
15255
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015256int
15257main ()
15258{
15259void* p = flock
15260 ;
15261 return 0;
15262}
15263_ACEOF
15264rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000015265if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15266 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015268 grep -v '^ *+' conftest.er1 >conftest.err
15269 rm -f conftest.er1
15270 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015272 (exit $ac_status); } &&
15273 { ac_try='test -z "$ac_c_werror_flag"
15274 || test ! -s conftest.err'
15275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15276 (eval $ac_try) 2>&5
15277 ac_status=$?
15278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15279 (exit $ac_status); }; } &&
15280 { ac_try='test -s conftest.$ac_objext'
15281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15282 (eval $ac_try) 2>&5
15283 ac_status=$?
15284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15285 (exit $ac_status); }; }; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015286
15287cat >>confdefs.h <<\_ACEOF
15288#define HAVE_FLOCK 1
15289_ACEOF
15290
Skip Montanaro89e975f2007-08-22 19:05:21 +000015291 echo "$as_me:$LINENO: result: yes" >&5
15292echo "${ECHO_T}yes" >&6
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015293else
15294 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015295sed 's/^/| /' conftest.$ac_ext >&5
15296
Skip Montanaro89e975f2007-08-22 19:05:21 +000015297echo "$as_me:$LINENO: result: no" >&5
15298echo "${ECHO_T}no" >&6
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015299
15300fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000015301rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015302
Skip Montanaro89e975f2007-08-22 19:05:21 +000015303echo "$as_me:$LINENO: checking for getpagesize" >&5
15304echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015305cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015306/* confdefs.h. */
15307_ACEOF
15308cat confdefs.h >>conftest.$ac_ext
15309cat >>conftest.$ac_ext <<_ACEOF
15310/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015311
15312#include "confdefs.h"
15313#include <unistd.h>
15314
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015315int
15316main ()
15317{
15318void* p = getpagesize
15319 ;
15320 return 0;
15321}
15322_ACEOF
15323rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000015324if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15325 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015327 grep -v '^ *+' conftest.er1 >conftest.err
15328 rm -f conftest.er1
15329 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015331 (exit $ac_status); } &&
15332 { ac_try='test -z "$ac_c_werror_flag"
15333 || test ! -s conftest.err'
15334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15335 (eval $ac_try) 2>&5
15336 ac_status=$?
15337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15338 (exit $ac_status); }; } &&
15339 { ac_try='test -s conftest.$ac_objext'
15340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15341 (eval $ac_try) 2>&5
15342 ac_status=$?
15343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15344 (exit $ac_status); }; }; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015345
15346cat >>confdefs.h <<\_ACEOF
15347#define HAVE_GETPAGESIZE 1
15348_ACEOF
15349
Skip Montanaro89e975f2007-08-22 19:05:21 +000015350 echo "$as_me:$LINENO: result: yes" >&5
15351echo "${ECHO_T}yes" >&6
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015352else
15353 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015354sed 's/^/| /' conftest.$ac_ext >&5
15355
Skip Montanaro89e975f2007-08-22 19:05:21 +000015356echo "$as_me:$LINENO: result: no" >&5
15357echo "${ECHO_T}no" >&6
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015358
15359fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000015360rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000015361
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015362for ac_prog in true
15363do
15364 # Extract the first word of "$ac_prog", so it can be a program name with args.
15365set dummy $ac_prog; ac_word=$2
Skip Montanaro89e975f2007-08-22 19:05:21 +000015366echo "$as_me:$LINENO: checking for $ac_word" >&5
15367echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015368if test "${ac_cv_prog_TRUE+set}" = set; then
15369 echo $ECHO_N "(cached) $ECHO_C" >&6
15370else
15371 if test -n "$TRUE"; then
15372 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
15373else
15374as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15375for as_dir in $PATH
15376do
15377 IFS=$as_save_IFS
15378 test -z "$as_dir" && as_dir=.
15379 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanaro89e975f2007-08-22 19:05:21 +000015380 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015381 ac_cv_prog_TRUE="$ac_prog"
15382 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15383 break 2
15384 fi
15385done
15386done
15387
15388fi
15389fi
15390TRUE=$ac_cv_prog_TRUE
15391if test -n "$TRUE"; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000015392 echo "$as_me:$LINENO: result: $TRUE" >&5
15393echo "${ECHO_T}$TRUE" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015394else
Skip Montanaro89e975f2007-08-22 19:05:21 +000015395 echo "$as_me:$LINENO: result: no" >&5
15396echo "${ECHO_T}no" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015397fi
15398
15399 test -n "$TRUE" && break
15400done
15401test -n "$TRUE" || TRUE="/bin/true"
15402
15403
Skip Montanaro89e975f2007-08-22 19:05:21 +000015404echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
15405echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015406if test "${ac_cv_lib_c_inet_aton+set}" = set; then
15407 echo $ECHO_N "(cached) $ECHO_C" >&6
15408else
15409 ac_check_lib_save_LIBS=$LIBS
15410LIBS="-lc $LIBS"
15411cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015412/* confdefs.h. */
15413_ACEOF
15414cat confdefs.h >>conftest.$ac_ext
15415cat >>conftest.$ac_ext <<_ACEOF
15416/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015417
Skip Montanaro89e975f2007-08-22 19:05:21 +000015418/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015419#ifdef __cplusplus
15420extern "C"
15421#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000015422/* We use char because int might match the return type of a gcc2
15423 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015424char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015425int
15426main ()
15427{
Skip Montanaro89e975f2007-08-22 19:05:21 +000015428inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015429 ;
15430 return 0;
15431}
15432_ACEOF
15433rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000015434if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15435 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015436 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015437 grep -v '^ *+' conftest.er1 >conftest.err
15438 rm -f conftest.er1
15439 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015441 (exit $ac_status); } &&
15442 { ac_try='test -z "$ac_c_werror_flag"
15443 || test ! -s conftest.err'
15444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15445 (eval $ac_try) 2>&5
15446 ac_status=$?
15447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15448 (exit $ac_status); }; } &&
15449 { ac_try='test -s conftest$ac_exeext'
15450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15451 (eval $ac_try) 2>&5
15452 ac_status=$?
15453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15454 (exit $ac_status); }; }; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015455 ac_cv_lib_c_inet_aton=yes
15456else
15457 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015458sed 's/^/| /' conftest.$ac_ext >&5
15459
Skip Montanaro89e975f2007-08-22 19:05:21 +000015460ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015461fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000015462rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015463 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015464LIBS=$ac_check_lib_save_LIBS
15465fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000015466echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
15467echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015468if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015469 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015470else
15471
Skip Montanaro89e975f2007-08-22 19:05:21 +000015472echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
15473echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015474if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
15475 echo $ECHO_N "(cached) $ECHO_C" >&6
15476else
15477 ac_check_lib_save_LIBS=$LIBS
15478LIBS="-lresolv $LIBS"
15479cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015480/* confdefs.h. */
15481_ACEOF
15482cat confdefs.h >>conftest.$ac_ext
15483cat >>conftest.$ac_ext <<_ACEOF
15484/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015485
Skip Montanaro89e975f2007-08-22 19:05:21 +000015486/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015487#ifdef __cplusplus
15488extern "C"
15489#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000015490/* We use char because int might match the return type of a gcc2
15491 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015492char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015493int
15494main ()
15495{
Skip Montanaro89e975f2007-08-22 19:05:21 +000015496inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015497 ;
15498 return 0;
15499}
15500_ACEOF
15501rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000015502if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15503 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015504 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015505 grep -v '^ *+' conftest.er1 >conftest.err
15506 rm -f conftest.er1
15507 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015509 (exit $ac_status); } &&
15510 { ac_try='test -z "$ac_c_werror_flag"
15511 || test ! -s conftest.err'
15512 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15513 (eval $ac_try) 2>&5
15514 ac_status=$?
15515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15516 (exit $ac_status); }; } &&
15517 { ac_try='test -s conftest$ac_exeext'
15518 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15519 (eval $ac_try) 2>&5
15520 ac_status=$?
15521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15522 (exit $ac_status); }; }; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015523 ac_cv_lib_resolv_inet_aton=yes
15524else
15525 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015526sed 's/^/| /' conftest.$ac_ext >&5
15527
Skip Montanaro89e975f2007-08-22 19:05:21 +000015528ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015529fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000015530rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015531 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015532LIBS=$ac_check_lib_save_LIBS
15533fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000015534echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
15535echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015536if test $ac_cv_lib_resolv_inet_aton = yes; then
15537 cat >>confdefs.h <<_ACEOF
15538#define HAVE_LIBRESOLV 1
15539_ACEOF
15540
15541 LIBS="-lresolv $LIBS"
15542
15543fi
15544
15545
15546fi
15547
15548
Ronald Oussorenf8752642006-07-06 10:13:35 +000015549case $ac_sys_system/$ac_sys_release in
15550Darwin/*)
15551 _CUR_CFLAGS="${CFLAGS}"
15552 _CUR_LDFLAGS="${LDFLAGS}"
15553 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
15554 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
15555 ;;
15556esac
15557
Skip Montanaro89e975f2007-08-22 19:05:21 +000015558echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
15559echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000015560if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
15561 echo $ECHO_N "(cached) $ECHO_C" >&6
15562else
15563 ac_check_lib_save_LIBS=$LIBS
15564LIBS="-lz $LIBS"
15565cat >conftest.$ac_ext <<_ACEOF
15566/* confdefs.h. */
15567_ACEOF
15568cat confdefs.h >>conftest.$ac_ext
15569cat >>conftest.$ac_ext <<_ACEOF
15570/* end confdefs.h. */
15571
Skip Montanaro89e975f2007-08-22 19:05:21 +000015572/* Override any gcc2 internal prototype to avoid an error. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000015573#ifdef __cplusplus
15574extern "C"
15575#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000015576/* We use char because int might match the return type of a gcc2
15577 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000015578char inflateCopy ();
15579int
15580main ()
15581{
Skip Montanaro89e975f2007-08-22 19:05:21 +000015582inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000015583 ;
15584 return 0;
15585}
15586_ACEOF
15587rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000015588if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15589 (eval $ac_link) 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000015590 ac_status=$?
15591 grep -v '^ *+' conftest.er1 >conftest.err
15592 rm -f conftest.er1
15593 cat conftest.err >&5
15594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015595 (exit $ac_status); } &&
15596 { ac_try='test -z "$ac_c_werror_flag"
15597 || test ! -s conftest.err'
15598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15599 (eval $ac_try) 2>&5
15600 ac_status=$?
15601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15602 (exit $ac_status); }; } &&
15603 { ac_try='test -s conftest$ac_exeext'
15604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15605 (eval $ac_try) 2>&5
15606 ac_status=$?
15607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15608 (exit $ac_status); }; }; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000015609 ac_cv_lib_z_inflateCopy=yes
15610else
15611 echo "$as_me: failed program was:" >&5
15612sed 's/^/| /' conftest.$ac_ext >&5
15613
Skip Montanaro89e975f2007-08-22 19:05:21 +000015614ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000015615fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000015616rm -f conftest.err conftest.$ac_objext \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000015617 conftest$ac_exeext conftest.$ac_ext
15618LIBS=$ac_check_lib_save_LIBS
15619fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000015620echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
15621echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000015622if test $ac_cv_lib_z_inflateCopy = yes; then
15623
15624cat >>confdefs.h <<\_ACEOF
15625#define HAVE_ZLIB_COPY 1
15626_ACEOF
15627
15628fi
15629
15630
Ronald Oussorenf8752642006-07-06 10:13:35 +000015631case $ac_sys_system/$ac_sys_release in
15632Darwin/*)
15633 CFLAGS="${_CUR_CFLAGS}"
15634 LDFLAGS="${_CUR_LDFLAGS}"
15635 ;;
15636esac
15637
Skip Montanaro89e975f2007-08-22 19:05:21 +000015638echo "$as_me:$LINENO: checking for hstrerror" >&5
15639echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
Martin v. Löwise9416172003-05-03 10:12:45 +000015640cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015641/* confdefs.h. */
15642_ACEOF
15643cat confdefs.h >>conftest.$ac_ext
15644cat >>conftest.$ac_ext <<_ACEOF
15645/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000015646
15647#include "confdefs.h"
15648#include <netdb.h>
15649
Martin v. Löwise9416172003-05-03 10:12:45 +000015650int
15651main ()
15652{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015653void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000015654 ;
15655 return 0;
15656}
15657_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015658rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000015659if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15660 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000015661 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015662 grep -v '^ *+' conftest.er1 >conftest.err
15663 rm -f conftest.er1
15664 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000015665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015666 (exit $ac_status); } &&
15667 { ac_try='test -z "$ac_c_werror_flag"
15668 || test ! -s conftest.err'
15669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15670 (eval $ac_try) 2>&5
15671 ac_status=$?
15672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15673 (exit $ac_status); }; } &&
15674 { ac_try='test -s conftest$ac_exeext'
15675 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15676 (eval $ac_try) 2>&5
15677 ac_status=$?
15678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15679 (exit $ac_status); }; }; then
Martin v. Löwise9416172003-05-03 10:12:45 +000015680
15681cat >>confdefs.h <<\_ACEOF
15682#define HAVE_HSTRERROR 1
15683_ACEOF
15684
Skip Montanaro89e975f2007-08-22 19:05:21 +000015685 echo "$as_me:$LINENO: result: yes" >&5
15686echo "${ECHO_T}yes" >&6
Martin v. Löwise9416172003-05-03 10:12:45 +000015687else
15688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015689sed 's/^/| /' conftest.$ac_ext >&5
15690
Skip Montanaro89e975f2007-08-22 19:05:21 +000015691echo "$as_me:$LINENO: result: no" >&5
15692echo "${ECHO_T}no" >&6
Martin v. Löwise9416172003-05-03 10:12:45 +000015693
15694fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000015695rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015696 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000015697
Skip Montanaro89e975f2007-08-22 19:05:21 +000015698echo "$as_me:$LINENO: checking for inet_aton" >&5
15699echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
Martin v. Löwise9416172003-05-03 10:12:45 +000015700cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015701/* confdefs.h. */
15702_ACEOF
15703cat confdefs.h >>conftest.$ac_ext
15704cat >>conftest.$ac_ext <<_ACEOF
15705/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000015706
15707#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000015708#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000015709#include <sys/socket.h>
15710#include <netinet/in.h>
15711#include <arpa/inet.h>
15712
Martin v. Löwise9416172003-05-03 10:12:45 +000015713int
15714main ()
15715{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015716void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000015717 ;
15718 return 0;
15719}
15720_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000015721rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000015722if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15723 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000015724 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015725 grep -v '^ *+' conftest.er1 >conftest.err
15726 rm -f conftest.er1
15727 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000015728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015729 (exit $ac_status); } &&
15730 { ac_try='test -z "$ac_c_werror_flag"
15731 || test ! -s conftest.err'
15732 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15733 (eval $ac_try) 2>&5
15734 ac_status=$?
15735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15736 (exit $ac_status); }; } &&
15737 { ac_try='test -s conftest$ac_exeext'
15738 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15739 (eval $ac_try) 2>&5
15740 ac_status=$?
15741 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15742 (exit $ac_status); }; }; then
Martin v. Löwise9416172003-05-03 10:12:45 +000015743
15744cat >>confdefs.h <<\_ACEOF
15745#define HAVE_INET_ATON 1
15746_ACEOF
15747
Skip Montanaro89e975f2007-08-22 19:05:21 +000015748 echo "$as_me:$LINENO: result: yes" >&5
15749echo "${ECHO_T}yes" >&6
Martin v. Löwise9416172003-05-03 10:12:45 +000015750else
15751 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015752sed 's/^/| /' conftest.$ac_ext >&5
15753
Skip Montanaro89e975f2007-08-22 19:05:21 +000015754echo "$as_me:$LINENO: result: no" >&5
15755echo "${ECHO_T}no" >&6
Martin v. Löwise9416172003-05-03 10:12:45 +000015756
15757fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000015758rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015759 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000015760
Skip Montanaro89e975f2007-08-22 19:05:21 +000015761echo "$as_me:$LINENO: checking for inet_pton" >&5
15762echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
Martin v. Löwise9416172003-05-03 10:12:45 +000015763cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015764/* confdefs.h. */
15765_ACEOF
15766cat confdefs.h >>conftest.$ac_ext
15767cat >>conftest.$ac_ext <<_ACEOF
15768/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000015769
15770#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000015771#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000015772#include <sys/socket.h>
15773#include <netinet/in.h>
15774#include <arpa/inet.h>
15775
Martin v. Löwise9416172003-05-03 10:12:45 +000015776int
15777main ()
15778{
15779void* p = inet_pton
15780 ;
15781 return 0;
15782}
15783_ACEOF
15784rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000015785if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15786 (eval $ac_compile) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000015787 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015788 grep -v '^ *+' conftest.er1 >conftest.err
15789 rm -f conftest.er1
15790 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000015791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015792 (exit $ac_status); } &&
15793 { ac_try='test -z "$ac_c_werror_flag"
15794 || test ! -s conftest.err'
15795 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15796 (eval $ac_try) 2>&5
15797 ac_status=$?
15798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15799 (exit $ac_status); }; } &&
15800 { ac_try='test -s conftest.$ac_objext'
15801 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15802 (eval $ac_try) 2>&5
15803 ac_status=$?
15804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15805 (exit $ac_status); }; }; then
Martin v. Löwise9416172003-05-03 10:12:45 +000015806
15807cat >>confdefs.h <<\_ACEOF
15808#define HAVE_INET_PTON 1
15809_ACEOF
15810
Skip Montanaro89e975f2007-08-22 19:05:21 +000015811 echo "$as_me:$LINENO: result: yes" >&5
15812echo "${ECHO_T}yes" >&6
Martin v. Löwise9416172003-05-03 10:12:45 +000015813else
15814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015815sed 's/^/| /' conftest.$ac_ext >&5
15816
Skip Montanaro89e975f2007-08-22 19:05:21 +000015817echo "$as_me:$LINENO: result: no" >&5
15818echo "${ECHO_T}no" >&6
Martin v. Löwise9416172003-05-03 10:12:45 +000015819
15820fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000015821rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000015822
Martin v. Löwisd6640d42003-07-06 09:29:52 +000015823# On some systems, setgroups is in unistd.h, on others, in grp.h
Skip Montanaro89e975f2007-08-22 19:05:21 +000015824echo "$as_me:$LINENO: checking for setgroups" >&5
15825echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
Martin v. Löwisd5843682002-11-21 20:41:28 +000015826cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015827/* confdefs.h. */
15828_ACEOF
15829cat confdefs.h >>conftest.$ac_ext
15830cat >>conftest.$ac_ext <<_ACEOF
15831/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000015832
15833#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000015834#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000015835#ifdef HAVE_GRP_H
15836#include <grp.h>
15837#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000015838
Martin v. Löwisd5843682002-11-21 20:41:28 +000015839int
15840main ()
15841{
15842void* p = setgroups
15843 ;
15844 return 0;
15845}
15846_ACEOF
15847rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000015848if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15849 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000015850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015851 grep -v '^ *+' conftest.er1 >conftest.err
15852 rm -f conftest.er1
15853 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000015854 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015855 (exit $ac_status); } &&
15856 { ac_try='test -z "$ac_c_werror_flag"
15857 || test ! -s conftest.err'
15858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15859 (eval $ac_try) 2>&5
15860 ac_status=$?
15861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15862 (exit $ac_status); }; } &&
15863 { ac_try='test -s conftest.$ac_objext'
15864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15865 (eval $ac_try) 2>&5
15866 ac_status=$?
15867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15868 (exit $ac_status); }; }; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000015869
15870cat >>confdefs.h <<\_ACEOF
15871#define HAVE_SETGROUPS 1
15872_ACEOF
15873
Skip Montanaro89e975f2007-08-22 19:05:21 +000015874 echo "$as_me:$LINENO: result: yes" >&5
15875echo "${ECHO_T}yes" >&6
Martin v. Löwisd5843682002-11-21 20:41:28 +000015876else
15877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015878sed 's/^/| /' conftest.$ac_ext >&5
15879
Skip Montanaro89e975f2007-08-22 19:05:21 +000015880echo "$as_me:$LINENO: result: no" >&5
15881echo "${ECHO_T}no" >&6
Martin v. Löwisd5843682002-11-21 20:41:28 +000015882
15883fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000015884rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000015885
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015886# check for openpty and forkpty
15887
Martin v. Löwis11437992002-04-12 09:54:03 +000015888
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015889for ac_func in openpty
15890do
Martin v. Löwis11437992002-04-12 09:54:03 +000015891as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaro89e975f2007-08-22 19:05:21 +000015892echo "$as_me:$LINENO: checking for $ac_func" >&5
15893echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15894if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015895 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015896else
Martin v. Löwis11437992002-04-12 09:54:03 +000015897 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015898/* confdefs.h. */
15899_ACEOF
15900cat confdefs.h >>conftest.$ac_ext
15901cat >>conftest.$ac_ext <<_ACEOF
15902/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015903/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15904 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15905#define $ac_func innocuous_$ac_func
15906
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015907/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015908 which can conflict with char $ac_func (); below.
15909 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015910 <limits.h> exists even on freestanding compilers. */
15911
15912#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015913# include <limits.h>
15914#else
15915# include <assert.h>
15916#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015917
15918#undef $ac_func
15919
Skip Montanaro89e975f2007-08-22 19:05:21 +000015920/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015921#ifdef __cplusplus
15922extern "C"
Skip Montanaro89e975f2007-08-22 19:05:21 +000015923{
Martin v. Löwis11437992002-04-12 09:54:03 +000015924#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000015925/* We use char because int might match the return type of a gcc2
15926 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015927char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015928/* The GNU C library defines this for functions which it implements
15929 to always fail with ENOSYS. Some functions are actually named
15930 something starting with __ and the normal name is an alias. */
Skip Montanaro89e975f2007-08-22 19:05:21 +000015931#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015932choke me
Skip Montanaro89e975f2007-08-22 19:05:21 +000015933#else
15934char (*f) () = $ac_func;
15935#endif
15936#ifdef __cplusplus
15937}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015938#endif
15939
Skip Montanaro6dead952003-09-25 14:50:04 +000015940int
15941main ()
15942{
Skip Montanaro89e975f2007-08-22 19:05:21 +000015943return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015944 ;
15945 return 0;
15946}
15947_ACEOF
15948rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000015949if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15950 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015951 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015952 grep -v '^ *+' conftest.er1 >conftest.err
15953 rm -f conftest.er1
15954 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015956 (exit $ac_status); } &&
15957 { ac_try='test -z "$ac_c_werror_flag"
15958 || test ! -s conftest.err'
15959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15960 (eval $ac_try) 2>&5
15961 ac_status=$?
15962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15963 (exit $ac_status); }; } &&
15964 { ac_try='test -s conftest$ac_exeext'
15965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15966 (eval $ac_try) 2>&5
15967 ac_status=$?
15968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15969 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015970 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015971else
Martin v. Löwis11437992002-04-12 09:54:03 +000015972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015973sed 's/^/| /' conftest.$ac_ext >&5
15974
Skip Montanaro89e975f2007-08-22 19:05:21 +000015975eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015976fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000015977rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015978 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015979fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000015980echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15981echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015982if test `eval echo '${'$as_ac_var'}'` = yes; then
15983 cat >>confdefs.h <<_ACEOF
15984#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15985_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015986
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015987else
Skip Montanaro89e975f2007-08-22 19:05:21 +000015988 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
15989echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015990if test "${ac_cv_lib_util_openpty+set}" = set; then
15991 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000015992else
Martin v. Löwis11437992002-04-12 09:54:03 +000015993 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000015994LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015995cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015996/* confdefs.h. */
15997_ACEOF
15998cat confdefs.h >>conftest.$ac_ext
15999cat >>conftest.$ac_ext <<_ACEOF
16000/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016001
Skip Montanaro89e975f2007-08-22 19:05:21 +000016002/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016003#ifdef __cplusplus
16004extern "C"
16005#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000016006/* We use char because int might match the return type of a gcc2
16007 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016008char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016009int
16010main ()
16011{
Skip Montanaro89e975f2007-08-22 19:05:21 +000016012openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016013 ;
16014 return 0;
16015}
16016_ACEOF
16017rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000016018if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16019 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016021 grep -v '^ *+' conftest.er1 >conftest.err
16022 rm -f conftest.er1
16023 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000016025 (exit $ac_status); } &&
16026 { ac_try='test -z "$ac_c_werror_flag"
16027 || test ! -s conftest.err'
16028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16029 (eval $ac_try) 2>&5
16030 ac_status=$?
16031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16032 (exit $ac_status); }; } &&
16033 { ac_try='test -s conftest$ac_exeext'
16034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16035 (eval $ac_try) 2>&5
16036 ac_status=$?
16037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16038 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016039 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000016040else
Martin v. Löwis11437992002-04-12 09:54:03 +000016041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016042sed 's/^/| /' conftest.$ac_ext >&5
16043
Skip Montanaro89e975f2007-08-22 19:05:21 +000016044ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016045fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000016046rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016047 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016048LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016049fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000016050echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
16051echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016052if test $ac_cv_lib_util_openpty = yes; then
16053 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016054#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016055_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016056 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016057else
Skip Montanaro89e975f2007-08-22 19:05:21 +000016058 echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
16059echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016060if test "${ac_cv_lib_bsd_openpty+set}" = set; then
16061 echo $ECHO_N "(cached) $ECHO_C" >&6
16062else
16063 ac_check_lib_save_LIBS=$LIBS
16064LIBS="-lbsd $LIBS"
16065cat >conftest.$ac_ext <<_ACEOF
16066/* confdefs.h. */
16067_ACEOF
16068cat confdefs.h >>conftest.$ac_ext
16069cat >>conftest.$ac_ext <<_ACEOF
16070/* end confdefs.h. */
16071
Skip Montanaro89e975f2007-08-22 19:05:21 +000016072/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016073#ifdef __cplusplus
16074extern "C"
16075#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000016076/* We use char because int might match the return type of a gcc2
16077 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016078char openpty ();
16079int
16080main ()
16081{
Skip Montanaro89e975f2007-08-22 19:05:21 +000016082openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016083 ;
16084 return 0;
16085}
16086_ACEOF
16087rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000016088if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16089 (eval $ac_link) 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016090 ac_status=$?
16091 grep -v '^ *+' conftest.er1 >conftest.err
16092 rm -f conftest.er1
16093 cat conftest.err >&5
16094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000016095 (exit $ac_status); } &&
16096 { ac_try='test -z "$ac_c_werror_flag"
16097 || test ! -s conftest.err'
16098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16099 (eval $ac_try) 2>&5
16100 ac_status=$?
16101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16102 (exit $ac_status); }; } &&
16103 { ac_try='test -s conftest$ac_exeext'
16104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16105 (eval $ac_try) 2>&5
16106 ac_status=$?
16107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16108 (exit $ac_status); }; }; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016109 ac_cv_lib_bsd_openpty=yes
16110else
16111 echo "$as_me: failed program was:" >&5
16112sed 's/^/| /' conftest.$ac_ext >&5
16113
Skip Montanaro89e975f2007-08-22 19:05:21 +000016114ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016115fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000016116rm -f conftest.err conftest.$ac_objext \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016117 conftest$ac_exeext conftest.$ac_ext
16118LIBS=$ac_check_lib_save_LIBS
16119fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000016120echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
16121echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016122if test $ac_cv_lib_bsd_openpty = yes; then
16123 cat >>confdefs.h <<\_ACEOF
16124#define HAVE_OPENPTY 1
16125_ACEOF
16126 LIBS="$LIBS -lbsd"
16127fi
16128
16129
16130fi
16131
Fred Drake8cef4cf2000-06-28 16:40:38 +000016132
16133fi
16134done
16135
Martin v. Löwis11437992002-04-12 09:54:03 +000016136
Fred Drake8cef4cf2000-06-28 16:40:38 +000016137for ac_func in forkpty
16138do
Martin v. Löwis11437992002-04-12 09:54:03 +000016139as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaro89e975f2007-08-22 19:05:21 +000016140echo "$as_me:$LINENO: checking for $ac_func" >&5
16141echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16142if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016143 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016144else
Martin v. Löwis11437992002-04-12 09:54:03 +000016145 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016146/* confdefs.h. */
16147_ACEOF
16148cat confdefs.h >>conftest.$ac_ext
16149cat >>conftest.$ac_ext <<_ACEOF
16150/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016151/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16152 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16153#define $ac_func innocuous_$ac_func
16154
Fred Drake8cef4cf2000-06-28 16:40:38 +000016155/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016156 which can conflict with char $ac_func (); below.
16157 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016158 <limits.h> exists even on freestanding compilers. */
16159
16160#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016161# include <limits.h>
16162#else
16163# include <assert.h>
16164#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016165
16166#undef $ac_func
16167
Skip Montanaro89e975f2007-08-22 19:05:21 +000016168/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016169#ifdef __cplusplus
16170extern "C"
Skip Montanaro89e975f2007-08-22 19:05:21 +000016171{
Martin v. Löwis11437992002-04-12 09:54:03 +000016172#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000016173/* We use char because int might match the return type of a gcc2
16174 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016175char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000016176/* The GNU C library defines this for functions which it implements
16177 to always fail with ENOSYS. Some functions are actually named
16178 something starting with __ and the normal name is an alias. */
Skip Montanaro89e975f2007-08-22 19:05:21 +000016179#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Fred Drake8cef4cf2000-06-28 16:40:38 +000016180choke me
Skip Montanaro89e975f2007-08-22 19:05:21 +000016181#else
16182char (*f) () = $ac_func;
16183#endif
16184#ifdef __cplusplus
16185}
Fred Drake8cef4cf2000-06-28 16:40:38 +000016186#endif
16187
Skip Montanaro6dead952003-09-25 14:50:04 +000016188int
16189main ()
16190{
Skip Montanaro89e975f2007-08-22 19:05:21 +000016191return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016192 ;
16193 return 0;
16194}
16195_ACEOF
16196rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000016197if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16198 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016200 grep -v '^ *+' conftest.er1 >conftest.err
16201 rm -f conftest.er1
16202 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000016204 (exit $ac_status); } &&
16205 { ac_try='test -z "$ac_c_werror_flag"
16206 || test ! -s conftest.err'
16207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16208 (eval $ac_try) 2>&5
16209 ac_status=$?
16210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16211 (exit $ac_status); }; } &&
16212 { ac_try='test -s conftest$ac_exeext'
16213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16214 (eval $ac_try) 2>&5
16215 ac_status=$?
16216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16217 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016218 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016219else
Martin v. Löwis11437992002-04-12 09:54:03 +000016220 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016221sed 's/^/| /' conftest.$ac_ext >&5
16222
Skip Montanaro89e975f2007-08-22 19:05:21 +000016223eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016224fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000016225rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016226 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016227fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000016228echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16229echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016230if test `eval echo '${'$as_ac_var'}'` = yes; then
16231 cat >>confdefs.h <<_ACEOF
16232#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16233_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016234
Fred Drake8cef4cf2000-06-28 16:40:38 +000016235else
Skip Montanaro89e975f2007-08-22 19:05:21 +000016236 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
16237echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016238if test "${ac_cv_lib_util_forkpty+set}" = set; then
16239 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000016240else
Martin v. Löwis11437992002-04-12 09:54:03 +000016241 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016242LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016243cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016244/* confdefs.h. */
16245_ACEOF
16246cat confdefs.h >>conftest.$ac_ext
16247cat >>conftest.$ac_ext <<_ACEOF
16248/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016249
Skip Montanaro89e975f2007-08-22 19:05:21 +000016250/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016251#ifdef __cplusplus
16252extern "C"
16253#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000016254/* We use char because int might match the return type of a gcc2
16255 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016256char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016257int
16258main ()
16259{
Skip Montanaro89e975f2007-08-22 19:05:21 +000016260forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016261 ;
16262 return 0;
16263}
16264_ACEOF
16265rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000016266if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16267 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016268 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016269 grep -v '^ *+' conftest.er1 >conftest.err
16270 rm -f conftest.er1
16271 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000016273 (exit $ac_status); } &&
16274 { ac_try='test -z "$ac_c_werror_flag"
16275 || test ! -s conftest.err'
16276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16277 (eval $ac_try) 2>&5
16278 ac_status=$?
16279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16280 (exit $ac_status); }; } &&
16281 { ac_try='test -s conftest$ac_exeext'
16282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16283 (eval $ac_try) 2>&5
16284 ac_status=$?
16285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16286 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016287 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000016288else
Martin v. Löwis11437992002-04-12 09:54:03 +000016289 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016290sed 's/^/| /' conftest.$ac_ext >&5
16291
Skip Montanaro89e975f2007-08-22 19:05:21 +000016292ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016293fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000016294rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016295 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016296LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000016297fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000016298echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
16299echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016300if test $ac_cv_lib_util_forkpty = yes; then
16301 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016302#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016303_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016304 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016305else
Skip Montanaro89e975f2007-08-22 19:05:21 +000016306 echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
16307echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016308if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
16309 echo $ECHO_N "(cached) $ECHO_C" >&6
16310else
16311 ac_check_lib_save_LIBS=$LIBS
16312LIBS="-lbsd $LIBS"
16313cat >conftest.$ac_ext <<_ACEOF
16314/* confdefs.h. */
16315_ACEOF
16316cat confdefs.h >>conftest.$ac_ext
16317cat >>conftest.$ac_ext <<_ACEOF
16318/* end confdefs.h. */
16319
Skip Montanaro89e975f2007-08-22 19:05:21 +000016320/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016321#ifdef __cplusplus
16322extern "C"
16323#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000016324/* We use char because int might match the return type of a gcc2
16325 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016326char forkpty ();
16327int
16328main ()
16329{
Skip Montanaro89e975f2007-08-22 19:05:21 +000016330forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016331 ;
16332 return 0;
16333}
16334_ACEOF
16335rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000016336if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16337 (eval $ac_link) 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016338 ac_status=$?
16339 grep -v '^ *+' conftest.er1 >conftest.err
16340 rm -f conftest.er1
16341 cat conftest.err >&5
16342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000016343 (exit $ac_status); } &&
16344 { ac_try='test -z "$ac_c_werror_flag"
16345 || test ! -s conftest.err'
16346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16347 (eval $ac_try) 2>&5
16348 ac_status=$?
16349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16350 (exit $ac_status); }; } &&
16351 { ac_try='test -s conftest$ac_exeext'
16352 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16353 (eval $ac_try) 2>&5
16354 ac_status=$?
16355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16356 (exit $ac_status); }; }; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016357 ac_cv_lib_bsd_forkpty=yes
16358else
16359 echo "$as_me: failed program was:" >&5
16360sed 's/^/| /' conftest.$ac_ext >&5
16361
Skip Montanaro89e975f2007-08-22 19:05:21 +000016362ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000016363fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000016364rm -f conftest.err conftest.$ac_objext \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016365 conftest$ac_exeext conftest.$ac_ext
16366LIBS=$ac_check_lib_save_LIBS
16367fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000016368echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
16369echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000016370if test $ac_cv_lib_bsd_forkpty = yes; then
16371 cat >>confdefs.h <<\_ACEOF
16372#define HAVE_FORKPTY 1
16373_ACEOF
16374 LIBS="$LIBS -lbsd"
16375fi
16376
16377
16378fi
16379
Fred Drake8cef4cf2000-06-28 16:40:38 +000016380
16381fi
16382done
16383
Jack Jansendd19cf82001-12-06 22:36:17 +000016384
Michael W. Hudson54241132001-12-07 15:38:26 +000016385# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016386
16387
16388
16389
16390
16391
Fred Drake8cef4cf2000-06-28 16:40:38 +000016392for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
16393do
Martin v. Löwis11437992002-04-12 09:54:03 +000016394as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaro89e975f2007-08-22 19:05:21 +000016395echo "$as_me:$LINENO: checking for $ac_func" >&5
16396echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16397if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016398 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016399else
Martin v. Löwis11437992002-04-12 09:54:03 +000016400 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016401/* confdefs.h. */
16402_ACEOF
16403cat confdefs.h >>conftest.$ac_ext
16404cat >>conftest.$ac_ext <<_ACEOF
16405/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016406/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16407 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16408#define $ac_func innocuous_$ac_func
16409
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016410/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016411 which can conflict with char $ac_func (); below.
16412 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016413 <limits.h> exists even on freestanding compilers. */
16414
16415#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016416# include <limits.h>
16417#else
16418# include <assert.h>
16419#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016420
16421#undef $ac_func
16422
Skip Montanaro89e975f2007-08-22 19:05:21 +000016423/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016424#ifdef __cplusplus
16425extern "C"
Skip Montanaro89e975f2007-08-22 19:05:21 +000016426{
Martin v. Löwis11437992002-04-12 09:54:03 +000016427#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000016428/* We use char because int might match the return type of a gcc2
16429 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016430char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016431/* The GNU C library defines this for functions which it implements
16432 to always fail with ENOSYS. Some functions are actually named
16433 something starting with __ and the normal name is an alias. */
Skip Montanaro89e975f2007-08-22 19:05:21 +000016434#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016435choke me
Skip Montanaro89e975f2007-08-22 19:05:21 +000016436#else
16437char (*f) () = $ac_func;
16438#endif
16439#ifdef __cplusplus
16440}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000016441#endif
16442
Skip Montanaro6dead952003-09-25 14:50:04 +000016443int
16444main ()
16445{
Skip Montanaro89e975f2007-08-22 19:05:21 +000016446return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016447 ;
16448 return 0;
16449}
16450_ACEOF
16451rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000016452if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16453 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016454 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016455 grep -v '^ *+' conftest.er1 >conftest.err
16456 rm -f conftest.er1
16457 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000016459 (exit $ac_status); } &&
16460 { ac_try='test -z "$ac_c_werror_flag"
16461 || test ! -s conftest.err'
16462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16463 (eval $ac_try) 2>&5
16464 ac_status=$?
16465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16466 (exit $ac_status); }; } &&
16467 { ac_try='test -s conftest$ac_exeext'
16468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16469 (eval $ac_try) 2>&5
16470 ac_status=$?
16471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16472 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016473 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016474else
Martin v. Löwis11437992002-04-12 09:54:03 +000016475 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016476sed 's/^/| /' conftest.$ac_ext >&5
16477
Skip Montanaro89e975f2007-08-22 19:05:21 +000016478eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016479fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000016480rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016481 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016482fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000016483echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16484echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016485if test `eval echo '${'$as_ac_var'}'` = yes; then
16486 cat >>confdefs.h <<_ACEOF
16487#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16488_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016489
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016490fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000016491done
16492
Michael W. Hudson54241132001-12-07 15:38:26 +000016493
Martin v. Löwis11437992002-04-12 09:54:03 +000016494
16495
16496
16497
16498
Martin v. Löwis1142de32002-03-29 16:28:31 +000016499for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000016500do
Martin v. Löwis11437992002-04-12 09:54:03 +000016501as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaro89e975f2007-08-22 19:05:21 +000016502echo "$as_me:$LINENO: checking for $ac_func" >&5
16503echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16504if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016505 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016506else
Martin v. Löwis11437992002-04-12 09:54:03 +000016507 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016508/* confdefs.h. */
16509_ACEOF
16510cat confdefs.h >>conftest.$ac_ext
16511cat >>conftest.$ac_ext <<_ACEOF
16512/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016513/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16514 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16515#define $ac_func innocuous_$ac_func
16516
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016517/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016518 which can conflict with char $ac_func (); below.
16519 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016520 <limits.h> exists even on freestanding compilers. */
16521
16522#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016523# include <limits.h>
16524#else
16525# include <assert.h>
16526#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016527
16528#undef $ac_func
16529
Skip Montanaro89e975f2007-08-22 19:05:21 +000016530/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016531#ifdef __cplusplus
16532extern "C"
Skip Montanaro89e975f2007-08-22 19:05:21 +000016533{
Martin v. Löwis11437992002-04-12 09:54:03 +000016534#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000016535/* We use char because int might match the return type of a gcc2
16536 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016537char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016538/* The GNU C library defines this for functions which it implements
16539 to always fail with ENOSYS. Some functions are actually named
16540 something starting with __ and the normal name is an alias. */
Skip Montanaro89e975f2007-08-22 19:05:21 +000016541#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000016542choke me
Skip Montanaro89e975f2007-08-22 19:05:21 +000016543#else
16544char (*f) () = $ac_func;
16545#endif
16546#ifdef __cplusplus
16547}
Guido van Rossum627b2d71993-12-24 10:39:16 +000016548#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016549
Skip Montanaro6dead952003-09-25 14:50:04 +000016550int
16551main ()
16552{
Skip Montanaro89e975f2007-08-22 19:05:21 +000016553return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016554 ;
16555 return 0;
16556}
16557_ACEOF
16558rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000016559if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16560 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016562 grep -v '^ *+' conftest.er1 >conftest.err
16563 rm -f conftest.er1
16564 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000016566 (exit $ac_status); } &&
16567 { ac_try='test -z "$ac_c_werror_flag"
16568 || test ! -s conftest.err'
16569 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16570 (eval $ac_try) 2>&5
16571 ac_status=$?
16572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16573 (exit $ac_status); }; } &&
16574 { ac_try='test -s conftest$ac_exeext'
16575 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16576 (eval $ac_try) 2>&5
16577 ac_status=$?
16578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16579 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016580 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000016581else
Martin v. Löwis11437992002-04-12 09:54:03 +000016582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016583sed 's/^/| /' conftest.$ac_ext >&5
16584
Skip Montanaro89e975f2007-08-22 19:05:21 +000016585eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000016586fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000016587rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016588 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000016589fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000016590echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16591echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016592if test `eval echo '${'$as_ac_var'}'` = yes; then
16593 cat >>confdefs.h <<_ACEOF
16594#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16595_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000016596
Martin v. Löwis1142de32002-03-29 16:28:31 +000016597else
Skip Montanaro89e975f2007-08-22 19:05:21 +000016598 case $LIBOBJS in
16599 "$ac_func.$ac_objext" | \
16600 *" $ac_func.$ac_objext" | \
16601 "$ac_func.$ac_objext "* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016602 *" $ac_func.$ac_objext "* ) ;;
Skip Montanaro89e975f2007-08-22 19:05:21 +000016603 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016604esac
16605
Martin v. Löwis1142de32002-03-29 16:28:31 +000016606fi
16607done
16608
16609
Martin v. Löwis11437992002-04-12 09:54:03 +000016610
Martin v. Löwis1142de32002-03-29 16:28:31 +000016611for ac_func in getpgrp
16612do
Martin v. Löwis11437992002-04-12 09:54:03 +000016613as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaro89e975f2007-08-22 19:05:21 +000016614echo "$as_me:$LINENO: checking for $ac_func" >&5
16615echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16616if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016617 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000016618else
Martin v. Löwis11437992002-04-12 09:54:03 +000016619 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016620/* confdefs.h. */
16621_ACEOF
16622cat confdefs.h >>conftest.$ac_ext
16623cat >>conftest.$ac_ext <<_ACEOF
16624/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016625/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16626 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16627#define $ac_func innocuous_$ac_func
16628
Martin v. Löwis1142de32002-03-29 16:28:31 +000016629/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016630 which can conflict with char $ac_func (); below.
16631 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016632 <limits.h> exists even on freestanding compilers. */
16633
16634#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016635# include <limits.h>
16636#else
16637# include <assert.h>
16638#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016639
16640#undef $ac_func
16641
Skip Montanaro89e975f2007-08-22 19:05:21 +000016642/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016643#ifdef __cplusplus
16644extern "C"
Skip Montanaro89e975f2007-08-22 19:05:21 +000016645{
Martin v. Löwis11437992002-04-12 09:54:03 +000016646#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000016647/* We use char because int might match the return type of a gcc2
16648 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016649char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000016650/* The GNU C library defines this for functions which it implements
16651 to always fail with ENOSYS. Some functions are actually named
16652 something starting with __ and the normal name is an alias. */
Skip Montanaro89e975f2007-08-22 19:05:21 +000016653#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Martin v. Löwis1142de32002-03-29 16:28:31 +000016654choke me
Skip Montanaro89e975f2007-08-22 19:05:21 +000016655#else
16656char (*f) () = $ac_func;
16657#endif
16658#ifdef __cplusplus
16659}
Martin v. Löwis1142de32002-03-29 16:28:31 +000016660#endif
16661
Skip Montanaro6dead952003-09-25 14:50:04 +000016662int
16663main ()
16664{
Skip Montanaro89e975f2007-08-22 19:05:21 +000016665return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016666 ;
16667 return 0;
16668}
16669_ACEOF
16670rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000016671if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16672 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016673 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016674 grep -v '^ *+' conftest.er1 >conftest.err
16675 rm -f conftest.er1
16676 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000016678 (exit $ac_status); } &&
16679 { ac_try='test -z "$ac_c_werror_flag"
16680 || test ! -s conftest.err'
16681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16682 (eval $ac_try) 2>&5
16683 ac_status=$?
16684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16685 (exit $ac_status); }; } &&
16686 { ac_try='test -s conftest$ac_exeext'
16687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16688 (eval $ac_try) 2>&5
16689 ac_status=$?
16690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16691 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016692 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016693else
Martin v. Löwis11437992002-04-12 09:54:03 +000016694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016695sed 's/^/| /' conftest.$ac_ext >&5
16696
Skip Montanaro89e975f2007-08-22 19:05:21 +000016697eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016698fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000016699rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016700 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016701fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000016702echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16703echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016704if test `eval echo '${'$as_ac_var'}'` = yes; then
16705 cat >>confdefs.h <<_ACEOF
16706#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16707_ACEOF
16708 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016709/* confdefs.h. */
16710_ACEOF
16711cat confdefs.h >>conftest.$ac_ext
16712cat >>conftest.$ac_ext <<_ACEOF
16713/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016714#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016715int
16716main ()
16717{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016718getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000016719 ;
16720 return 0;
16721}
16722_ACEOF
16723rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000016724if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16725 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016727 grep -v '^ *+' conftest.er1 >conftest.err
16728 rm -f conftest.er1
16729 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000016731 (exit $ac_status); } &&
16732 { ac_try='test -z "$ac_c_werror_flag"
16733 || test ! -s conftest.err'
16734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16735 (eval $ac_try) 2>&5
16736 ac_status=$?
16737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16738 (exit $ac_status); }; } &&
16739 { ac_try='test -s conftest.$ac_objext'
16740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16741 (eval $ac_try) 2>&5
16742 ac_status=$?
16743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16744 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016745
16746cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016747#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016748_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016749
Martin v. Löwis11437992002-04-12 09:54:03 +000016750
Guido van Rossumf78abae1997-01-21 22:02:36 +000016751else
Martin v. Löwis11437992002-04-12 09:54:03 +000016752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016753sed 's/^/| /' conftest.$ac_ext >&5
16754
Guido van Rossum627b2d71993-12-24 10:39:16 +000016755fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000016756rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016757
Guido van Rossum627b2d71993-12-24 10:39:16 +000016758fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016759done
Guido van Rossum627b2d71993-12-24 10:39:16 +000016760
Jack Jansen150753c2003-03-29 22:07:47 +000016761
16762for ac_func in setpgrp
16763do
16764as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaro89e975f2007-08-22 19:05:21 +000016765echo "$as_me:$LINENO: checking for $ac_func" >&5
16766echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16767if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016768 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016769else
Martin v. Löwis11437992002-04-12 09:54:03 +000016770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016771/* confdefs.h. */
16772_ACEOF
16773cat confdefs.h >>conftest.$ac_ext
16774cat >>conftest.$ac_ext <<_ACEOF
16775/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016776/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16777 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16778#define $ac_func innocuous_$ac_func
16779
Jack Jansen150753c2003-03-29 22:07:47 +000016780/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016781 which can conflict with char $ac_func (); below.
16782 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016783 <limits.h> exists even on freestanding compilers. */
16784
16785#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016786# include <limits.h>
16787#else
16788# include <assert.h>
16789#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016790
16791#undef $ac_func
16792
Skip Montanaro89e975f2007-08-22 19:05:21 +000016793/* Override any gcc2 internal prototype to avoid an error. */
Jack Jansen150753c2003-03-29 22:07:47 +000016794#ifdef __cplusplus
16795extern "C"
Skip Montanaro89e975f2007-08-22 19:05:21 +000016796{
Martin v. Löwis11437992002-04-12 09:54:03 +000016797#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000016798/* We use char because int might match the return type of a gcc2
16799 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000016800char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000016801/* The GNU C library defines this for functions which it implements
16802 to always fail with ENOSYS. Some functions are actually named
16803 something starting with __ and the normal name is an alias. */
Skip Montanaro89e975f2007-08-22 19:05:21 +000016804#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Jack Jansen150753c2003-03-29 22:07:47 +000016805choke me
Skip Montanaro89e975f2007-08-22 19:05:21 +000016806#else
16807char (*f) () = $ac_func;
16808#endif
16809#ifdef __cplusplus
16810}
Jack Jansen150753c2003-03-29 22:07:47 +000016811#endif
16812
Skip Montanaro6dead952003-09-25 14:50:04 +000016813int
16814main ()
16815{
Skip Montanaro89e975f2007-08-22 19:05:21 +000016816return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016817 ;
16818 return 0;
16819}
16820_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000016821rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000016822if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16823 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016824 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016825 grep -v '^ *+' conftest.er1 >conftest.err
16826 rm -f conftest.er1
16827 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000016829 (exit $ac_status); } &&
16830 { ac_try='test -z "$ac_c_werror_flag"
16831 || test ! -s conftest.err'
16832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16833 (eval $ac_try) 2>&5
16834 ac_status=$?
16835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16836 (exit $ac_status); }; } &&
16837 { ac_try='test -s conftest$ac_exeext'
16838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16839 (eval $ac_try) 2>&5
16840 ac_status=$?
16841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16842 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000016843 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016844else
Jack Jansen150753c2003-03-29 22:07:47 +000016845 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016846sed 's/^/| /' conftest.$ac_ext >&5
16847
Skip Montanaro89e975f2007-08-22 19:05:21 +000016848eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016849fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000016850rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016851 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016852fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000016853echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16854echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Jack Jansen150753c2003-03-29 22:07:47 +000016855if test `eval echo '${'$as_ac_var'}'` = yes; then
16856 cat >>confdefs.h <<_ACEOF
16857#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16858_ACEOF
16859 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016860/* confdefs.h. */
16861_ACEOF
16862cat confdefs.h >>conftest.$ac_ext
16863cat >>conftest.$ac_ext <<_ACEOF
16864/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000016865#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000016866int
16867main ()
16868{
16869setpgrp(0,0);
16870 ;
16871 return 0;
16872}
16873_ACEOF
16874rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000016875if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
16876 (eval $ac_compile) 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000016877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016878 grep -v '^ *+' conftest.er1 >conftest.err
16879 rm -f conftest.er1
16880 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000016881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000016882 (exit $ac_status); } &&
16883 { ac_try='test -z "$ac_c_werror_flag"
16884 || test ! -s conftest.err'
16885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16886 (eval $ac_try) 2>&5
16887 ac_status=$?
16888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16889 (exit $ac_status); }; } &&
16890 { ac_try='test -s conftest.$ac_objext'
16891 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16892 (eval $ac_try) 2>&5
16893 ac_status=$?
16894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16895 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016896
16897cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000016898#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016899_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000016900
Jack Jansen150753c2003-03-29 22:07:47 +000016901
16902else
16903 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016904sed 's/^/| /' conftest.$ac_ext >&5
16905
Guido van Rossum8eee56f1994-10-20 22:18:37 +000016906fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000016907rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000016908
16909fi
16910done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000016911
Martin v. Löwis11437992002-04-12 09:54:03 +000016912
Thomas Wouters3a584202000-08-05 23:28:51 +000016913for ac_func in gettimeofday
16914do
Martin v. Löwis11437992002-04-12 09:54:03 +000016915as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaro89e975f2007-08-22 19:05:21 +000016916echo "$as_me:$LINENO: checking for $ac_func" >&5
16917echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16918if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016919 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016920else
Martin v. Löwis11437992002-04-12 09:54:03 +000016921 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016922/* confdefs.h. */
16923_ACEOF
16924cat confdefs.h >>conftest.$ac_ext
16925cat >>conftest.$ac_ext <<_ACEOF
16926/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016927/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16928 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16929#define $ac_func innocuous_$ac_func
16930
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016931/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016932 which can conflict with char $ac_func (); below.
16933 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016934 <limits.h> exists even on freestanding compilers. */
16935
16936#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016937# include <limits.h>
16938#else
16939# include <assert.h>
16940#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016941
16942#undef $ac_func
16943
Skip Montanaro89e975f2007-08-22 19:05:21 +000016944/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016945#ifdef __cplusplus
16946extern "C"
Skip Montanaro89e975f2007-08-22 19:05:21 +000016947{
Martin v. Löwis11437992002-04-12 09:54:03 +000016948#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000016949/* We use char because int might match the return type of a gcc2
16950 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016951char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016952/* The GNU C library defines this for functions which it implements
16953 to always fail with ENOSYS. Some functions are actually named
16954 something starting with __ and the normal name is an alias. */
Skip Montanaro89e975f2007-08-22 19:05:21 +000016955#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016956choke me
Skip Montanaro89e975f2007-08-22 19:05:21 +000016957#else
16958char (*f) () = $ac_func;
16959#endif
16960#ifdef __cplusplus
16961}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016962#endif
16963
Skip Montanaro6dead952003-09-25 14:50:04 +000016964int
16965main ()
16966{
Skip Montanaro89e975f2007-08-22 19:05:21 +000016967return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016968 ;
16969 return 0;
16970}
16971_ACEOF
16972rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000016973if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16974 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016975 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016976 grep -v '^ *+' conftest.er1 >conftest.err
16977 rm -f conftest.er1
16978 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000016980 (exit $ac_status); } &&
16981 { ac_try='test -z "$ac_c_werror_flag"
16982 || test ! -s conftest.err'
16983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16984 (eval $ac_try) 2>&5
16985 ac_status=$?
16986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16987 (exit $ac_status); }; } &&
16988 { ac_try='test -s conftest$ac_exeext'
16989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16990 (eval $ac_try) 2>&5
16991 ac_status=$?
16992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16993 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016994 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016995else
Martin v. Löwis11437992002-04-12 09:54:03 +000016996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016997sed 's/^/| /' conftest.$ac_ext >&5
16998
Skip Montanaro89e975f2007-08-22 19:05:21 +000016999eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017000fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017001rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017002 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017003fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017004echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17005echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000017006if test `eval echo '${'$as_ac_var'}'` = yes; then
17007 cat >>confdefs.h <<_ACEOF
17008#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17009_ACEOF
17010 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017011/* confdefs.h. */
17012_ACEOF
17013cat confdefs.h >>conftest.$ac_ext
17014cat >>conftest.$ac_ext <<_ACEOF
17015/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017016#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017017int
17018main ()
17019{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017020gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000017021 ;
17022 return 0;
17023}
17024_ACEOF
17025rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000017026if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17027 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017028 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017029 grep -v '^ *+' conftest.er1 >conftest.err
17030 rm -f conftest.er1
17031 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000017033 (exit $ac_status); } &&
17034 { ac_try='test -z "$ac_c_werror_flag"
17035 || test ! -s conftest.err'
17036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17037 (eval $ac_try) 2>&5
17038 ac_status=$?
17039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17040 (exit $ac_status); }; } &&
17041 { ac_try='test -s conftest.$ac_objext'
17042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17043 (eval $ac_try) 2>&5
17044 ac_status=$?
17045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17046 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000017047 :
17048else
Martin v. Löwis11437992002-04-12 09:54:03 +000017049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017050sed 's/^/| /' conftest.$ac_ext >&5
17051
Martin v. Löwis11437992002-04-12 09:54:03 +000017052
17053cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017054#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017055_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017056
Martin v. Löwis11437992002-04-12 09:54:03 +000017057
Guido van Rossum627b2d71993-12-24 10:39:16 +000017058fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017059rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017060
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017061fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017062done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017063
Michael W. Hudson54241132001-12-07 15:38:26 +000017064
Skip Montanaro89e975f2007-08-22 19:05:21 +000017065echo "$as_me:$LINENO: checking for major" >&5
17066echo $ECHO_N "checking for major... $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017067cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017068/* confdefs.h. */
17069_ACEOF
17070cat confdefs.h >>conftest.$ac_ext
17071cat >>conftest.$ac_ext <<_ACEOF
17072/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017073
Neal Norwitz6eb37f02003-02-23 23:28:15 +000017074#if defined(MAJOR_IN_MKDEV)
17075#include <sys/mkdev.h>
17076#elif defined(MAJOR_IN_SYSMACROS)
17077#include <sys/sysmacros.h>
17078#else
17079#include <sys/types.h>
17080#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017081
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017082int
17083main ()
17084{
17085
17086 makedev(major(0),minor(0));
17087
17088 ;
17089 return 0;
17090}
17091_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000017092rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000017093if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17094 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017095 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017096 grep -v '^ *+' conftest.er1 >conftest.err
17097 rm -f conftest.er1
17098 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000017100 (exit $ac_status); } &&
17101 { ac_try='test -z "$ac_c_werror_flag"
17102 || test ! -s conftest.err'
17103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17104 (eval $ac_try) 2>&5
17105 ac_status=$?
17106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17107 (exit $ac_status); }; } &&
17108 { ac_try='test -s conftest$ac_exeext'
17109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17110 (eval $ac_try) 2>&5
17111 ac_status=$?
17112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17113 (exit $ac_status); }; }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017114
17115
17116cat >>confdefs.h <<\_ACEOF
17117#define HAVE_DEVICE_MACROS 1
17118_ACEOF
17119
Skip Montanaro89e975f2007-08-22 19:05:21 +000017120 echo "$as_me:$LINENO: result: yes" >&5
17121echo "${ECHO_T}yes" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017122
17123else
17124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017125sed 's/^/| /' conftest.$ac_ext >&5
17126
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017127
Skip Montanaro89e975f2007-08-22 19:05:21 +000017128 echo "$as_me:$LINENO: result: no" >&5
17129echo "${ECHO_T}no" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000017130
17131fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017132rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017133 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017134
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017135# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000017136# for [no]getaddrinfo in netdb.h.
Skip Montanaro89e975f2007-08-22 19:05:21 +000017137echo "$as_me:$LINENO: checking for getaddrinfo" >&5
17138echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000017139cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017140/* confdefs.h. */
17141_ACEOF
17142cat confdefs.h >>conftest.$ac_ext
17143cat >>conftest.$ac_ext <<_ACEOF
17144/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017145
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000017146#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017147#include <sys/socket.h>
17148#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000017149#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017150
Martin v. Löwis11437992002-04-12 09:54:03 +000017151int
17152main ()
17153{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017154
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017155getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017156
Martin v. Löwis11437992002-04-12 09:54:03 +000017157 ;
17158 return 0;
17159}
17160_ACEOF
17161rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000017162if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17163 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017165 grep -v '^ *+' conftest.er1 >conftest.err
17166 rm -f conftest.er1
17167 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000017169 (exit $ac_status); } &&
17170 { ac_try='test -z "$ac_c_werror_flag"
17171 || test ! -s conftest.err'
17172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17173 (eval $ac_try) 2>&5
17174 ac_status=$?
17175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17176 (exit $ac_status); }; } &&
17177 { ac_try='test -s conftest$ac_exeext'
17178 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17179 (eval $ac_try) 2>&5
17180 ac_status=$?
17181 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17182 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017183
Skip Montanaro89e975f2007-08-22 19:05:21 +000017184echo "$as_me:$LINENO: result: yes" >&5
17185echo "${ECHO_T}yes" >&6
17186echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
17187echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017188if test "$cross_compiling" = yes; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000017189 echo "$as_me:$LINENO: result: buggy" >&5
17190echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017191buggygetaddrinfo=yes
17192else
Martin v. Löwis11437992002-04-12 09:54:03 +000017193 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017194/* confdefs.h. */
17195_ACEOF
17196cat confdefs.h >>conftest.$ac_ext
17197cat >>conftest.$ac_ext <<_ACEOF
17198/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017199
17200#include <sys/types.h>
17201#include <netdb.h>
17202#include <string.h>
17203#include <sys/socket.h>
17204#include <netinet/in.h>
17205
17206main()
17207{
17208 int passive, gaierr, inet4 = 0, inet6 = 0;
17209 struct addrinfo hints, *ai, *aitop;
17210 char straddr[INET6_ADDRSTRLEN], strport[16];
17211
17212 for (passive = 0; passive <= 1; passive++) {
17213 memset(&hints, 0, sizeof(hints));
17214 hints.ai_family = AF_UNSPEC;
17215 hints.ai_flags = passive ? AI_PASSIVE : 0;
17216 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000017217 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017218 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
17219 (void)gai_strerror(gaierr);
17220 goto bad;
17221 }
17222 for (ai = aitop; ai; ai = ai->ai_next) {
17223 if (ai->ai_addr == NULL ||
17224 ai->ai_addrlen == 0 ||
17225 getnameinfo(ai->ai_addr, ai->ai_addrlen,
17226 straddr, sizeof(straddr), strport, sizeof(strport),
17227 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
17228 goto bad;
17229 }
17230 switch (ai->ai_family) {
17231 case AF_INET:
17232 if (strcmp(strport, "54321") != 0) {
17233 goto bad;
17234 }
17235 if (passive) {
17236 if (strcmp(straddr, "0.0.0.0") != 0) {
17237 goto bad;
17238 }
17239 } else {
17240 if (strcmp(straddr, "127.0.0.1") != 0) {
17241 goto bad;
17242 }
17243 }
17244 inet4++;
17245 break;
17246 case AF_INET6:
17247 if (strcmp(strport, "54321") != 0) {
17248 goto bad;
17249 }
17250 if (passive) {
17251 if (strcmp(straddr, "::") != 0) {
17252 goto bad;
17253 }
17254 } else {
17255 if (strcmp(straddr, "::1") != 0) {
17256 goto bad;
17257 }
17258 }
17259 inet6++;
17260 break;
17261 case AF_UNSPEC:
17262 goto bad;
17263 break;
17264 default:
17265 /* another family support? */
17266 break;
17267 }
17268 }
17269 }
17270
17271 if (!(inet4 == 0 || inet4 == 2))
17272 goto bad;
17273 if (!(inet6 == 0 || inet6 == 2))
17274 goto bad;
17275
17276 if (aitop)
17277 freeaddrinfo(aitop);
17278 exit(0);
17279
17280 bad:
17281 if (aitop)
17282 freeaddrinfo(aitop);
17283 exit(1);
17284}
17285
Martin v. Löwis11437992002-04-12 09:54:03 +000017286_ACEOF
17287rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000017288if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17289 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017290 ac_status=$?
17291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17292 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +000017293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17294 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017295 ac_status=$?
17296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17297 (exit $ac_status); }; }; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000017298 echo "$as_me:$LINENO: result: good" >&5
17299echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017300buggygetaddrinfo=no
17301else
Martin v. Löwis11437992002-04-12 09:54:03 +000017302 echo "$as_me: program exited with status $ac_status" >&5
17303echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017304sed 's/^/| /' conftest.$ac_ext >&5
17305
Martin v. Löwis11437992002-04-12 09:54:03 +000017306( exit $ac_status )
Skip Montanaro89e975f2007-08-22 19:05:21 +000017307echo "$as_me:$LINENO: result: buggy" >&5
17308echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017309buggygetaddrinfo=yes
17310fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017311rm -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 +000017312fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017313else
Martin v. Löwis11437992002-04-12 09:54:03 +000017314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017315sed 's/^/| /' conftest.$ac_ext >&5
17316
Martin v. Löwis11437992002-04-12 09:54:03 +000017317
Skip Montanaro89e975f2007-08-22 19:05:21 +000017318echo "$as_me:$LINENO: result: no" >&5
17319echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017320buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017321
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017322fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017323rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017324 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017325
17326if test "$buggygetaddrinfo" = "yes"; then
17327 if test "$ipv6" = "yes"; then
17328 echo 'Fatal: You must get working getaddrinfo() function.'
17329 echo ' or you can specify "--disable-ipv6"'.
17330 exit 1
17331 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017332else
Martin v. Löwis11437992002-04-12 09:54:03 +000017333
17334cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017335#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017336_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000017337
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017338fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017339
Jack Jansen9a66b6d2001-08-08 13:56:14 +000017340for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017341do
Martin v. Löwis11437992002-04-12 09:54:03 +000017342as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaro89e975f2007-08-22 19:05:21 +000017343echo "$as_me:$LINENO: checking for $ac_func" >&5
17344echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17345if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017346 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017347else
Martin v. Löwis11437992002-04-12 09:54:03 +000017348 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017349/* confdefs.h. */
17350_ACEOF
17351cat confdefs.h >>conftest.$ac_ext
17352cat >>conftest.$ac_ext <<_ACEOF
17353/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017354/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17355 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17356#define $ac_func innocuous_$ac_func
17357
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017358/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017359 which can conflict with char $ac_func (); below.
17360 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017361 <limits.h> exists even on freestanding compilers. */
17362
17363#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017364# include <limits.h>
17365#else
17366# include <assert.h>
17367#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017368
17369#undef $ac_func
17370
Skip Montanaro89e975f2007-08-22 19:05:21 +000017371/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017372#ifdef __cplusplus
17373extern "C"
Skip Montanaro89e975f2007-08-22 19:05:21 +000017374{
Martin v. Löwis11437992002-04-12 09:54:03 +000017375#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000017376/* We use char because int might match the return type of a gcc2
17377 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017378char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017379/* The GNU C library defines this for functions which it implements
17380 to always fail with ENOSYS. Some functions are actually named
17381 something starting with __ and the normal name is an alias. */
Skip Montanaro89e975f2007-08-22 19:05:21 +000017382#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017383choke me
Skip Montanaro89e975f2007-08-22 19:05:21 +000017384#else
17385char (*f) () = $ac_func;
17386#endif
17387#ifdef __cplusplus
17388}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017389#endif
17390
Skip Montanaro6dead952003-09-25 14:50:04 +000017391int
17392main ()
17393{
Skip Montanaro89e975f2007-08-22 19:05:21 +000017394return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000017395 ;
17396 return 0;
17397}
17398_ACEOF
17399rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000017400if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17401 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017402 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017403 grep -v '^ *+' conftest.er1 >conftest.err
17404 rm -f conftest.er1
17405 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000017407 (exit $ac_status); } &&
17408 { ac_try='test -z "$ac_c_werror_flag"
17409 || test ! -s conftest.err'
17410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17411 (eval $ac_try) 2>&5
17412 ac_status=$?
17413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17414 (exit $ac_status); }; } &&
17415 { ac_try='test -s conftest$ac_exeext'
17416 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17417 (eval $ac_try) 2>&5
17418 ac_status=$?
17419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17420 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017421 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017422else
Martin v. Löwis11437992002-04-12 09:54:03 +000017423 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017424sed 's/^/| /' conftest.$ac_ext >&5
17425
Skip Montanaro89e975f2007-08-22 19:05:21 +000017426eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017427fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017428rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017429 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017430fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017431echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17432echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000017433if test `eval echo '${'$as_ac_var'}'` = yes; then
17434 cat >>confdefs.h <<_ACEOF
17435#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17436_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017437
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017438fi
17439done
17440
Michael W. Hudson54241132001-12-07 15:38:26 +000017441
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017442# checks for structures
Skip Montanaro89e975f2007-08-22 19:05:21 +000017443echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
17444echo $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 +000017445if test "${ac_cv_header_time+set}" = set; then
17446 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017447else
Martin v. Löwis11437992002-04-12 09:54:03 +000017448 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017449/* confdefs.h. */
17450_ACEOF
17451cat confdefs.h >>conftest.$ac_ext
17452cat >>conftest.$ac_ext <<_ACEOF
17453/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017454#include <sys/types.h>
17455#include <sys/time.h>
17456#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017457
Martin v. Löwis11437992002-04-12 09:54:03 +000017458int
17459main ()
17460{
17461if ((struct tm *) 0)
17462return 0;
17463 ;
17464 return 0;
17465}
17466_ACEOF
17467rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000017468if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17469 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017470 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017471 grep -v '^ *+' conftest.er1 >conftest.err
17472 rm -f conftest.er1
17473 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000017475 (exit $ac_status); } &&
17476 { ac_try='test -z "$ac_c_werror_flag"
17477 || test ! -s conftest.err'
17478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17479 (eval $ac_try) 2>&5
17480 ac_status=$?
17481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17482 (exit $ac_status); }; } &&
17483 { ac_try='test -s conftest.$ac_objext'
17484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17485 (eval $ac_try) 2>&5
17486 ac_status=$?
17487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17488 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017489 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017490else
Martin v. Löwis11437992002-04-12 09:54:03 +000017491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017492sed 's/^/| /' conftest.$ac_ext >&5
17493
Skip Montanaro89e975f2007-08-22 19:05:21 +000017494ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017495fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017496rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017497fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017498echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
17499echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017500if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017501
17502cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017503#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017504_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017505
17506fi
17507
Skip Montanaro89e975f2007-08-22 19:05:21 +000017508echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
17509echo $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 +000017510if test "${ac_cv_struct_tm+set}" = set; then
17511 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017512else
Martin v. Löwis11437992002-04-12 09:54:03 +000017513 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017514/* confdefs.h. */
17515_ACEOF
17516cat confdefs.h >>conftest.$ac_ext
17517cat >>conftest.$ac_ext <<_ACEOF
17518/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017519#include <sys/types.h>
17520#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017521
Martin v. Löwis11437992002-04-12 09:54:03 +000017522int
17523main ()
17524{
Skip Montanaro89e975f2007-08-22 19:05:21 +000017525struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000017526 ;
17527 return 0;
17528}
17529_ACEOF
17530rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000017531if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17532 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017533 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017534 grep -v '^ *+' conftest.er1 >conftest.err
17535 rm -f conftest.er1
17536 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000017538 (exit $ac_status); } &&
17539 { ac_try='test -z "$ac_c_werror_flag"
17540 || test ! -s conftest.err'
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); }; } &&
17546 { ac_try='test -s conftest.$ac_objext'
17547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17548 (eval $ac_try) 2>&5
17549 ac_status=$?
17550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17551 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017552 ac_cv_struct_tm=time.h
17553else
Martin v. Löwis11437992002-04-12 09:54:03 +000017554 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017555sed 's/^/| /' conftest.$ac_ext >&5
17556
Skip Montanaro89e975f2007-08-22 19:05:21 +000017557ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017558fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017559rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017560fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017561echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
17562echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017563if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017564
17565cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017566#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017567_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017568
17569fi
17570
Skip Montanaro89e975f2007-08-22 19:05:21 +000017571echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
17572echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000017573if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
17574 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017575else
Martin v. Löwis11437992002-04-12 09:54:03 +000017576 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017577/* confdefs.h. */
17578_ACEOF
17579cat confdefs.h >>conftest.$ac_ext
17580cat >>conftest.$ac_ext <<_ACEOF
17581/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017582#include <sys/types.h>
17583#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000017584
17585
Martin v. Löwis11437992002-04-12 09:54:03 +000017586int
17587main ()
17588{
17589static struct tm ac_aggr;
17590if (ac_aggr.tm_zone)
17591return 0;
17592 ;
17593 return 0;
17594}
17595_ACEOF
17596rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000017597if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17598 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017599 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017600 grep -v '^ *+' conftest.er1 >conftest.err
17601 rm -f conftest.er1
17602 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000017604 (exit $ac_status); } &&
17605 { ac_try='test -z "$ac_c_werror_flag"
17606 || test ! -s conftest.err'
17607 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17608 (eval $ac_try) 2>&5
17609 ac_status=$?
17610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17611 (exit $ac_status); }; } &&
17612 { ac_try='test -s conftest.$ac_objext'
17613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17614 (eval $ac_try) 2>&5
17615 ac_status=$?
17616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17617 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017618 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000017619else
Martin v. Löwis11437992002-04-12 09:54:03 +000017620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017621sed 's/^/| /' conftest.$ac_ext >&5
17622
Skip Montanaro89e975f2007-08-22 19:05:21 +000017623cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017624/* confdefs.h. */
17625_ACEOF
17626cat confdefs.h >>conftest.$ac_ext
17627cat >>conftest.$ac_ext <<_ACEOF
17628/* end confdefs.h. */
17629#include <sys/types.h>
17630#include <$ac_cv_struct_tm>
17631
17632
17633int
17634main ()
17635{
17636static struct tm ac_aggr;
17637if (sizeof ac_aggr.tm_zone)
17638return 0;
17639 ;
17640 return 0;
17641}
17642_ACEOF
17643rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000017644if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17645 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000017646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017647 grep -v '^ *+' conftest.er1 >conftest.err
17648 rm -f conftest.er1
17649 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000017651 (exit $ac_status); } &&
17652 { ac_try='test -z "$ac_c_werror_flag"
17653 || test ! -s conftest.err'
17654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17655 (eval $ac_try) 2>&5
17656 ac_status=$?
17657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17658 (exit $ac_status); }; } &&
17659 { ac_try='test -s conftest.$ac_objext'
17660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17661 (eval $ac_try) 2>&5
17662 ac_status=$?
17663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17664 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017665 ac_cv_member_struct_tm_tm_zone=yes
17666else
17667 echo "$as_me: failed program was:" >&5
17668sed 's/^/| /' conftest.$ac_ext >&5
17669
Skip Montanaro89e975f2007-08-22 19:05:21 +000017670ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000017671fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017672rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017673fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017674rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017675fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017676echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
17677echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000017678if test $ac_cv_member_struct_tm_tm_zone = yes; then
17679
17680cat >>confdefs.h <<_ACEOF
17681#define HAVE_STRUCT_TM_TM_ZONE 1
17682_ACEOF
17683
17684
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017685fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017686
Martin v. Löwis11437992002-04-12 09:54:03 +000017687if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
17688
17689cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017690#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017691_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017692
17693else
Skip Montanaro89e975f2007-08-22 19:05:21 +000017694 echo "$as_me:$LINENO: checking for tzname" >&5
17695echo $ECHO_N "checking for tzname... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000017696if test "${ac_cv_var_tzname+set}" = set; then
17697 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017698else
Martin v. Löwis11437992002-04-12 09:54:03 +000017699 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017700/* confdefs.h. */
17701_ACEOF
17702cat confdefs.h >>conftest.$ac_ext
17703cat >>conftest.$ac_ext <<_ACEOF
17704/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017705#include <time.h>
Skip Montanaro89e975f2007-08-22 19:05:21 +000017706#ifndef tzname /* For SGI. */
17707extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000017708#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017709
Martin v. Löwis11437992002-04-12 09:54:03 +000017710int
17711main ()
17712{
Skip Montanaro89e975f2007-08-22 19:05:21 +000017713atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000017714 ;
17715 return 0;
17716}
17717_ACEOF
17718rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000017719if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17720 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017721 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017722 grep -v '^ *+' conftest.er1 >conftest.err
17723 rm -f conftest.er1
17724 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000017726 (exit $ac_status); } &&
17727 { ac_try='test -z "$ac_c_werror_flag"
17728 || test ! -s conftest.err'
17729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17730 (eval $ac_try) 2>&5
17731 ac_status=$?
17732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17733 (exit $ac_status); }; } &&
17734 { ac_try='test -s conftest$ac_exeext'
17735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17736 (eval $ac_try) 2>&5
17737 ac_status=$?
17738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17739 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017740 ac_cv_var_tzname=yes
17741else
Martin v. Löwis11437992002-04-12 09:54:03 +000017742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017743sed 's/^/| /' conftest.$ac_ext >&5
17744
Skip Montanaro89e975f2007-08-22 19:05:21 +000017745ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017746fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017747rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017748 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000017749fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017750echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
17751echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017752 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017753
17754cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017755#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017756_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017757
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017758 fi
17759fi
17760
Skip Montanaro89e975f2007-08-22 19:05:21 +000017761echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
17762echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000017763if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
17764 echo $ECHO_N "(cached) $ECHO_C" >&6
17765else
17766 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017767/* confdefs.h. */
17768_ACEOF
17769cat confdefs.h >>conftest.$ac_ext
17770cat >>conftest.$ac_ext <<_ACEOF
17771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017772$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017773int
17774main ()
17775{
17776static struct stat ac_aggr;
17777if (ac_aggr.st_rdev)
17778return 0;
17779 ;
17780 return 0;
17781}
17782_ACEOF
17783rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000017784if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17785 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017786 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017787 grep -v '^ *+' conftest.er1 >conftest.err
17788 rm -f conftest.er1
17789 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000017791 (exit $ac_status); } &&
17792 { ac_try='test -z "$ac_c_werror_flag"
17793 || test ! -s conftest.err'
17794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17795 (eval $ac_try) 2>&5
17796 ac_status=$?
17797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17798 (exit $ac_status); }; } &&
17799 { ac_try='test -s conftest.$ac_objext'
17800 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17801 (eval $ac_try) 2>&5
17802 ac_status=$?
17803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17804 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017805 ac_cv_member_struct_stat_st_rdev=yes
17806else
17807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017808sed 's/^/| /' conftest.$ac_ext >&5
17809
Skip Montanaro89e975f2007-08-22 19:05:21 +000017810cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017811/* confdefs.h. */
17812_ACEOF
17813cat confdefs.h >>conftest.$ac_ext
17814cat >>conftest.$ac_ext <<_ACEOF
17815/* end confdefs.h. */
17816$ac_includes_default
17817int
17818main ()
17819{
17820static struct stat ac_aggr;
17821if (sizeof ac_aggr.st_rdev)
17822return 0;
17823 ;
17824 return 0;
17825}
17826_ACEOF
17827rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000017828if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17829 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000017830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017831 grep -v '^ *+' conftest.er1 >conftest.err
17832 rm -f conftest.er1
17833 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000017835 (exit $ac_status); } &&
17836 { ac_try='test -z "$ac_c_werror_flag"
17837 || test ! -s conftest.err'
17838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17839 (eval $ac_try) 2>&5
17840 ac_status=$?
17841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17842 (exit $ac_status); }; } &&
17843 { ac_try='test -s conftest.$ac_objext'
17844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17845 (eval $ac_try) 2>&5
17846 ac_status=$?
17847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17848 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017849 ac_cv_member_struct_stat_st_rdev=yes
17850else
17851 echo "$as_me: failed program was:" >&5
17852sed 's/^/| /' conftest.$ac_ext >&5
17853
Skip Montanaro89e975f2007-08-22 19:05:21 +000017854ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017855fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017856rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017857fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017858rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017859fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017860echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
17861echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000017862if test $ac_cv_member_struct_stat_st_rdev = yes; then
17863
17864cat >>confdefs.h <<_ACEOF
17865#define HAVE_STRUCT_STAT_ST_RDEV 1
17866_ACEOF
17867
17868
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017869fi
17870
Skip Montanaro89e975f2007-08-22 19:05:21 +000017871echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
17872echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000017873if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
17874 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017875else
Martin v. Löwis11437992002-04-12 09:54:03 +000017876 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017877/* confdefs.h. */
17878_ACEOF
17879cat confdefs.h >>conftest.$ac_ext
17880cat >>conftest.$ac_ext <<_ACEOF
17881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017882$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000017883int
17884main ()
17885{
17886static struct stat ac_aggr;
17887if (ac_aggr.st_blksize)
17888return 0;
17889 ;
17890 return 0;
17891}
17892_ACEOF
17893rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000017894if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17895 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017897 grep -v '^ *+' conftest.er1 >conftest.err
17898 rm -f conftest.er1
17899 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017900 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000017901 (exit $ac_status); } &&
17902 { ac_try='test -z "$ac_c_werror_flag"
17903 || test ! -s conftest.err'
17904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17905 (eval $ac_try) 2>&5
17906 ac_status=$?
17907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17908 (exit $ac_status); }; } &&
17909 { ac_try='test -s conftest.$ac_objext'
17910 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17911 (eval $ac_try) 2>&5
17912 ac_status=$?
17913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17914 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017915 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000017916else
Martin v. Löwis11437992002-04-12 09:54:03 +000017917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017918sed 's/^/| /' conftest.$ac_ext >&5
17919
Skip Montanaro89e975f2007-08-22 19:05:21 +000017920cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017921/* confdefs.h. */
17922_ACEOF
17923cat confdefs.h >>conftest.$ac_ext
17924cat >>conftest.$ac_ext <<_ACEOF
17925/* end confdefs.h. */
17926$ac_includes_default
17927int
17928main ()
17929{
17930static struct stat ac_aggr;
17931if (sizeof ac_aggr.st_blksize)
17932return 0;
17933 ;
17934 return 0;
17935}
17936_ACEOF
17937rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000017938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
17939 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000017940 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017941 grep -v '^ *+' conftest.er1 >conftest.err
17942 rm -f conftest.er1
17943 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000017945 (exit $ac_status); } &&
17946 { ac_try='test -z "$ac_c_werror_flag"
17947 || test ! -s conftest.err'
17948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17949 (eval $ac_try) 2>&5
17950 ac_status=$?
17951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17952 (exit $ac_status); }; } &&
17953 { ac_try='test -s conftest.$ac_objext'
17954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17955 (eval $ac_try) 2>&5
17956 ac_status=$?
17957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17958 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017959 ac_cv_member_struct_stat_st_blksize=yes
17960else
17961 echo "$as_me: failed program was:" >&5
17962sed 's/^/| /' conftest.$ac_ext >&5
17963
Skip Montanaro89e975f2007-08-22 19:05:21 +000017964ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000017965fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017966rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017967fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017968rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000017969fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000017970echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
17971echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000017972if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000017973
Martin v. Löwis11437992002-04-12 09:54:03 +000017974cat >>confdefs.h <<_ACEOF
17975#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
17976_ACEOF
17977
17978
Guido van Rossum98bf58f2001-10-18 20:34:25 +000017979fi
17980
Skip Montanaro89e975f2007-08-22 19:05:21 +000017981echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
17982echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000017983if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
17984 echo $ECHO_N "(cached) $ECHO_C" >&6
17985else
17986 cat >conftest.$ac_ext <<_ACEOF
17987/* confdefs.h. */
17988_ACEOF
17989cat confdefs.h >>conftest.$ac_ext
17990cat >>conftest.$ac_ext <<_ACEOF
17991/* end confdefs.h. */
17992$ac_includes_default
17993int
17994main ()
17995{
17996static struct stat ac_aggr;
17997if (ac_aggr.st_flags)
17998return 0;
17999 ;
18000 return 0;
18001}
18002_ACEOF
18003rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000018004if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18005 (eval $ac_compile) 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018006 ac_status=$?
18007 grep -v '^ *+' conftest.er1 >conftest.err
18008 rm -f conftest.er1
18009 cat conftest.err >&5
18010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000018011 (exit $ac_status); } &&
18012 { ac_try='test -z "$ac_c_werror_flag"
18013 || test ! -s conftest.err'
18014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18015 (eval $ac_try) 2>&5
18016 ac_status=$?
18017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18018 (exit $ac_status); }; } &&
18019 { ac_try='test -s conftest.$ac_objext'
18020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18021 (eval $ac_try) 2>&5
18022 ac_status=$?
18023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18024 (exit $ac_status); }; }; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018025 ac_cv_member_struct_stat_st_flags=yes
18026else
18027 echo "$as_me: failed program was:" >&5
18028sed 's/^/| /' conftest.$ac_ext >&5
18029
Skip Montanaro89e975f2007-08-22 19:05:21 +000018030cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018031/* confdefs.h. */
18032_ACEOF
18033cat confdefs.h >>conftest.$ac_ext
18034cat >>conftest.$ac_ext <<_ACEOF
18035/* end confdefs.h. */
18036$ac_includes_default
18037int
18038main ()
18039{
18040static struct stat ac_aggr;
18041if (sizeof ac_aggr.st_flags)
18042return 0;
18043 ;
18044 return 0;
18045}
18046_ACEOF
18047rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000018048if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18049 (eval $ac_compile) 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018050 ac_status=$?
18051 grep -v '^ *+' conftest.er1 >conftest.err
18052 rm -f conftest.er1
18053 cat conftest.err >&5
18054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000018055 (exit $ac_status); } &&
18056 { ac_try='test -z "$ac_c_werror_flag"
18057 || test ! -s conftest.err'
18058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18059 (eval $ac_try) 2>&5
18060 ac_status=$?
18061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18062 (exit $ac_status); }; } &&
18063 { ac_try='test -s conftest.$ac_objext'
18064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18065 (eval $ac_try) 2>&5
18066 ac_status=$?
18067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18068 (exit $ac_status); }; }; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018069 ac_cv_member_struct_stat_st_flags=yes
18070else
18071 echo "$as_me: failed program was:" >&5
18072sed 's/^/| /' conftest.$ac_ext >&5
18073
Skip Montanaro89e975f2007-08-22 19:05:21 +000018074ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018075fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000018076rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018077fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000018078rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018079fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000018080echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
18081echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000018082if test $ac_cv_member_struct_stat_st_flags = yes; then
18083
18084cat >>confdefs.h <<_ACEOF
18085#define HAVE_STRUCT_STAT_ST_FLAGS 1
18086_ACEOF
18087
18088
18089fi
18090
Skip Montanaro89e975f2007-08-22 19:05:21 +000018091echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
18092echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018093if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
18094 echo $ECHO_N "(cached) $ECHO_C" >&6
18095else
18096 cat >conftest.$ac_ext <<_ACEOF
18097/* confdefs.h. */
18098_ACEOF
18099cat confdefs.h >>conftest.$ac_ext
18100cat >>conftest.$ac_ext <<_ACEOF
18101/* end confdefs.h. */
18102$ac_includes_default
18103int
18104main ()
18105{
18106static struct stat ac_aggr;
18107if (ac_aggr.st_gen)
18108return 0;
18109 ;
18110 return 0;
18111}
18112_ACEOF
18113rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000018114if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18115 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018116 ac_status=$?
18117 grep -v '^ *+' conftest.er1 >conftest.err
18118 rm -f conftest.er1
18119 cat conftest.err >&5
18120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000018121 (exit $ac_status); } &&
18122 { ac_try='test -z "$ac_c_werror_flag"
18123 || test ! -s conftest.err'
18124 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18125 (eval $ac_try) 2>&5
18126 ac_status=$?
18127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18128 (exit $ac_status); }; } &&
18129 { ac_try='test -s conftest.$ac_objext'
18130 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18131 (eval $ac_try) 2>&5
18132 ac_status=$?
18133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18134 (exit $ac_status); }; }; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018135 ac_cv_member_struct_stat_st_gen=yes
18136else
18137 echo "$as_me: failed program was:" >&5
18138sed 's/^/| /' conftest.$ac_ext >&5
18139
Skip Montanaro89e975f2007-08-22 19:05:21 +000018140cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018141/* confdefs.h. */
18142_ACEOF
18143cat confdefs.h >>conftest.$ac_ext
18144cat >>conftest.$ac_ext <<_ACEOF
18145/* end confdefs.h. */
18146$ac_includes_default
18147int
18148main ()
18149{
18150static struct stat ac_aggr;
18151if (sizeof ac_aggr.st_gen)
18152return 0;
18153 ;
18154 return 0;
18155}
18156_ACEOF
18157rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000018158if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18159 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018160 ac_status=$?
18161 grep -v '^ *+' conftest.er1 >conftest.err
18162 rm -f conftest.er1
18163 cat conftest.err >&5
18164 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000018165 (exit $ac_status); } &&
18166 { ac_try='test -z "$ac_c_werror_flag"
18167 || test ! -s conftest.err'
18168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18169 (eval $ac_try) 2>&5
18170 ac_status=$?
18171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18172 (exit $ac_status); }; } &&
18173 { ac_try='test -s conftest.$ac_objext'
18174 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18175 (eval $ac_try) 2>&5
18176 ac_status=$?
18177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18178 (exit $ac_status); }; }; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018179 ac_cv_member_struct_stat_st_gen=yes
18180else
18181 echo "$as_me: failed program was:" >&5
18182sed 's/^/| /' conftest.$ac_ext >&5
18183
Skip Montanaro89e975f2007-08-22 19:05:21 +000018184ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018185fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000018186rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018187fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000018188rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018189fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000018190echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
18191echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018192if test $ac_cv_member_struct_stat_st_gen = yes; then
18193
18194cat >>confdefs.h <<_ACEOF
18195#define HAVE_STRUCT_STAT_ST_GEN 1
18196_ACEOF
18197
18198
18199fi
18200
Skip Montanaro89e975f2007-08-22 19:05:21 +000018201echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
18202echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018203if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
18204 echo $ECHO_N "(cached) $ECHO_C" >&6
18205else
18206 cat >conftest.$ac_ext <<_ACEOF
18207/* confdefs.h. */
18208_ACEOF
18209cat confdefs.h >>conftest.$ac_ext
18210cat >>conftest.$ac_ext <<_ACEOF
18211/* end confdefs.h. */
18212$ac_includes_default
18213int
18214main ()
18215{
18216static struct stat ac_aggr;
18217if (ac_aggr.st_birthtime)
18218return 0;
18219 ;
18220 return 0;
18221}
18222_ACEOF
18223rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000018224if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18225 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018226 ac_status=$?
18227 grep -v '^ *+' conftest.er1 >conftest.err
18228 rm -f conftest.er1
18229 cat conftest.err >&5
18230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000018231 (exit $ac_status); } &&
18232 { ac_try='test -z "$ac_c_werror_flag"
18233 || test ! -s conftest.err'
18234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18235 (eval $ac_try) 2>&5
18236 ac_status=$?
18237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18238 (exit $ac_status); }; } &&
18239 { ac_try='test -s conftest.$ac_objext'
18240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18241 (eval $ac_try) 2>&5
18242 ac_status=$?
18243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18244 (exit $ac_status); }; }; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018245 ac_cv_member_struct_stat_st_birthtime=yes
18246else
18247 echo "$as_me: failed program was:" >&5
18248sed 's/^/| /' conftest.$ac_ext >&5
18249
Skip Montanaro89e975f2007-08-22 19:05:21 +000018250cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018251/* confdefs.h. */
18252_ACEOF
18253cat confdefs.h >>conftest.$ac_ext
18254cat >>conftest.$ac_ext <<_ACEOF
18255/* end confdefs.h. */
18256$ac_includes_default
18257int
18258main ()
18259{
18260static struct stat ac_aggr;
18261if (sizeof ac_aggr.st_birthtime)
18262return 0;
18263 ;
18264 return 0;
18265}
18266_ACEOF
18267rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000018268if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18269 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018270 ac_status=$?
18271 grep -v '^ *+' conftest.er1 >conftest.err
18272 rm -f conftest.er1
18273 cat conftest.err >&5
18274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000018275 (exit $ac_status); } &&
18276 { ac_try='test -z "$ac_c_werror_flag"
18277 || test ! -s conftest.err'
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); }; } &&
18283 { ac_try='test -s conftest.$ac_objext'
18284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18285 (eval $ac_try) 2>&5
18286 ac_status=$?
18287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18288 (exit $ac_status); }; }; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018289 ac_cv_member_struct_stat_st_birthtime=yes
18290else
18291 echo "$as_me: failed program was:" >&5
18292sed 's/^/| /' conftest.$ac_ext >&5
18293
Skip Montanaro89e975f2007-08-22 19:05:21 +000018294ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018295fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000018296rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018297fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000018298rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018299fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000018300echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
18301echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000018302if test $ac_cv_member_struct_stat_st_birthtime = yes; then
18303
18304cat >>confdefs.h <<_ACEOF
18305#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
18306_ACEOF
18307
18308
18309fi
18310
Skip Montanaro89e975f2007-08-22 19:05:21 +000018311echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
18312echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018313if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
18314 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018315else
Martin v. Löwis11437992002-04-12 09:54:03 +000018316 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018317/* confdefs.h. */
18318_ACEOF
18319cat confdefs.h >>conftest.$ac_ext
18320cat >>conftest.$ac_ext <<_ACEOF
18321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018322$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018323int
18324main ()
18325{
18326static struct stat ac_aggr;
18327if (ac_aggr.st_blocks)
18328return 0;
18329 ;
18330 return 0;
18331}
18332_ACEOF
18333rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000018334if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18335 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018336 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018337 grep -v '^ *+' conftest.er1 >conftest.err
18338 rm -f conftest.er1
18339 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000018341 (exit $ac_status); } &&
18342 { ac_try='test -z "$ac_c_werror_flag"
18343 || test ! -s conftest.err'
18344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18345 (eval $ac_try) 2>&5
18346 ac_status=$?
18347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18348 (exit $ac_status); }; } &&
18349 { ac_try='test -s conftest.$ac_objext'
18350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18351 (eval $ac_try) 2>&5
18352 ac_status=$?
18353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18354 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018355 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000018356else
Martin v. Löwis11437992002-04-12 09:54:03 +000018357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018358sed 's/^/| /' conftest.$ac_ext >&5
18359
Skip Montanaro89e975f2007-08-22 19:05:21 +000018360cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018361/* confdefs.h. */
18362_ACEOF
18363cat confdefs.h >>conftest.$ac_ext
18364cat >>conftest.$ac_ext <<_ACEOF
18365/* end confdefs.h. */
18366$ac_includes_default
18367int
18368main ()
18369{
18370static struct stat ac_aggr;
18371if (sizeof ac_aggr.st_blocks)
18372return 0;
18373 ;
18374 return 0;
18375}
18376_ACEOF
18377rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000018378if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18379 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000018380 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018381 grep -v '^ *+' conftest.er1 >conftest.err
18382 rm -f conftest.er1
18383 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000018385 (exit $ac_status); } &&
18386 { ac_try='test -z "$ac_c_werror_flag"
18387 || test ! -s conftest.err'
18388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18389 (eval $ac_try) 2>&5
18390 ac_status=$?
18391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18392 (exit $ac_status); }; } &&
18393 { ac_try='test -s conftest.$ac_objext'
18394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18395 (eval $ac_try) 2>&5
18396 ac_status=$?
18397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18398 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018399 ac_cv_member_struct_stat_st_blocks=yes
18400else
18401 echo "$as_me: failed program was:" >&5
18402sed 's/^/| /' conftest.$ac_ext >&5
18403
Skip Montanaro89e975f2007-08-22 19:05:21 +000018404ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000018405fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000018406rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018407fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000018408rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000018409fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000018410echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
18411echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018412if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000018413
Martin v. Löwis11437992002-04-12 09:54:03 +000018414cat >>confdefs.h <<_ACEOF
18415#define HAVE_STRUCT_STAT_ST_BLOCKS 1
18416_ACEOF
18417
18418
18419cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018420#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018421_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018422
18423else
Skip Montanaro89e975f2007-08-22 19:05:21 +000018424 case $LIBOBJS in
18425 "fileblocks.$ac_objext" | \
18426 *" fileblocks.$ac_objext" | \
18427 "fileblocks.$ac_objext "* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018428 *" fileblocks.$ac_objext "* ) ;;
Skip Montanaro89e975f2007-08-22 19:05:21 +000018429 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018430esac
18431
Guido van Rossum98bf58f2001-10-18 20:34:25 +000018432fi
18433
Michael W. Hudson54241132001-12-07 15:38:26 +000018434
Martin v. Löwis11437992002-04-12 09:54:03 +000018435
Skip Montanaro89e975f2007-08-22 19:05:21 +000018436echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
18437echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018438if test "${ac_cv_header_time_altzone+set}" = set; then
18439 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018440else
Martin v. Löwis11437992002-04-12 09:54:03 +000018441 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018442/* confdefs.h. */
18443_ACEOF
18444cat confdefs.h >>conftest.$ac_ext
18445cat >>conftest.$ac_ext <<_ACEOF
18446/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018447#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018448int
18449main ()
18450{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018451return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000018452 ;
18453 return 0;
18454}
18455_ACEOF
18456rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000018457if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18458 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018459 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018460 grep -v '^ *+' conftest.er1 >conftest.err
18461 rm -f conftest.er1
18462 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000018464 (exit $ac_status); } &&
18465 { ac_try='test -z "$ac_c_werror_flag"
18466 || test ! -s conftest.err'
18467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18468 (eval $ac_try) 2>&5
18469 ac_status=$?
18470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18471 (exit $ac_status); }; } &&
18472 { ac_try='test -s conftest.$ac_objext'
18473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18474 (eval $ac_try) 2>&5
18475 ac_status=$?
18476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18477 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018478 ac_cv_header_time_altzone=yes
18479else
Martin v. Löwis11437992002-04-12 09:54:03 +000018480 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018481sed 's/^/| /' conftest.$ac_ext >&5
18482
Skip Montanaro89e975f2007-08-22 19:05:21 +000018483ac_cv_header_time_altzone=no
18484fi
18485rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018486fi
18487
Skip Montanaro89e975f2007-08-22 19:05:21 +000018488echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
18489echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018490if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018491
18492cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018493#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018494_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018495
18496fi
18497
Guido van Rossumda88dad1995-01-26 00:46:29 +000018498was_it_defined=no
Skip Montanaro89e975f2007-08-22 19:05:21 +000018499echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
18500echo $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 +000018501cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018502/* confdefs.h. */
18503_ACEOF
18504cat confdefs.h >>conftest.$ac_ext
18505cat >>conftest.$ac_ext <<_ACEOF
18506/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018507
18508#include <sys/types.h>
18509#include <sys/select.h>
18510#include <sys/time.h>
18511
Martin v. Löwis11437992002-04-12 09:54:03 +000018512int
18513main ()
18514{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018515;
Martin v. Löwis11437992002-04-12 09:54:03 +000018516 ;
18517 return 0;
18518}
18519_ACEOF
18520rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000018521if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18522 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018523 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018524 grep -v '^ *+' conftest.er1 >conftest.err
18525 rm -f conftest.er1
18526 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000018528 (exit $ac_status); } &&
18529 { ac_try='test -z "$ac_c_werror_flag"
18530 || test ! -s conftest.err'
18531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18532 (eval $ac_try) 2>&5
18533 ac_status=$?
18534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18535 (exit $ac_status); }; } &&
18536 { ac_try='test -s conftest.$ac_objext'
18537 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18538 (eval $ac_try) 2>&5
18539 ac_status=$?
18540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18541 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018542
18543
18544cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018545#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018546_ACEOF
18547
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018548 was_it_defined=yes
18549
Guido van Rossumf78abae1997-01-21 22:02:36 +000018550else
Martin v. Löwis11437992002-04-12 09:54:03 +000018551 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018552sed 's/^/| /' conftest.$ac_ext >&5
18553
Brett Cannon19fab762007-06-02 03:02:29 +000018554fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000018555rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18556echo "$as_me:$LINENO: result: $was_it_defined" >&5
18557echo "${ECHO_T}$was_it_defined" >&6
Brett Cannon19fab762007-06-02 03:02:29 +000018558
Skip Montanaro89e975f2007-08-22 19:05:21 +000018559echo "$as_me:$LINENO: checking for addrinfo" >&5
18560echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018561if test "${ac_cv_struct_addrinfo+set}" = set; then
18562 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018563else
Martin v. Löwis11437992002-04-12 09:54:03 +000018564 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018565/* confdefs.h. */
18566_ACEOF
18567cat confdefs.h >>conftest.$ac_ext
18568cat >>conftest.$ac_ext <<_ACEOF
18569/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018570
18571# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018572int
18573main ()
18574{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018575struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000018576 ;
18577 return 0;
18578}
18579_ACEOF
18580rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000018581if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18582 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018583 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018584 grep -v '^ *+' conftest.er1 >conftest.err
18585 rm -f conftest.er1
18586 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000018588 (exit $ac_status); } &&
18589 { ac_try='test -z "$ac_c_werror_flag"
18590 || test ! -s conftest.err'
18591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18592 (eval $ac_try) 2>&5
18593 ac_status=$?
18594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18595 (exit $ac_status); }; } &&
18596 { ac_try='test -s conftest.$ac_objext'
18597 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18598 (eval $ac_try) 2>&5
18599 ac_status=$?
18600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18601 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018602 ac_cv_struct_addrinfo=yes
18603else
Martin v. Löwis11437992002-04-12 09:54:03 +000018604 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018605sed 's/^/| /' conftest.$ac_ext >&5
18606
Skip Montanaro89e975f2007-08-22 19:05:21 +000018607ac_cv_struct_addrinfo=no
18608fi
18609rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018610fi
18611
Skip Montanaro89e975f2007-08-22 19:05:21 +000018612echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
18613echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018614if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018615
18616cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018617#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018618_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018619
18620fi
18621
Skip Montanaro89e975f2007-08-22 19:05:21 +000018622echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
18623echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018624if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
18625 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018626else
Martin v. Löwis11437992002-04-12 09:54:03 +000018627 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018628/* confdefs.h. */
18629_ACEOF
18630cat confdefs.h >>conftest.$ac_ext
18631cat >>conftest.$ac_ext <<_ACEOF
18632/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018633
18634# include <sys/types.h>
18635# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018636int
18637main ()
18638{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018639struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000018640 ;
18641 return 0;
18642}
18643_ACEOF
18644rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000018645if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18646 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018648 grep -v '^ *+' conftest.er1 >conftest.err
18649 rm -f conftest.er1
18650 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000018652 (exit $ac_status); } &&
18653 { ac_try='test -z "$ac_c_werror_flag"
18654 || test ! -s conftest.err'
18655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18656 (eval $ac_try) 2>&5
18657 ac_status=$?
18658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18659 (exit $ac_status); }; } &&
18660 { ac_try='test -s conftest.$ac_objext'
18661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18662 (eval $ac_try) 2>&5
18663 ac_status=$?
18664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18665 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018666 ac_cv_struct_sockaddr_storage=yes
18667else
Martin v. Löwis11437992002-04-12 09:54:03 +000018668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018669sed 's/^/| /' conftest.$ac_ext >&5
18670
Skip Montanaro89e975f2007-08-22 19:05:21 +000018671ac_cv_struct_sockaddr_storage=no
18672fi
18673rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018674fi
18675
Skip Montanaro89e975f2007-08-22 19:05:21 +000018676echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
18677echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018678if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018679
18680cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018681#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018682_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018683
18684fi
18685
Guido van Rossum627b2d71993-12-24 10:39:16 +000018686# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000018687
Michael W. Hudson54241132001-12-07 15:38:26 +000018688
Skip Montanaro89e975f2007-08-22 19:05:21 +000018689echo "$as_me:$LINENO: checking whether char is unsigned" >&5
18690echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018691if test "${ac_cv_c_char_unsigned+set}" = set; then
18692 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000018693else
Martin v. Löwis11437992002-04-12 09:54:03 +000018694 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018695/* confdefs.h. */
18696_ACEOF
18697cat confdefs.h >>conftest.$ac_ext
18698cat >>conftest.$ac_ext <<_ACEOF
18699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018700$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000018701int
18702main ()
18703{
18704static int test_array [1 - 2 * !(((char) -1) < 0)];
18705test_array [0] = 0
18706
18707 ;
18708 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000018709}
Martin v. Löwis11437992002-04-12 09:54:03 +000018710_ACEOF
18711rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000018712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18713 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018714 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018715 grep -v '^ *+' conftest.er1 >conftest.err
18716 rm -f conftest.er1
18717 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000018719 (exit $ac_status); } &&
18720 { ac_try='test -z "$ac_c_werror_flag"
18721 || test ! -s conftest.err'
18722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18723 (eval $ac_try) 2>&5
18724 ac_status=$?
18725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18726 (exit $ac_status); }; } &&
18727 { ac_try='test -s conftest.$ac_objext'
18728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18729 (eval $ac_try) 2>&5
18730 ac_status=$?
18731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18732 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000018733 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000018734else
18735 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018736sed 's/^/| /' conftest.$ac_ext >&5
18737
Skip Montanaro89e975f2007-08-22 19:05:21 +000018738ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018739fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000018740rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018741fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000018742echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
18743echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018744if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018745 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018746#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018747_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018748
18749fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000018750
Skip Montanaro89e975f2007-08-22 19:05:21 +000018751echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
18752echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018753if test "${ac_cv_c_const+set}" = set; then
18754 echo $ECHO_N "(cached) $ECHO_C" >&6
18755else
18756 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018757/* confdefs.h. */
18758_ACEOF
18759cat confdefs.h >>conftest.$ac_ext
18760cat >>conftest.$ac_ext <<_ACEOF
18761/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018762
Martin v. Löwis11437992002-04-12 09:54:03 +000018763int
18764main ()
18765{
18766/* FIXME: Include the comments suggested by Paul. */
18767#ifndef __cplusplus
18768 /* Ultrix mips cc rejects this. */
18769 typedef int charset[2];
Skip Montanaro89e975f2007-08-22 19:05:21 +000018770 const charset x;
Martin v. Löwis11437992002-04-12 09:54:03 +000018771 /* SunOS 4.1.1 cc rejects this. */
Skip Montanaro89e975f2007-08-22 19:05:21 +000018772 char const *const *ccp;
18773 char **p;
Martin v. Löwis11437992002-04-12 09:54:03 +000018774 /* NEC SVR4.0.2 mips cc rejects this. */
18775 struct point {int x, y;};
18776 static struct point const zero = {0,0};
18777 /* AIX XL C 1.02.0.0 rejects this.
18778 It does not let you subtract one const X* pointer from another in
18779 an arm of an if-expression whose if-part is not a constant
18780 expression */
18781 const char *g = "string";
Skip Montanaro89e975f2007-08-22 19:05:21 +000018782 ccp = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018783 /* HPUX 7.0 cc rejects these. */
Skip Montanaro89e975f2007-08-22 19:05:21 +000018784 ++ccp;
18785 p = (char**) ccp;
18786 ccp = (char const *const *) p;
Martin v. Löwis11437992002-04-12 09:54:03 +000018787 { /* SCO 3.2v4 cc rejects this. */
18788 char *t;
18789 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018790
Martin v. Löwis11437992002-04-12 09:54:03 +000018791 *t++ = 0;
18792 }
18793 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
18794 int x[] = {25, 17};
18795 const int *foo = &x[0];
18796 ++foo;
18797 }
18798 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
18799 typedef const int *iptr;
18800 iptr p = 0;
18801 ++p;
18802 }
18803 { /* AIX XL C 1.02.0.0 rejects this saying
18804 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
18805 struct s { int j; const int *ap[3]; };
18806 struct s *b; b->j = 5;
18807 }
18808 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
18809 const int foo = 10;
18810 }
18811#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000018812
Martin v. Löwis11437992002-04-12 09:54:03 +000018813 ;
18814 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000018815}
Martin v. Löwis11437992002-04-12 09:54:03 +000018816_ACEOF
18817rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000018818if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18819 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018820 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018821 grep -v '^ *+' conftest.er1 >conftest.err
18822 rm -f conftest.er1
18823 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000018825 (exit $ac_status); } &&
18826 { ac_try='test -z "$ac_c_werror_flag"
18827 || test ! -s conftest.err'
18828 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18829 (eval $ac_try) 2>&5
18830 ac_status=$?
18831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18832 (exit $ac_status); }; } &&
18833 { ac_try='test -s conftest.$ac_objext'
18834 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18835 (eval $ac_try) 2>&5
18836 ac_status=$?
18837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18838 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018839 ac_cv_c_const=yes
18840else
Martin v. Löwis11437992002-04-12 09:54:03 +000018841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018842sed 's/^/| /' conftest.$ac_ext >&5
18843
Skip Montanaro89e975f2007-08-22 19:05:21 +000018844ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018845fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000018846rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018847fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000018848echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
18849echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018850if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018851
18852cat >>confdefs.h <<\_ACEOF
18853#define const
18854_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018855
18856fi
18857
Michael W. Hudson54241132001-12-07 15:38:26 +000018858
Guido van Rossumda88dad1995-01-26 00:46:29 +000018859works=no
Skip Montanaro89e975f2007-08-22 19:05:21 +000018860echo "$as_me:$LINENO: checking for working volatile" >&5
18861echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018862cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018863/* confdefs.h. */
18864_ACEOF
18865cat confdefs.h >>conftest.$ac_ext
18866cat >>conftest.$ac_ext <<_ACEOF
18867/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018868
Martin v. Löwis11437992002-04-12 09:54:03 +000018869int
18870main ()
18871{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018872volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000018873 ;
18874 return 0;
18875}
18876_ACEOF
18877rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000018878if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18879 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018881 grep -v '^ *+' conftest.er1 >conftest.err
18882 rm -f conftest.er1
18883 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000018885 (exit $ac_status); } &&
18886 { ac_try='test -z "$ac_c_werror_flag"
18887 || test ! -s conftest.err'
18888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18889 (eval $ac_try) 2>&5
18890 ac_status=$?
18891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18892 (exit $ac_status); }; } &&
18893 { ac_try='test -s conftest.$ac_objext'
18894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18895 (eval $ac_try) 2>&5
18896 ac_status=$?
18897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18898 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000018899 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000018900else
Martin v. Löwis11437992002-04-12 09:54:03 +000018901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018902sed 's/^/| /' conftest.$ac_ext >&5
18903
Martin v. Löwis11437992002-04-12 09:54:03 +000018904
18905cat >>confdefs.h <<\_ACEOF
18906#define volatile
18907_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018908
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018909
Guido van Rossum627b2d71993-12-24 10:39:16 +000018910fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000018911rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18912echo "$as_me:$LINENO: result: $works" >&5
18913echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000018914
Guido van Rossumda88dad1995-01-26 00:46:29 +000018915works=no
Skip Montanaro89e975f2007-08-22 19:05:21 +000018916echo "$as_me:$LINENO: checking for working signed char" >&5
18917echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018918cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018919/* confdefs.h. */
18920_ACEOF
18921cat confdefs.h >>conftest.$ac_ext
18922cat >>conftest.$ac_ext <<_ACEOF
18923/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000018924
Martin v. Löwis11437992002-04-12 09:54:03 +000018925int
18926main ()
18927{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018928signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000018929 ;
18930 return 0;
18931}
18932_ACEOF
18933rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000018934if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18935 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018937 grep -v '^ *+' conftest.er1 >conftest.err
18938 rm -f conftest.er1
18939 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000018941 (exit $ac_status); } &&
18942 { ac_try='test -z "$ac_c_werror_flag"
18943 || test ! -s conftest.err'
18944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18945 (eval $ac_try) 2>&5
18946 ac_status=$?
18947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18948 (exit $ac_status); }; } &&
18949 { ac_try='test -s conftest.$ac_objext'
18950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18951 (eval $ac_try) 2>&5
18952 ac_status=$?
18953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18954 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000018955 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000018956else
Martin v. Löwis11437992002-04-12 09:54:03 +000018957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018958sed 's/^/| /' conftest.$ac_ext >&5
18959
Martin v. Löwis11437992002-04-12 09:54:03 +000018960
18961cat >>confdefs.h <<\_ACEOF
18962#define signed
18963_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000018964
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018965
Guido van Rossum7f43da71994-08-01 12:15:30 +000018966fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000018967rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
18968echo "$as_me:$LINENO: result: $works" >&5
18969echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000018970
Guido van Rossumda88dad1995-01-26 00:46:29 +000018971have_prototypes=no
Skip Montanaro89e975f2007-08-22 19:05:21 +000018972echo "$as_me:$LINENO: checking for prototypes" >&5
18973echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000018974cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018975/* confdefs.h. */
18976_ACEOF
18977cat confdefs.h >>conftest.$ac_ext
18978cat >>conftest.$ac_ext <<_ACEOF
18979/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000018980int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018981int
18982main ()
18983{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018984return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000018985 ;
18986 return 0;
18987}
18988_ACEOF
18989rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000018990if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
18991 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018993 grep -v '^ *+' conftest.er1 >conftest.err
18994 rm -f conftest.er1
18995 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000018997 (exit $ac_status); } &&
18998 { ac_try='test -z "$ac_c_werror_flag"
18999 || test ! -s conftest.err'
19000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19001 (eval $ac_try) 2>&5
19002 ac_status=$?
19003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19004 (exit $ac_status); }; } &&
19005 { ac_try='test -s conftest.$ac_objext'
19006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19007 (eval $ac_try) 2>&5
19008 ac_status=$?
19009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19010 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019011
19012
19013cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019014#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019015_ACEOF
19016
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019017 have_prototypes=yes
19018
Guido van Rossumf78abae1997-01-21 22:02:36 +000019019else
Martin v. Löwis11437992002-04-12 09:54:03 +000019020 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019021sed 's/^/| /' conftest.$ac_ext >&5
19022
Guido van Rossum7f43da71994-08-01 12:15:30 +000019023fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000019024rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19025echo "$as_me:$LINENO: result: $have_prototypes" >&5
19026echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019027
Guido van Rossumda88dad1995-01-26 00:46:29 +000019028works=no
Skip Montanaro89e975f2007-08-22 19:05:21 +000019029echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
19030echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019031cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019032/* confdefs.h. */
19033_ACEOF
19034cat confdefs.h >>conftest.$ac_ext
19035cat >>conftest.$ac_ext <<_ACEOF
19036/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000019037
19038#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000019039int foo(int x, ...) {
19040 va_list va;
19041 va_start(va, x);
19042 va_arg(va, int);
19043 va_arg(va, char *);
19044 va_arg(va, double);
19045 return 0;
19046}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019047
Martin v. Löwis11437992002-04-12 09:54:03 +000019048int
19049main ()
19050{
Guido van Rossum90eea071996-08-30 20:58:57 +000019051return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000019052 ;
19053 return 0;
19054}
19055_ACEOF
19056rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000019057if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19058 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019059 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019060 grep -v '^ *+' conftest.er1 >conftest.err
19061 rm -f conftest.er1
19062 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000019064 (exit $ac_status); } &&
19065 { ac_try='test -z "$ac_c_werror_flag"
19066 || test ! -s conftest.err'
19067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19068 (eval $ac_try) 2>&5
19069 ac_status=$?
19070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19071 (exit $ac_status); }; } &&
19072 { ac_try='test -s conftest.$ac_objext'
19073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19074 (eval $ac_try) 2>&5
19075 ac_status=$?
19076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19077 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019078
19079
19080cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019081#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019082_ACEOF
19083
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019084 works=yes
19085
Guido van Rossumf78abae1997-01-21 22:02:36 +000019086else
Martin v. Löwis11437992002-04-12 09:54:03 +000019087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019088sed 's/^/| /' conftest.$ac_ext >&5
19089
Guido van Rossum627b2d71993-12-24 10:39:16 +000019090fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000019091rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19092echo "$as_me:$LINENO: result: $works" >&5
19093echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019094
Martin v. Löwisd6320502004-08-12 13:45:08 +000019095# check for socketpair
Skip Montanaro89e975f2007-08-22 19:05:21 +000019096echo "$as_me:$LINENO: checking for socketpair" >&5
19097echo $ECHO_N "checking for socketpair... $ECHO_C" >&6
Martin v. Löwisd6320502004-08-12 13:45:08 +000019098cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000019099/* confdefs.h. */
19100_ACEOF
19101cat confdefs.h >>conftest.$ac_ext
19102cat >>conftest.$ac_ext <<_ACEOF
19103/* end confdefs.h. */
19104
19105#include <sys/types.h>
19106#include <sys/socket.h>
19107
19108int
19109main ()
19110{
19111void *x=socketpair
19112 ;
19113 return 0;
19114}
19115_ACEOF
19116rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000019117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19118 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000019119 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019120 grep -v '^ *+' conftest.er1 >conftest.err
19121 rm -f conftest.er1
19122 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000019123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000019124 (exit $ac_status); } &&
19125 { ac_try='test -z "$ac_c_werror_flag"
19126 || test ! -s conftest.err'
19127 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19128 (eval $ac_try) 2>&5
19129 ac_status=$?
19130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19131 (exit $ac_status); }; } &&
19132 { ac_try='test -s conftest.$ac_objext'
19133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19134 (eval $ac_try) 2>&5
19135 ac_status=$?
19136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19137 (exit $ac_status); }; }; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000019138
19139cat >>confdefs.h <<\_ACEOF
19140#define HAVE_SOCKETPAIR 1
19141_ACEOF
19142
Skip Montanaro89e975f2007-08-22 19:05:21 +000019143 echo "$as_me:$LINENO: result: yes" >&5
19144echo "${ECHO_T}yes" >&6
Martin v. Löwisd6320502004-08-12 13:45:08 +000019145else
19146 echo "$as_me: failed program was:" >&5
19147sed 's/^/| /' conftest.$ac_ext >&5
19148
Skip Montanaro89e975f2007-08-22 19:05:21 +000019149echo "$as_me:$LINENO: result: no" >&5
19150echo "${ECHO_T}no" >&6
Martin v. Löwisd6320502004-08-12 13:45:08 +000019151
19152fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000019153rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000019154
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019155# check if sockaddr has sa_len member
Skip Montanaro89e975f2007-08-22 19:05:21 +000019156echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
19157echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019158cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019159/* confdefs.h. */
19160_ACEOF
19161cat confdefs.h >>conftest.$ac_ext
19162cat >>conftest.$ac_ext <<_ACEOF
19163/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019164#include <sys/types.h>
19165#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019166int
19167main ()
19168{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019169struct sockaddr x;
19170x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000019171 ;
19172 return 0;
19173}
19174_ACEOF
19175rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000019176if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19177 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019178 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019179 grep -v '^ *+' conftest.er1 >conftest.err
19180 rm -f conftest.er1
19181 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000019183 (exit $ac_status); } &&
19184 { ac_try='test -z "$ac_c_werror_flag"
19185 || test ! -s conftest.err'
19186 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19187 (eval $ac_try) 2>&5
19188 ac_status=$?
19189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19190 (exit $ac_status); }; } &&
19191 { ac_try='test -s conftest.$ac_objext'
19192 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19193 (eval $ac_try) 2>&5
19194 ac_status=$?
19195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19196 (exit $ac_status); }; }; then
19197 echo "$as_me:$LINENO: result: yes" >&5
19198echo "${ECHO_T}yes" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019199
19200cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019201#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019202_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019203
19204else
Martin v. Löwis11437992002-04-12 09:54:03 +000019205 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019206sed 's/^/| /' conftest.$ac_ext >&5
19207
Skip Montanaro89e975f2007-08-22 19:05:21 +000019208echo "$as_me:$LINENO: result: no" >&5
19209echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019210fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000019211rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019212
Guido van Rossumda88dad1995-01-26 00:46:29 +000019213va_list_is_array=no
Skip Montanaro89e975f2007-08-22 19:05:21 +000019214echo "$as_me:$LINENO: checking whether va_list is an array" >&5
19215echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019216cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019217/* confdefs.h. */
19218_ACEOF
19219cat confdefs.h >>conftest.$ac_ext
19220cat >>conftest.$ac_ext <<_ACEOF
19221/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019222
19223#ifdef HAVE_STDARG_PROTOTYPES
19224#include <stdarg.h>
19225#else
19226#include <varargs.h>
19227#endif
19228
Martin v. Löwis11437992002-04-12 09:54:03 +000019229int
19230main ()
19231{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019232va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000019233 ;
19234 return 0;
19235}
19236_ACEOF
19237rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000019238if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19239 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019240 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019241 grep -v '^ *+' conftest.er1 >conftest.err
19242 rm -f conftest.er1
19243 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000019245 (exit $ac_status); } &&
19246 { ac_try='test -z "$ac_c_werror_flag"
19247 || test ! -s conftest.err'
19248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19249 (eval $ac_try) 2>&5
19250 ac_status=$?
19251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19252 (exit $ac_status); }; } &&
19253 { ac_try='test -s conftest.$ac_objext'
19254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19255 (eval $ac_try) 2>&5
19256 ac_status=$?
19257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19258 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019259 :
19260else
Martin v. Löwis11437992002-04-12 09:54:03 +000019261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019262sed 's/^/| /' conftest.$ac_ext >&5
19263
Martin v. Löwis11437992002-04-12 09:54:03 +000019264
19265
19266cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019267#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019268_ACEOF
19269
Guido van Rossumda88dad1995-01-26 00:46:29 +000019270 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019271
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019272fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000019273rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19274echo "$as_me:$LINENO: result: $va_list_is_array" >&5
19275echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019276
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019277# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000019278
19279
19280
Skip Montanaro89e975f2007-08-22 19:05:21 +000019281echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
19282echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019283if test "${ac_cv_func_gethostbyname_r+set}" = set; then
19284 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019285else
Martin v. Löwis11437992002-04-12 09:54:03 +000019286 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019287/* confdefs.h. */
19288_ACEOF
19289cat confdefs.h >>conftest.$ac_ext
19290cat >>conftest.$ac_ext <<_ACEOF
19291/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019292/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
19293 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19294#define gethostbyname_r innocuous_gethostbyname_r
19295
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019296/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019297 which can conflict with char gethostbyname_r (); below.
19298 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019299 <limits.h> exists even on freestanding compilers. */
19300
19301#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019302# include <limits.h>
19303#else
19304# include <assert.h>
19305#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019306
19307#undef gethostbyname_r
19308
Skip Montanaro89e975f2007-08-22 19:05:21 +000019309/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019310#ifdef __cplusplus
19311extern "C"
Skip Montanaro89e975f2007-08-22 19:05:21 +000019312{
Martin v. Löwis11437992002-04-12 09:54:03 +000019313#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000019314/* We use char because int might match the return type of a gcc2
19315 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019316char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019317/* The GNU C library defines this for functions which it implements
19318 to always fail with ENOSYS. Some functions are actually named
19319 something starting with __ and the normal name is an alias. */
Skip Montanaro89e975f2007-08-22 19:05:21 +000019320#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019321choke me
Skip Montanaro89e975f2007-08-22 19:05:21 +000019322#else
19323char (*f) () = gethostbyname_r;
19324#endif
19325#ifdef __cplusplus
19326}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019327#endif
19328
Skip Montanaro6dead952003-09-25 14:50:04 +000019329int
19330main ()
19331{
Skip Montanaro89e975f2007-08-22 19:05:21 +000019332return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000019333 ;
19334 return 0;
19335}
19336_ACEOF
19337rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000019338if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19339 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019341 grep -v '^ *+' conftest.er1 >conftest.err
19342 rm -f conftest.er1
19343 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000019345 (exit $ac_status); } &&
19346 { ac_try='test -z "$ac_c_werror_flag"
19347 || test ! -s conftest.err'
19348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19349 (eval $ac_try) 2>&5
19350 ac_status=$?
19351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19352 (exit $ac_status); }; } &&
19353 { ac_try='test -s conftest$ac_exeext'
19354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19355 (eval $ac_try) 2>&5
19356 ac_status=$?
19357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19358 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019359 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019360else
Martin v. Löwis11437992002-04-12 09:54:03 +000019361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019362sed 's/^/| /' conftest.$ac_ext >&5
19363
Skip Montanaro89e975f2007-08-22 19:05:21 +000019364ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019365fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000019366rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019367 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019368fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000019369echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
19370echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019371if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019372
Martin v. Löwis11437992002-04-12 09:54:03 +000019373 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019374#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019375_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019376
Skip Montanaro89e975f2007-08-22 19:05:21 +000019377 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
19378echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019379 OLD_CFLAGS=$CFLAGS
19380 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019381 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019382/* confdefs.h. */
19383_ACEOF
19384cat confdefs.h >>conftest.$ac_ext
19385cat >>conftest.$ac_ext <<_ACEOF
19386/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019387
19388# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019389
Martin v. Löwis11437992002-04-12 09:54:03 +000019390int
19391main ()
19392{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019393
19394 char *name;
19395 struct hostent *he, *res;
19396 char buffer[2048];
19397 int buflen = 2048;
19398 int h_errnop;
19399
19400 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000019401
19402 ;
19403 return 0;
19404}
19405_ACEOF
19406rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000019407if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19408 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019409 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019410 grep -v '^ *+' conftest.er1 >conftest.err
19411 rm -f conftest.er1
19412 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000019414 (exit $ac_status); } &&
19415 { ac_try='test -z "$ac_c_werror_flag"
19416 || test ! -s conftest.err'
19417 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19418 (eval $ac_try) 2>&5
19419 ac_status=$?
19420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19421 (exit $ac_status); }; } &&
19422 { ac_try='test -s conftest.$ac_objext'
19423 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19424 (eval $ac_try) 2>&5
19425 ac_status=$?
19426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19427 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019428
19429 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019430#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019431_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019432
Martin v. Löwis11437992002-04-12 09:54:03 +000019433
19434cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019435#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019436_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019437
Skip Montanaro89e975f2007-08-22 19:05:21 +000019438 echo "$as_me:$LINENO: result: yes" >&5
19439echo "${ECHO_T}yes" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019440
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019441else
Martin v. Löwis11437992002-04-12 09:54:03 +000019442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019443sed 's/^/| /' conftest.$ac_ext >&5
19444
Martin v. Löwis11437992002-04-12 09:54:03 +000019445
Skip Montanaro89e975f2007-08-22 19:05:21 +000019446 echo "$as_me:$LINENO: result: no" >&5
19447echo "${ECHO_T}no" >&6
19448 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
19449echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019450 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019451/* confdefs.h. */
19452_ACEOF
19453cat confdefs.h >>conftest.$ac_ext
19454cat >>conftest.$ac_ext <<_ACEOF
19455/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019456
19457# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019458
Martin v. Löwis11437992002-04-12 09:54:03 +000019459int
19460main ()
19461{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019462
19463 char *name;
19464 struct hostent *he;
19465 char buffer[2048];
19466 int buflen = 2048;
19467 int h_errnop;
19468
19469 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000019470
19471 ;
19472 return 0;
19473}
19474_ACEOF
19475rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000019476if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19477 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019478 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019479 grep -v '^ *+' conftest.er1 >conftest.err
19480 rm -f conftest.er1
19481 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000019483 (exit $ac_status); } &&
19484 { ac_try='test -z "$ac_c_werror_flag"
19485 || test ! -s conftest.err'
19486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19487 (eval $ac_try) 2>&5
19488 ac_status=$?
19489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19490 (exit $ac_status); }; } &&
19491 { ac_try='test -s conftest.$ac_objext'
19492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19493 (eval $ac_try) 2>&5
19494 ac_status=$?
19495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19496 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019497
19498 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019499#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019500_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019501
Martin v. Löwis11437992002-04-12 09:54:03 +000019502
19503cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019504#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019505_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019506
Skip Montanaro89e975f2007-08-22 19:05:21 +000019507 echo "$as_me:$LINENO: result: yes" >&5
19508echo "${ECHO_T}yes" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019509
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019510else
Martin v. Löwis11437992002-04-12 09:54:03 +000019511 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019512sed 's/^/| /' conftest.$ac_ext >&5
19513
Martin v. Löwis11437992002-04-12 09:54:03 +000019514
Skip Montanaro89e975f2007-08-22 19:05:21 +000019515 echo "$as_me:$LINENO: result: no" >&5
19516echo "${ECHO_T}no" >&6
19517 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
19518echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019519 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019520/* confdefs.h. */
19521_ACEOF
19522cat confdefs.h >>conftest.$ac_ext
19523cat >>conftest.$ac_ext <<_ACEOF
19524/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019525
19526# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019527
Martin v. Löwis11437992002-04-12 09:54:03 +000019528int
19529main ()
19530{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019531
19532 char *name;
19533 struct hostent *he;
19534 struct hostent_data data;
19535
19536 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000019537
19538 ;
19539 return 0;
19540}
19541_ACEOF
19542rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000019543if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19544 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019545 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019546 grep -v '^ *+' conftest.er1 >conftest.err
19547 rm -f conftest.er1
19548 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000019550 (exit $ac_status); } &&
19551 { ac_try='test -z "$ac_c_werror_flag"
19552 || test ! -s conftest.err'
19553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19554 (eval $ac_try) 2>&5
19555 ac_status=$?
19556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19557 (exit $ac_status); }; } &&
19558 { ac_try='test -s conftest.$ac_objext'
19559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19560 (eval $ac_try) 2>&5
19561 ac_status=$?
19562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19563 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019564
19565 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019566#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019567_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000019568
Martin v. Löwis11437992002-04-12 09:54:03 +000019569
19570cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019571#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019572_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019573
Skip Montanaro89e975f2007-08-22 19:05:21 +000019574 echo "$as_me:$LINENO: result: yes" >&5
19575echo "${ECHO_T}yes" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019576
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019577else
Martin v. Löwis11437992002-04-12 09:54:03 +000019578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019579sed 's/^/| /' conftest.$ac_ext >&5
19580
Martin v. Löwis11437992002-04-12 09:54:03 +000019581
Skip Montanaro89e975f2007-08-22 19:05:21 +000019582 echo "$as_me:$LINENO: result: no" >&5
19583echo "${ECHO_T}no" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019584
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019585fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000019586rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019587
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019588fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000019589rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019590
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019591fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000019592rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019593 CFLAGS=$OLD_CFLAGS
19594
19595else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019596
Martin v. Löwis11437992002-04-12 09:54:03 +000019597
19598for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000019599do
Martin v. Löwis11437992002-04-12 09:54:03 +000019600as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaro89e975f2007-08-22 19:05:21 +000019601echo "$as_me:$LINENO: checking for $ac_func" >&5
19602echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19603if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019604 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019605else
Martin v. Löwis11437992002-04-12 09:54:03 +000019606 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019607/* confdefs.h. */
19608_ACEOF
19609cat confdefs.h >>conftest.$ac_ext
19610cat >>conftest.$ac_ext <<_ACEOF
19611/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019612/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19613 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19614#define $ac_func innocuous_$ac_func
19615
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019616/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019617 which can conflict with char $ac_func (); below.
19618 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019619 <limits.h> exists even on freestanding compilers. */
19620
19621#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019622# include <limits.h>
19623#else
19624# include <assert.h>
19625#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019626
19627#undef $ac_func
19628
Skip Montanaro89e975f2007-08-22 19:05:21 +000019629/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019630#ifdef __cplusplus
19631extern "C"
Skip Montanaro89e975f2007-08-22 19:05:21 +000019632{
Martin v. Löwis11437992002-04-12 09:54:03 +000019633#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000019634/* We use char because int might match the return type of a gcc2
19635 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019636char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019637/* The GNU C library defines this for functions which it implements
19638 to always fail with ENOSYS. Some functions are actually named
19639 something starting with __ and the normal name is an alias. */
Skip Montanaro89e975f2007-08-22 19:05:21 +000019640#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019641choke me
Skip Montanaro89e975f2007-08-22 19:05:21 +000019642#else
19643char (*f) () = $ac_func;
19644#endif
19645#ifdef __cplusplus
19646}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019647#endif
19648
Skip Montanaro6dead952003-09-25 14:50:04 +000019649int
19650main ()
19651{
Skip Montanaro89e975f2007-08-22 19:05:21 +000019652return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000019653 ;
19654 return 0;
19655}
19656_ACEOF
19657rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000019658if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19659 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019660 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019661 grep -v '^ *+' conftest.er1 >conftest.err
19662 rm -f conftest.er1
19663 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000019665 (exit $ac_status); } &&
19666 { ac_try='test -z "$ac_c_werror_flag"
19667 || test ! -s conftest.err'
19668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19669 (eval $ac_try) 2>&5
19670 ac_status=$?
19671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19672 (exit $ac_status); }; } &&
19673 { ac_try='test -s conftest$ac_exeext'
19674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19675 (eval $ac_try) 2>&5
19676 ac_status=$?
19677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19678 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019679 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019680else
Martin v. Löwis11437992002-04-12 09:54:03 +000019681 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019682sed 's/^/| /' conftest.$ac_ext >&5
19683
Skip Montanaro89e975f2007-08-22 19:05:21 +000019684eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019685fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000019686rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019687 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019688fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000019689echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
19690echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019691if test `eval echo '${'$as_ac_var'}'` = yes; then
19692 cat >>confdefs.h <<_ACEOF
19693#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19694_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019695
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019696fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019697done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019698
Michael W. Hudson54241132001-12-07 15:38:26 +000019699
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000019700fi
19701
Michael W. Hudson54241132001-12-07 15:38:26 +000019702
19703
19704
19705
19706
19707
Guido van Rossum627b2d71993-12-24 10:39:16 +000019708# checks for system services
19709# (none yet)
19710
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019711# Linux requires this for correct f.p. operations
Skip Montanaro89e975f2007-08-22 19:05:21 +000019712echo "$as_me:$LINENO: checking for __fpu_control" >&5
19713echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019714if test "${ac_cv_func___fpu_control+set}" = set; then
19715 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +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 __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
19724 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19725#define __fpu_control innocuous___fpu_control
19726
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019727/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019728 which can conflict with char __fpu_control (); 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 __fpu_control
19739
Skip Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +000019743{
Martin v. Löwis11437992002-04-12 09:54:03 +000019744#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +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 __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +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 Montanaro89e975f2007-08-22 19:05:21 +000019751#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019752choke me
Skip Montanaro89e975f2007-08-22 19:05:21 +000019753#else
19754char (*f) () = __fpu_control;
19755#endif
19756#ifdef __cplusplus
19757}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019758#endif
19759
Skip Montanaro6dead952003-09-25 14:50:04 +000019760int
19761main ()
19762{
Skip Montanaro89e975f2007-08-22 19:05:21 +000019763return f != __fpu_control;
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 Montanaro89e975f2007-08-22 19:05:21 +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 Montanaro89e975f2007-08-22 19:05:21 +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 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +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 Montanaro89e975f2007-08-22 19:05:21 +000019795ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019796fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000019797rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019798 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019799fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000019800echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
19801echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019802if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019803 :
19804else
Martin v. Löwis11437992002-04-12 09:54:03 +000019805
Skip Montanaro89e975f2007-08-22 19:05:21 +000019806echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
19807echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019808if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
19809 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019810else
Martin v. Löwis11437992002-04-12 09:54:03 +000019811 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019812LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019813cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019814/* confdefs.h. */
19815_ACEOF
19816cat confdefs.h >>conftest.$ac_ext
19817cat >>conftest.$ac_ext <<_ACEOF
19818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019819
Skip Montanaro89e975f2007-08-22 19:05:21 +000019820/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019821#ifdef __cplusplus
19822extern "C"
19823#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000019824/* We use char because int might match the return type of a gcc2
19825 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019826char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019827int
19828main ()
19829{
Skip Montanaro89e975f2007-08-22 19:05:21 +000019830__fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019831 ;
19832 return 0;
19833}
19834_ACEOF
19835rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000019836if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19837 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019839 grep -v '^ *+' conftest.er1 >conftest.err
19840 rm -f conftest.er1
19841 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000019843 (exit $ac_status); } &&
19844 { ac_try='test -z "$ac_c_werror_flag"
19845 || test ! -s conftest.err'
19846 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19847 (eval $ac_try) 2>&5
19848 ac_status=$?
19849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19850 (exit $ac_status); }; } &&
19851 { ac_try='test -s conftest$ac_exeext'
19852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19853 (eval $ac_try) 2>&5
19854 ac_status=$?
19855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19856 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019857 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019858else
Martin v. Löwis11437992002-04-12 09:54:03 +000019859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019860sed 's/^/| /' conftest.$ac_ext >&5
19861
Skip Montanaro89e975f2007-08-22 19:05:21 +000019862ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019863fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000019864rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019865 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019866LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019867fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000019868echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
19869echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019870if test $ac_cv_lib_ieee___fpu_control = yes; then
19871 cat >>confdefs.h <<_ACEOF
19872#define HAVE_LIBIEEE 1
19873_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019874
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019875 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019876
Guido van Rossum627b2d71993-12-24 10:39:16 +000019877fi
19878
Michael W. Hudson54241132001-12-07 15:38:26 +000019879
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000019880fi
19881
Michael W. Hudson54241132001-12-07 15:38:26 +000019882
Guido van Rossum7f253911997-05-09 02:42:48 +000019883# Check for --with-fpectl
Skip Montanaro89e975f2007-08-22 19:05:21 +000019884echo "$as_me:$LINENO: checking for --with-fpectl" >&5
19885echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019886
Skip Montanaro89e975f2007-08-22 19:05:21 +000019887# Check whether --with-fpectl or --without-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000019888if test "${with_fpectl+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000019889 withval="$with_fpectl"
19890
Guido van Rossum7f253911997-05-09 02:42:48 +000019891if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000019892then
19893
19894cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000019895#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019896_ACEOF
19897
Skip Montanaro89e975f2007-08-22 19:05:21 +000019898 echo "$as_me:$LINENO: result: yes" >&5
19899echo "${ECHO_T}yes" >&6
19900else echo "$as_me:$LINENO: result: no" >&5
19901echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000019902fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000019903else
Skip Montanaro89e975f2007-08-22 19:05:21 +000019904 echo "$as_me:$LINENO: result: no" >&5
19905echo "${ECHO_T}no" >&6
19906fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000019907
Guido van Rossum7f43da71994-08-01 12:15:30 +000019908# check for --with-libm=...
19909
Guido van Rossum563e7081996-09-10 18:20:48 +000019910case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000019911Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000019912BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000019913*) LIBM=-lm
19914esac
Skip Montanaro89e975f2007-08-22 19:05:21 +000019915echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
19916echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019917
Skip Montanaro89e975f2007-08-22 19:05:21 +000019918# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019919if test "${with_libm+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000019920 withval="$with_libm"
19921
Guido van Rossum7f253911997-05-09 02:42:48 +000019922if test "$withval" = no
19923then LIBM=
Skip Montanaro89e975f2007-08-22 19:05:21 +000019924 echo "$as_me:$LINENO: result: force LIBM empty" >&5
19925echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000019926elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000019927then LIBM=$withval
Skip Montanaro89e975f2007-08-22 19:05:21 +000019928 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
19929echo "${ECHO_T}set LIBM=\"$withval\"" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019930else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
19931echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
19932 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019933fi
Guido van Rossum7f253911997-05-09 02:42:48 +000019934else
Skip Montanaro89e975f2007-08-22 19:05:21 +000019935 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
19936echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
19937fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000019938
19939# check for --with-libc=...
19940
Skip Montanaro89e975f2007-08-22 19:05:21 +000019941echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
19942echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019943
Skip Montanaro89e975f2007-08-22 19:05:21 +000019944# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019945if test "${with_libc+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000019946 withval="$with_libc"
19947
Guido van Rossum7f253911997-05-09 02:42:48 +000019948if test "$withval" = no
19949then LIBC=
Skip Montanaro89e975f2007-08-22 19:05:21 +000019950 echo "$as_me:$LINENO: result: force LIBC empty" >&5
19951echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000019952elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000019953then LIBC=$withval
Skip Montanaro89e975f2007-08-22 19:05:21 +000019954 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
19955echo "${ECHO_T}set LIBC=\"$withval\"" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019956else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
19957echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
19958 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000019959fi
Guido van Rossum7f253911997-05-09 02:42:48 +000019960else
Skip Montanaro89e975f2007-08-22 19:05:21 +000019961 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
19962echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
19963fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000019964
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019965# check for hypot() in math library
19966LIBS_SAVE=$LIBS
19967LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000019968
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019969for ac_func in hypot
19970do
Martin v. Löwis11437992002-04-12 09:54:03 +000019971as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
Skip Montanaro89e975f2007-08-22 19:05:21 +000019972echo "$as_me:$LINENO: checking for $ac_func" >&5
19973echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19974if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019975 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000019976else
Martin v. Löwis11437992002-04-12 09:54:03 +000019977 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019978/* confdefs.h. */
19979_ACEOF
19980cat confdefs.h >>conftest.$ac_ext
19981cat >>conftest.$ac_ext <<_ACEOF
19982/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019983/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19984 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19985#define $ac_func innocuous_$ac_func
19986
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019987/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019988 which can conflict with char $ac_func (); below.
19989 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019990 <limits.h> exists even on freestanding compilers. */
19991
19992#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019993# include <limits.h>
19994#else
19995# include <assert.h>
19996#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019997
19998#undef $ac_func
19999
Skip Montanaro89e975f2007-08-22 19:05:21 +000020000/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020001#ifdef __cplusplus
20002extern "C"
Skip Montanaro89e975f2007-08-22 19:05:21 +000020003{
Martin v. Löwis11437992002-04-12 09:54:03 +000020004#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000020005/* We use char because int might match the return type of a gcc2
20006 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020007char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020008/* The GNU C library defines this for functions which it implements
20009 to always fail with ENOSYS. Some functions are actually named
20010 something starting with __ and the normal name is an alias. */
Skip Montanaro89e975f2007-08-22 19:05:21 +000020011#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020012choke me
Skip Montanaro89e975f2007-08-22 19:05:21 +000020013#else
20014char (*f) () = $ac_func;
20015#endif
20016#ifdef __cplusplus
20017}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020018#endif
20019
Skip Montanaro6dead952003-09-25 14:50:04 +000020020int
20021main ()
20022{
Skip Montanaro89e975f2007-08-22 19:05:21 +000020023return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000020024 ;
20025 return 0;
20026}
20027_ACEOF
20028rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000020029if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20030 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020031 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020032 grep -v '^ *+' conftest.er1 >conftest.err
20033 rm -f conftest.er1
20034 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000020036 (exit $ac_status); } &&
20037 { ac_try='test -z "$ac_c_werror_flag"
20038 || test ! -s conftest.err'
20039 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20040 (eval $ac_try) 2>&5
20041 ac_status=$?
20042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20043 (exit $ac_status); }; } &&
20044 { ac_try='test -s conftest$ac_exeext'
20045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20046 (eval $ac_try) 2>&5
20047 ac_status=$?
20048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20049 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020050 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020051else
Martin v. Löwis11437992002-04-12 09:54:03 +000020052 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020053sed 's/^/| /' conftest.$ac_ext >&5
20054
Skip Montanaro89e975f2007-08-22 19:05:21 +000020055eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020056fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000020057rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020058 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020059fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000020060echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
20061echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020062if test `eval echo '${'$as_ac_var'}'` = yes; then
20063 cat >>confdefs.h <<_ACEOF
20064#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20065_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020066
Michael W. Hudson54241132001-12-07 15:38:26 +000020067else
Skip Montanaro89e975f2007-08-22 19:05:21 +000020068 case $LIBOBJS in
20069 "$ac_func.$ac_objext" | \
20070 *" $ac_func.$ac_objext" | \
20071 "$ac_func.$ac_objext "* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020072 *" $ac_func.$ac_objext "* ) ;;
Skip Montanaro89e975f2007-08-22 19:05:21 +000020073 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020074esac
20075
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020076fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000020077done
20078
Michael W. Hudson54241132001-12-07 15:38:26 +000020079
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000020080LIBS=$LIBS_SAVE
20081
Guido van Rossumef2255b2000-03-10 22:30:29 +000020082# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000020083if test "${ac_cv_header_wchar_h+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000020084 echo "$as_me:$LINENO: checking for wchar.h" >&5
20085echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020086if test "${ac_cv_header_wchar_h+set}" = set; then
20087 echo $ECHO_N "(cached) $ECHO_C" >&6
20088fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000020089echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
20090echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000020091else
Martin v. Löwis11437992002-04-12 09:54:03 +000020092 # Is the header compilable?
Skip Montanaro89e975f2007-08-22 19:05:21 +000020093echo "$as_me:$LINENO: checking wchar.h usability" >&5
20094echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020095cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020096/* confdefs.h. */
20097_ACEOF
20098cat confdefs.h >>conftest.$ac_ext
20099cat >>conftest.$ac_ext <<_ACEOF
20100/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020101$ac_includes_default
20102#include <wchar.h>
20103_ACEOF
20104rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000020105if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20106 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020107 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020108 grep -v '^ *+' conftest.er1 >conftest.err
20109 rm -f conftest.er1
20110 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000020112 (exit $ac_status); } &&
20113 { ac_try='test -z "$ac_c_werror_flag"
20114 || test ! -s conftest.err'
20115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20116 (eval $ac_try) 2>&5
20117 ac_status=$?
20118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20119 (exit $ac_status); }; } &&
20120 { ac_try='test -s conftest.$ac_objext'
20121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20122 (eval $ac_try) 2>&5
20123 ac_status=$?
20124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20125 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020126 ac_header_compiler=yes
20127else
20128 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020129sed 's/^/| /' conftest.$ac_ext >&5
20130
Skip Montanaro89e975f2007-08-22 19:05:21 +000020131ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020132fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000020133rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20134echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
20135echo "${ECHO_T}$ac_header_compiler" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020136
20137# Is the header present?
Skip Montanaro89e975f2007-08-22 19:05:21 +000020138echo "$as_me:$LINENO: checking wchar.h presence" >&5
20139echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020140cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020141/* confdefs.h. */
20142_ACEOF
20143cat confdefs.h >>conftest.$ac_ext
20144cat >>conftest.$ac_ext <<_ACEOF
20145/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000020146#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020147_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +000020148if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
20149 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020150 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000020151 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000020152 rm -f conftest.er1
20153 cat conftest.err >&5
20154 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000020155 (exit $ac_status); } >/dev/null; then
20156 if test -s conftest.err; then
20157 ac_cpp_err=$ac_c_preproc_warn_flag
20158 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
20159 else
20160 ac_cpp_err=
20161 fi
20162else
20163 ac_cpp_err=yes
20164fi
20165if test -z "$ac_cpp_err"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020166 ac_header_preproc=yes
20167else
20168 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020169sed 's/^/| /' conftest.$ac_ext >&5
20170
Martin v. Löwis11437992002-04-12 09:54:03 +000020171 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000020172fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020173rm -f conftest.err conftest.$ac_ext
Skip Montanaro89e975f2007-08-22 19:05:21 +000020174echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
20175echo "${ECHO_T}$ac_header_preproc" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020176
20177# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020178case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
20179 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000020180 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
20181echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000020182 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
20183echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
20184 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020185 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020186 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020187 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
20188echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000020189 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
20190echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
20191 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
20192echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
20193 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
20194echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000020195 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
20196echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000020197 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
20198echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +000020199 (
20200 cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000020201## ------------------------------------------------ ##
20202## Report this to http://www.python.org/python-bugs ##
20203## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000020204_ASBOX
Skip Montanaro89e975f2007-08-22 19:05:21 +000020205 ) |
20206 sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000020207 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020208esac
Skip Montanaro89e975f2007-08-22 19:05:21 +000020209echo "$as_me:$LINENO: checking for wchar.h" >&5
20210echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020211if test "${ac_cv_header_wchar_h+set}" = set; then
20212 echo $ECHO_N "(cached) $ECHO_C" >&6
20213else
20214 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000020215fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000020216echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
20217echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020218
20219fi
20220if test $ac_cv_header_wchar_h = yes; then
20221
20222
20223cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000020224#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020225_ACEOF
20226
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020227 wchar_h="yes"
20228
Guido van Rossumef2255b2000-03-10 22:30:29 +000020229else
Martin v. Löwis11437992002-04-12 09:54:03 +000020230 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000020231
20232fi
20233
Michael W. Hudson54241132001-12-07 15:38:26 +000020234
Martin v. Löwis11437992002-04-12 09:54:03 +000020235
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020236# determine wchar_t size
20237if test "$wchar_h" = yes
20238then
Skip Montanaro89e975f2007-08-22 19:05:21 +000020239 echo "$as_me:$LINENO: checking for wchar_t" >&5
20240echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020241if test "${ac_cv_type_wchar_t+set}" = set; then
20242 echo $ECHO_N "(cached) $ECHO_C" >&6
20243else
20244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020245/* confdefs.h. */
20246_ACEOF
20247cat confdefs.h >>conftest.$ac_ext
20248cat >>conftest.$ac_ext <<_ACEOF
20249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020250#include <wchar.h>
20251
Martin v. Löwis11437992002-04-12 09:54:03 +000020252int
20253main ()
20254{
Skip Montanaro89e975f2007-08-22 19:05:21 +000020255if ((wchar_t *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000020256 return 0;
Skip Montanaro89e975f2007-08-22 19:05:21 +000020257if (sizeof (wchar_t))
Martin v. Löwis11437992002-04-12 09:54:03 +000020258 return 0;
20259 ;
20260 return 0;
20261}
20262_ACEOF
20263rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000020264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20265 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020267 grep -v '^ *+' conftest.er1 >conftest.err
20268 rm -f conftest.er1
20269 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000020271 (exit $ac_status); } &&
20272 { ac_try='test -z "$ac_c_werror_flag"
20273 || test ! -s conftest.err'
20274 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20275 (eval $ac_try) 2>&5
20276 ac_status=$?
20277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20278 (exit $ac_status); }; } &&
20279 { ac_try='test -s conftest.$ac_objext'
20280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20281 (eval $ac_try) 2>&5
20282 ac_status=$?
20283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20284 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020285 ac_cv_type_wchar_t=yes
20286else
20287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020288sed 's/^/| /' conftest.$ac_ext >&5
20289
Skip Montanaro89e975f2007-08-22 19:05:21 +000020290ac_cv_type_wchar_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020291fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000020292rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon19fab762007-06-02 03:02:29 +000020293fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000020294echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
20295echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
Brett Cannon19fab762007-06-02 03:02:29 +000020296
Skip Montanaro89e975f2007-08-22 19:05:21 +000020297echo "$as_me:$LINENO: checking size of wchar_t" >&5
20298echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020299if test "${ac_cv_sizeof_wchar_t+set}" = set; then
20300 echo $ECHO_N "(cached) $ECHO_C" >&6
20301else
Skip Montanaro89e975f2007-08-22 19:05:21 +000020302 if test "$ac_cv_type_wchar_t" = yes; then
20303 # The cast to unsigned long works around a bug in the HP C Compiler
20304 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20305 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20306 # This bug is HP SR number 8606223364.
Martin v. Löwis11437992002-04-12 09:54:03 +000020307 if test "$cross_compiling" = yes; then
20308 # Depending upon the size, compute the lo and hi bounds.
20309cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020310/* confdefs.h. */
20311_ACEOF
20312cat confdefs.h >>conftest.$ac_ext
20313cat >>conftest.$ac_ext <<_ACEOF
20314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020315#include <wchar.h>
20316
Martin v. Löwis11437992002-04-12 09:54:03 +000020317int
20318main ()
20319{
Skip Montanaro89e975f2007-08-22 19:05:21 +000020320static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020321test_array [0] = 0
20322
20323 ;
20324 return 0;
20325}
20326_ACEOF
20327rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000020328if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20329 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020330 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020331 grep -v '^ *+' conftest.er1 >conftest.err
20332 rm -f conftest.er1
20333 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000020335 (exit $ac_status); } &&
20336 { ac_try='test -z "$ac_c_werror_flag"
20337 || test ! -s conftest.err'
20338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20339 (eval $ac_try) 2>&5
20340 ac_status=$?
20341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20342 (exit $ac_status); }; } &&
20343 { ac_try='test -s conftest.$ac_objext'
20344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20345 (eval $ac_try) 2>&5
20346 ac_status=$?
20347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20348 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020349 ac_lo=0 ac_mid=0
20350 while :; do
20351 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020352/* confdefs.h. */
20353_ACEOF
20354cat confdefs.h >>conftest.$ac_ext
20355cat >>conftest.$ac_ext <<_ACEOF
20356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020357#include <wchar.h>
20358
Martin v. Löwis11437992002-04-12 09:54:03 +000020359int
20360main ()
20361{
Skip Montanaro89e975f2007-08-22 19:05:21 +000020362static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020363test_array [0] = 0
20364
20365 ;
20366 return 0;
20367}
20368_ACEOF
20369rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000020370if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20371 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020372 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020373 grep -v '^ *+' conftest.er1 >conftest.err
20374 rm -f conftest.er1
20375 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000020377 (exit $ac_status); } &&
20378 { ac_try='test -z "$ac_c_werror_flag"
20379 || test ! -s conftest.err'
20380 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20381 (eval $ac_try) 2>&5
20382 ac_status=$?
20383 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20384 (exit $ac_status); }; } &&
20385 { ac_try='test -s conftest.$ac_objext'
20386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20387 (eval $ac_try) 2>&5
20388 ac_status=$?
20389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20390 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020391 ac_hi=$ac_mid; break
20392else
20393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020394sed 's/^/| /' conftest.$ac_ext >&5
20395
Skip Montanaro89e975f2007-08-22 19:05:21 +000020396ac_lo=`expr $ac_mid + 1`
20397 if test $ac_lo -le $ac_mid; then
20398 ac_lo= ac_hi=
20399 break
20400 fi
20401 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000020402fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000020403rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020404 done
20405else
20406 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020407sed 's/^/| /' conftest.$ac_ext >&5
20408
Skip Montanaro89e975f2007-08-22 19:05:21 +000020409cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020410/* confdefs.h. */
20411_ACEOF
20412cat confdefs.h >>conftest.$ac_ext
20413cat >>conftest.$ac_ext <<_ACEOF
20414/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020415#include <wchar.h>
20416
Martin v. Löwis11437992002-04-12 09:54:03 +000020417int
20418main ()
20419{
Skip Montanaro89e975f2007-08-22 19:05:21 +000020420static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020421test_array [0] = 0
20422
20423 ;
20424 return 0;
20425}
20426_ACEOF
20427rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000020428if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20429 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020431 grep -v '^ *+' conftest.er1 >conftest.err
20432 rm -f conftest.er1
20433 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000020435 (exit $ac_status); } &&
20436 { ac_try='test -z "$ac_c_werror_flag"
20437 || test ! -s conftest.err'
20438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20439 (eval $ac_try) 2>&5
20440 ac_status=$?
20441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20442 (exit $ac_status); }; } &&
20443 { ac_try='test -s conftest.$ac_objext'
20444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20445 (eval $ac_try) 2>&5
20446 ac_status=$?
20447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20448 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020449 ac_hi=-1 ac_mid=-1
20450 while :; do
20451 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020452/* confdefs.h. */
20453_ACEOF
20454cat confdefs.h >>conftest.$ac_ext
20455cat >>conftest.$ac_ext <<_ACEOF
20456/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020457#include <wchar.h>
20458
Martin v. Löwis11437992002-04-12 09:54:03 +000020459int
20460main ()
20461{
Skip Montanaro89e975f2007-08-22 19:05:21 +000020462static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020463test_array [0] = 0
20464
20465 ;
20466 return 0;
20467}
20468_ACEOF
20469rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000020470if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20471 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020472 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020473 grep -v '^ *+' conftest.er1 >conftest.err
20474 rm -f conftest.er1
20475 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000020477 (exit $ac_status); } &&
20478 { ac_try='test -z "$ac_c_werror_flag"
20479 || test ! -s conftest.err'
20480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20481 (eval $ac_try) 2>&5
20482 ac_status=$?
20483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20484 (exit $ac_status); }; } &&
20485 { ac_try='test -s conftest.$ac_objext'
20486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20487 (eval $ac_try) 2>&5
20488 ac_status=$?
20489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20490 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020491 ac_lo=$ac_mid; break
20492else
20493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020494sed 's/^/| /' conftest.$ac_ext >&5
20495
Skip Montanaro89e975f2007-08-22 19:05:21 +000020496ac_hi=`expr '(' $ac_mid ')' - 1`
20497 if test $ac_mid -le $ac_hi; then
20498 ac_lo= ac_hi=
20499 break
20500 fi
20501 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000020502fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000020503rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020504 done
20505else
20506 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020507sed 's/^/| /' conftest.$ac_ext >&5
20508
Skip Montanaro89e975f2007-08-22 19:05:21 +000020509ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000020510fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000020511rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020512fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000020513rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020514# Binary search between lo and hi bounds.
20515while test "x$ac_lo" != "x$ac_hi"; do
20516 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20517 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020518/* confdefs.h. */
20519_ACEOF
20520cat confdefs.h >>conftest.$ac_ext
20521cat >>conftest.$ac_ext <<_ACEOF
20522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020523#include <wchar.h>
20524
Martin v. Löwis11437992002-04-12 09:54:03 +000020525int
20526main ()
20527{
Skip Montanaro89e975f2007-08-22 19:05:21 +000020528static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000020529test_array [0] = 0
20530
20531 ;
20532 return 0;
20533}
20534_ACEOF
20535rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000020536if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20537 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020538 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020539 grep -v '^ *+' conftest.er1 >conftest.err
20540 rm -f conftest.er1
20541 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000020543 (exit $ac_status); } &&
20544 { ac_try='test -z "$ac_c_werror_flag"
20545 || test ! -s conftest.err'
20546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20547 (eval $ac_try) 2>&5
20548 ac_status=$?
20549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20550 (exit $ac_status); }; } &&
20551 { ac_try='test -s conftest.$ac_objext'
20552 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20553 (eval $ac_try) 2>&5
20554 ac_status=$?
20555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20556 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020557 ac_hi=$ac_mid
20558else
20559 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020560sed 's/^/| /' conftest.$ac_ext >&5
20561
Skip Montanaro89e975f2007-08-22 19:05:21 +000020562ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000020563fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000020564rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020565done
20566case $ac_lo in
20567?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro89e975f2007-08-22 19:05:21 +000020568'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000020569See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000020570echo "$as_me: error: cannot compute sizeof (wchar_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000020571See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +000020572 { (exit 1); exit 1; }; } ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020573esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020574else
Skip Montanaro89e975f2007-08-22 19:05:21 +000020575 if test "$cross_compiling" = yes; then
20576 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
20577See \`config.log' for more details." >&5
20578echo "$as_me: error: cannot run test program while cross compiling
20579See \`config.log' for more details." >&2;}
20580 { (exit 1); exit 1; }; }
20581else
Martin v. Löwis11437992002-04-12 09:54:03 +000020582 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020583/* confdefs.h. */
20584_ACEOF
20585cat confdefs.h >>conftest.$ac_ext
20586cat >>conftest.$ac_ext <<_ACEOF
20587/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020588#include <wchar.h>
20589
Skip Montanaro89e975f2007-08-22 19:05:21 +000020590long longval () { return (long) (sizeof (wchar_t)); }
20591unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000020592#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020593#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020594int
20595main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020596{
Martin v. Löwis11437992002-04-12 09:54:03 +000020597
20598 FILE *f = fopen ("conftest.val", "w");
20599 if (! f)
Skip Montanaro89e975f2007-08-22 19:05:21 +000020600 exit (1);
20601 if (((long) (sizeof (wchar_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000020602 {
Skip Montanaro89e975f2007-08-22 19:05:21 +000020603 long i = longval ();
20604 if (i != ((long) (sizeof (wchar_t))))
20605 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +000020606 fprintf (f, "%ld\n", i);
20607 }
20608 else
20609 {
Skip Montanaro89e975f2007-08-22 19:05:21 +000020610 unsigned long i = ulongval ();
20611 if (i != ((long) (sizeof (wchar_t))))
20612 exit (1);
Martin v. Löwis11437992002-04-12 09:54:03 +000020613 fprintf (f, "%lu\n", i);
20614 }
Skip Montanaro89e975f2007-08-22 19:05:21 +000020615 exit (ferror (f) || fclose (f) != 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020616
20617 ;
20618 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000020619}
Martin v. Löwis11437992002-04-12 09:54:03 +000020620_ACEOF
20621rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000020622if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20623 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020624 ac_status=$?
20625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20626 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +000020627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20628 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020629 ac_status=$?
20630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20631 (exit $ac_status); }; }; then
20632 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000020633else
Martin v. Löwis11437992002-04-12 09:54:03 +000020634 echo "$as_me: program exited with status $ac_status" >&5
20635echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020636sed 's/^/| /' conftest.$ac_ext >&5
20637
Martin v. Löwis11437992002-04-12 09:54:03 +000020638( exit $ac_status )
Skip Montanaro89e975f2007-08-22 19:05:21 +000020639{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000020640See \`config.log' for more details." >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000020641echo "$as_me: error: cannot compute sizeof (wchar_t), 77
Skip Montanaro6dead952003-09-25 14:50:04 +000020642See \`config.log' for more details." >&2;}
Skip Montanaro89e975f2007-08-22 19:05:21 +000020643 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020644fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000020645rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20646fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020647fi
20648rm -f conftest.val
Skip Montanaro89e975f2007-08-22 19:05:21 +000020649else
20650 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000020651fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000020652fi
20653echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
20654echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020655cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020656#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000020657_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020658
Michael W. Hudson54241132001-12-07 15:38:26 +000020659
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020660fi
20661
Skip Montanaro89e975f2007-08-22 19:05:21 +000020662echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
20663echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020664have_ucs4_tcl=no
20665cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020666/* confdefs.h. */
20667_ACEOF
20668cat confdefs.h >>conftest.$ac_ext
20669cat >>conftest.$ac_ext <<_ACEOF
20670/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020671
20672#include <tcl.h>
20673#if TCL_UTF_MAX != 6
20674# error "NOT UCS4_TCL"
20675#endif
20676int
20677main ()
20678{
20679
20680 ;
20681 return 0;
20682}
20683_ACEOF
20684rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000020685if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20686 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020687 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020688 grep -v '^ *+' conftest.er1 >conftest.err
20689 rm -f conftest.er1
20690 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000020692 (exit $ac_status); } &&
20693 { ac_try='test -z "$ac_c_werror_flag"
20694 || test ! -s conftest.err'
20695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20696 (eval $ac_try) 2>&5
20697 ac_status=$?
20698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20699 (exit $ac_status); }; } &&
20700 { ac_try='test -s conftest.$ac_objext'
20701 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20702 (eval $ac_try) 2>&5
20703 ac_status=$?
20704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20705 (exit $ac_status); }; }; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020706
20707
20708cat >>confdefs.h <<\_ACEOF
20709#define HAVE_UCS4_TCL 1
20710_ACEOF
20711
20712 have_ucs4_tcl=yes
20713
20714else
20715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020716sed 's/^/| /' conftest.$ac_ext >&5
20717
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020718fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000020719rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
20720echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
20721echo "${ECHO_T}$have_ucs4_tcl" >&6
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020722
Skip Montanaro6dead952003-09-25 14:50:04 +000020723# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020724if test "$wchar_h" = yes
20725then
20726 # check whether wchar_t is signed or not
Skip Montanaro89e975f2007-08-22 19:05:21 +000020727 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
20728echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020729 if test "${ac_cv_wchar_t_signed+set}" = set; then
20730 echo $ECHO_N "(cached) $ECHO_C" >&6
20731else
20732
20733 if test "$cross_compiling" = yes; then
20734 ac_cv_wchar_t_signed=yes
20735else
20736 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020737/* confdefs.h. */
20738_ACEOF
20739cat confdefs.h >>conftest.$ac_ext
20740cat >>conftest.$ac_ext <<_ACEOF
20741/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020742
20743 #include <wchar.h>
20744 int main()
20745 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000020746 /* Success: exit code 0 */
20747 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020748 }
20749
20750_ACEOF
20751rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000020752if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20753 (eval $ac_link) 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020754 ac_status=$?
20755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20756 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +000020757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20758 (eval $ac_try) 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020759 ac_status=$?
20760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20761 (exit $ac_status); }; }; then
20762 ac_cv_wchar_t_signed=yes
20763else
20764 echo "$as_me: program exited with status $ac_status" >&5
20765echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020766sed 's/^/| /' conftest.$ac_ext >&5
20767
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020768( exit $ac_status )
20769ac_cv_wchar_t_signed=no
20770fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000020771rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20772fi
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020773fi
20774
Skip Montanaro89e975f2007-08-22 19:05:21 +000020775 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
20776echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020777fi
20778
Skip Montanaro89e975f2007-08-22 19:05:21 +000020779echo "$as_me:$LINENO: checking what type to use for unicode" >&5
20780echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
20781# Check whether --enable-unicode or --disable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020782if test "${enable_unicode+set}" = set; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000020783 enableval="$enable_unicode"
20784
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020785else
20786 enable_unicode=yes
Skip Montanaro89e975f2007-08-22 19:05:21 +000020787fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020788
20789if test $enable_unicode = yes
20790then
Martin v. Löwisfd917792001-06-27 20:22:04 +000020791 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000020792 case "$have_ucs4_tcl" in
20793 yes) enable_unicode="ucs4"
20794 ;;
20795 *) enable_unicode="ucs2"
20796 ;;
20797 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020798fi
20799
Martin v. Löwis0036cba2002-04-12 09:58:45 +000020800
20801
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020802case "$enable_unicode" in
20803ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000020804 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020805#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000020806_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020807
20808 ;;
20809ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000020810 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020811#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000020812_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020813
20814 ;;
20815esac
20816
Michael W. Hudson54241132001-12-07 15:38:26 +000020817
Martin v. Löwis11437992002-04-12 09:54:03 +000020818
20819
Martin v. Löwis0036cba2002-04-12 09:58:45 +000020820
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020821if test "$enable_unicode" = "no"
20822then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000020823 UNICODE_OBJS=""
Skip Montanaro89e975f2007-08-22 19:05:21 +000020824 echo "$as_me:$LINENO: result: not used" >&5
20825echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020826else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000020827 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000020828
20829cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020830#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020831_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020832
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020833
20834 # wchar_t is only usable if it maps to an unsigned type
20835 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000020836 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020837 then
20838 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020839
Martin v. Löwis11437992002-04-12 09:54:03 +000020840cat >>confdefs.h <<\_ACEOF
20841#define HAVE_USABLE_WCHAR_T 1
20842_ACEOF
20843
20844 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020845#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000020846_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020847
20848 elif test "$ac_cv_sizeof_short" = "$unicode_size"
20849 then
20850 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000020851 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020852#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000020853_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020854
20855 elif test "$ac_cv_sizeof_long" = "$unicode_size"
20856 then
20857 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000020858 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020859#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000020860_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020861
20862 else
20863 PY_UNICODE_TYPE="no type found"
20864 fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000020865 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
20866echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000020867fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000020868
20869# check for endianness
Skip Montanaro89e975f2007-08-22 19:05:21 +000020870echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
20871echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020872if test "${ac_cv_c_bigendian+set}" = set; then
20873 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000020874else
Martin v. Löwis11437992002-04-12 09:54:03 +000020875 # See if sys/param.h defines the BYTE_ORDER macro.
20876cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020877/* confdefs.h. */
20878_ACEOF
20879cat confdefs.h >>conftest.$ac_ext
20880cat >>conftest.$ac_ext <<_ACEOF
20881/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000020882#include <sys/types.h>
20883#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000020884
Martin v. Löwis11437992002-04-12 09:54:03 +000020885int
20886main ()
20887{
Skip Montanaro89e975f2007-08-22 19:05:21 +000020888#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
Guido van Rossumef2255b2000-03-10 22:30:29 +000020889 bogus endian macros
20890#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020891
20892 ;
20893 return 0;
20894}
20895_ACEOF
20896rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000020897if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20898 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020899 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020900 grep -v '^ *+' conftest.er1 >conftest.err
20901 rm -f conftest.er1
20902 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020903 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000020904 (exit $ac_status); } &&
20905 { ac_try='test -z "$ac_c_werror_flag"
20906 || test ! -s conftest.err'
20907 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20908 (eval $ac_try) 2>&5
20909 ac_status=$?
20910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20911 (exit $ac_status); }; } &&
20912 { ac_try='test -s conftest.$ac_objext'
20913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20914 (eval $ac_try) 2>&5
20915 ac_status=$?
20916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20917 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000020918 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000020919cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020920/* confdefs.h. */
20921_ACEOF
20922cat confdefs.h >>conftest.$ac_ext
20923cat >>conftest.$ac_ext <<_ACEOF
20924/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000020925#include <sys/types.h>
20926#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000020927
Martin v. Löwis11437992002-04-12 09:54:03 +000020928int
20929main ()
20930{
Guido van Rossumef2255b2000-03-10 22:30:29 +000020931#if BYTE_ORDER != BIG_ENDIAN
20932 not big endian
20933#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020934
20935 ;
20936 return 0;
20937}
20938_ACEOF
20939rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000020940if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20941 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020943 grep -v '^ *+' conftest.er1 >conftest.err
20944 rm -f conftest.er1
20945 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000020947 (exit $ac_status); } &&
20948 { ac_try='test -z "$ac_c_werror_flag"
20949 || test ! -s conftest.err'
20950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20951 (eval $ac_try) 2>&5
20952 ac_status=$?
20953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20954 (exit $ac_status); }; } &&
20955 { ac_try='test -s conftest.$ac_objext'
20956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20957 (eval $ac_try) 2>&5
20958 ac_status=$?
20959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20960 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000020961 ac_cv_c_bigendian=yes
20962else
Martin v. Löwis11437992002-04-12 09:54:03 +000020963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020964sed 's/^/| /' conftest.$ac_ext >&5
20965
Skip Montanaro89e975f2007-08-22 19:05:21 +000020966ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000020967fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000020968rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000020969else
Martin v. Löwis11437992002-04-12 09:54:03 +000020970 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020971sed 's/^/| /' conftest.$ac_ext >&5
20972
Skip Montanaro89e975f2007-08-22 19:05:21 +000020973# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000020974if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020975 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000020976 ac_cv_c_bigendian=unknown
20977 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020978/* confdefs.h. */
20979_ACEOF
20980cat confdefs.h >>conftest.$ac_ext
20981cat >>conftest.$ac_ext <<_ACEOF
20982/* end confdefs.h. */
Skip Montanaro89e975f2007-08-22 19:05:21 +000020983short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
20984short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000020985void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
Skip Montanaro89e975f2007-08-22 19:05:21 +000020986short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
20987short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
Martin v. Löwis11437992002-04-12 09:54:03 +000020988void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020989int
20990main ()
20991{
20992 _ascii (); _ebcdic ();
20993 ;
20994 return 0;
20995}
20996_ACEOF
20997rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000020998if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
20999 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021000 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021001 grep -v '^ *+' conftest.er1 >conftest.err
21002 rm -f conftest.er1
21003 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000021005 (exit $ac_status); } &&
21006 { ac_try='test -z "$ac_c_werror_flag"
21007 || test ! -s conftest.err'
21008 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21009 (eval $ac_try) 2>&5
21010 ac_status=$?
21011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21012 (exit $ac_status); }; } &&
21013 { ac_try='test -s conftest.$ac_objext'
21014 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21015 (eval $ac_try) 2>&5
21016 ac_status=$?
21017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21018 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021019 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021020 ac_cv_c_bigendian=yes
21021fi
Skip Montanaro6dead952003-09-25 14:50:04 +000021022if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021023 if test "$ac_cv_c_bigendian" = unknown; then
21024 ac_cv_c_bigendian=no
21025 else
21026 # finding both strings is unlikely to happen, but who knows?
21027 ac_cv_c_bigendian=unknown
21028 fi
21029fi
21030else
21031 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021032sed 's/^/| /' conftest.$ac_ext >&5
21033
Martin v. Löwis11437992002-04-12 09:54:03 +000021034fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021035rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021036else
21037 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021038/* confdefs.h. */
21039_ACEOF
21040cat confdefs.h >>conftest.$ac_ext
21041cat >>conftest.$ac_ext <<_ACEOF
21042/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021043int
21044main ()
21045{
Guido van Rossumef2255b2000-03-10 22:30:29 +000021046 /* Are we little or big endian? From Harbison&Steele. */
21047 union
21048 {
Skip Montanaro89e975f2007-08-22 19:05:21 +000021049 long l;
21050 char c[sizeof (long)];
Guido van Rossumef2255b2000-03-10 22:30:29 +000021051 } u;
21052 u.l = 1;
Skip Montanaro89e975f2007-08-22 19:05:21 +000021053 exit (u.c[sizeof (long) - 1] == 1);
Guido van Rossumef2255b2000-03-10 22:30:29 +000021054}
Martin v. Löwis11437992002-04-12 09:54:03 +000021055_ACEOF
21056rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000021057if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21058 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021059 ac_status=$?
21060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21061 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +000021062 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21063 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021064 ac_status=$?
21065 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21066 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000021067 ac_cv_c_bigendian=no
21068else
Martin v. Löwis11437992002-04-12 09:54:03 +000021069 echo "$as_me: program exited with status $ac_status" >&5
21070echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021071sed 's/^/| /' conftest.$ac_ext >&5
21072
Martin v. Löwis11437992002-04-12 09:54:03 +000021073( exit $ac_status )
21074ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000021075fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021076rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000021077fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021078fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021079rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021080fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021081echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
21082echo "${ECHO_T}$ac_cv_c_bigendian" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021083case $ac_cv_c_bigendian in
21084 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000021085
Martin v. Löwis11437992002-04-12 09:54:03 +000021086cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000021087#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021088_ACEOF
21089 ;;
21090 no)
21091 ;;
21092 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000021093 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000021094presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021095echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000021096presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
21097 { (exit 1); exit 1; }; } ;;
21098esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000021099
Michael W. Hudson54241132001-12-07 15:38:26 +000021100
Ronald Oussoren988117f2006-04-29 11:31:35 +000021101
21102
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021103# Check whether right shifting a negative integer extends the sign bit
21104# or fills with zeros (like the Cray J90, according to Tim Peters).
Skip Montanaro89e975f2007-08-22 19:05:21 +000021105echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
21106echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021107if test "${ac_cv_rshift_extends_sign+set}" = set; then
21108 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000021109else
Martin v. Löwis11437992002-04-12 09:54:03 +000021110
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021111if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000021112 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021113else
Martin v. Löwis11437992002-04-12 09:54:03 +000021114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021115/* confdefs.h. */
21116_ACEOF
21117cat confdefs.h >>conftest.$ac_ext
21118cat >>conftest.$ac_ext <<_ACEOF
21119/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021120
21121int main()
21122{
Vladimir Marangozova6180282000-07-12 05:05:06 +000021123 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021124}
21125
Martin v. Löwis11437992002-04-12 09:54:03 +000021126_ACEOF
21127rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000021128if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21129 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021130 ac_status=$?
21131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21132 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +000021133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21134 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021135 ac_status=$?
21136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21137 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000021138 ac_cv_rshift_extends_sign=yes
21139else
Martin v. Löwis11437992002-04-12 09:54:03 +000021140 echo "$as_me: program exited with status $ac_status" >&5
21141echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021142sed 's/^/| /' conftest.$ac_ext >&5
21143
Martin v. Löwis11437992002-04-12 09:54:03 +000021144( exit $ac_status )
21145ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000021146fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021147rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21148fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000021149fi
21150
Skip Montanaro89e975f2007-08-22 19:05:21 +000021151echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
21152echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000021153if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021154then
Martin v. Löwis11437992002-04-12 09:54:03 +000021155
21156cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021157#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021158_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021159
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021160fi
21161
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021162# check for getc_unlocked and related locking functions
Skip Montanaro89e975f2007-08-22 19:05:21 +000021163echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
21164echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021165if test "${ac_cv_have_getc_unlocked+set}" = set; then
21166 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021167else
Martin v. Löwis11437992002-04-12 09:54:03 +000021168
21169cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021170/* confdefs.h. */
21171_ACEOF
21172cat confdefs.h >>conftest.$ac_ext
21173cat >>conftest.$ac_ext <<_ACEOF
21174/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021175#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021176int
21177main ()
21178{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021179
21180 FILE *f = fopen("/dev/null", "r");
21181 flockfile(f);
21182 getc_unlocked(f);
21183 funlockfile(f);
21184
Martin v. Löwis11437992002-04-12 09:54:03 +000021185 ;
21186 return 0;
21187}
21188_ACEOF
21189rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000021190if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21191 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021193 grep -v '^ *+' conftest.er1 >conftest.err
21194 rm -f conftest.er1
21195 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000021197 (exit $ac_status); } &&
21198 { ac_try='test -z "$ac_c_werror_flag"
21199 || test ! -s conftest.err'
21200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21201 (eval $ac_try) 2>&5
21202 ac_status=$?
21203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21204 (exit $ac_status); }; } &&
21205 { ac_try='test -s conftest$ac_exeext'
21206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21207 (eval $ac_try) 2>&5
21208 ac_status=$?
21209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21210 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021211 ac_cv_have_getc_unlocked=yes
21212else
Martin v. Löwis11437992002-04-12 09:54:03 +000021213 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021214sed 's/^/| /' conftest.$ac_ext >&5
21215
Skip Montanaro89e975f2007-08-22 19:05:21 +000021216ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021217fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021218rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021219 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021220fi
21221
Skip Montanaro89e975f2007-08-22 19:05:21 +000021222echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
21223echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021224if test "$ac_cv_have_getc_unlocked" = yes
21225then
Martin v. Löwis11437992002-04-12 09:54:03 +000021226
21227cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021228#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021229_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000021230
21231fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000021232
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021233# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000021234# save the value of LIBS so we don't actually link Python with readline
21235LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021236
Skip Montanaro89e975f2007-08-22 19:05:21 +000021237echo "$as_me:$LINENO: checking for readline in -lreadline" >&5
21238echo $ECHO_N "checking for readline in -lreadline... $ECHO_C" >&6
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021239if test "${ac_cv_lib_readline_readline+set}" = set; then
21240 echo $ECHO_N "(cached) $ECHO_C" >&6
21241else
21242 ac_check_lib_save_LIBS=$LIBS
21243LIBS="-lreadline $LIBS"
21244cat >conftest.$ac_ext <<_ACEOF
21245/* confdefs.h. */
21246_ACEOF
21247cat confdefs.h >>conftest.$ac_ext
21248cat >>conftest.$ac_ext <<_ACEOF
21249/* end confdefs.h. */
21250
Skip Montanaro89e975f2007-08-22 19:05:21 +000021251/* Override any gcc2 internal prototype to avoid an error. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021252#ifdef __cplusplus
21253extern "C"
21254#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000021255/* We use char because int might match the return type of a gcc2
21256 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021257char readline ();
21258int
21259main ()
21260{
Skip Montanaro89e975f2007-08-22 19:05:21 +000021261readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021262 ;
21263 return 0;
21264}
21265_ACEOF
21266rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000021267if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21268 (eval $ac_link) 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021269 ac_status=$?
21270 grep -v '^ *+' conftest.er1 >conftest.err
21271 rm -f conftest.er1
21272 cat conftest.err >&5
21273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000021274 (exit $ac_status); } &&
21275 { ac_try='test -z "$ac_c_werror_flag"
21276 || test ! -s conftest.err'
21277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21278 (eval $ac_try) 2>&5
21279 ac_status=$?
21280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21281 (exit $ac_status); }; } &&
21282 { ac_try='test -s conftest$ac_exeext'
21283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21284 (eval $ac_try) 2>&5
21285 ac_status=$?
21286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21287 (exit $ac_status); }; }; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021288 ac_cv_lib_readline_readline=yes
21289else
21290 echo "$as_me: failed program was:" >&5
21291sed 's/^/| /' conftest.$ac_ext >&5
21292
Skip Montanaro89e975f2007-08-22 19:05:21 +000021293ac_cv_lib_readline_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021294fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021295rm -f conftest.err conftest.$ac_objext \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021296 conftest$ac_exeext conftest.$ac_ext
21297LIBS=$ac_check_lib_save_LIBS
21298fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021299echo "$as_me:$LINENO: result: $ac_cv_lib_readline_readline" >&5
21300echo "${ECHO_T}$ac_cv_lib_readline_readline" >&6
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021301if test $ac_cv_lib_readline_readline = yes; then
21302 cat >>confdefs.h <<_ACEOF
21303#define HAVE_LIBREADLINE 1
21304_ACEOF
21305
21306 LIBS="-lreadline $LIBS"
21307
21308fi
21309
21310if test "$ac_cv_have_readline_readline" = no
21311then
21312
Skip Montanaro89e975f2007-08-22 19:05:21 +000021313echo "$as_me:$LINENO: checking for readline in -ltermcap" >&5
21314echo $ECHO_N "checking for readline in -ltermcap... $ECHO_C" >&6
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021315if test "${ac_cv_lib_termcap_readline+set}" = set; then
21316 echo $ECHO_N "(cached) $ECHO_C" >&6
21317else
21318 ac_check_lib_save_LIBS=$LIBS
21319LIBS="-ltermcap $LIBS"
21320cat >conftest.$ac_ext <<_ACEOF
21321/* confdefs.h. */
21322_ACEOF
21323cat confdefs.h >>conftest.$ac_ext
21324cat >>conftest.$ac_ext <<_ACEOF
21325/* end confdefs.h. */
21326
Skip Montanaro89e975f2007-08-22 19:05:21 +000021327/* Override any gcc2 internal prototype to avoid an error. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021328#ifdef __cplusplus
21329extern "C"
21330#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000021331/* We use char because int might match the return type of a gcc2
21332 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021333char readline ();
21334int
21335main ()
21336{
Skip Montanaro89e975f2007-08-22 19:05:21 +000021337readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021338 ;
21339 return 0;
21340}
21341_ACEOF
21342rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000021343if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21344 (eval $ac_link) 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021345 ac_status=$?
21346 grep -v '^ *+' conftest.er1 >conftest.err
21347 rm -f conftest.er1
21348 cat conftest.err >&5
21349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000021350 (exit $ac_status); } &&
21351 { ac_try='test -z "$ac_c_werror_flag"
21352 || test ! -s conftest.err'
21353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21354 (eval $ac_try) 2>&5
21355 ac_status=$?
21356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21357 (exit $ac_status); }; } &&
21358 { ac_try='test -s conftest$ac_exeext'
21359 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21360 (eval $ac_try) 2>&5
21361 ac_status=$?
21362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21363 (exit $ac_status); }; }; then
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021364 ac_cv_lib_termcap_readline=yes
21365else
21366 echo "$as_me: failed program was:" >&5
21367sed 's/^/| /' conftest.$ac_ext >&5
21368
Skip Montanaro89e975f2007-08-22 19:05:21 +000021369ac_cv_lib_termcap_readline=no
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021370fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021371rm -f conftest.err conftest.$ac_objext \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021372 conftest$ac_exeext conftest.$ac_ext
21373LIBS=$ac_check_lib_save_LIBS
21374fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021375echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_readline" >&5
21376echo "${ECHO_T}$ac_cv_lib_termcap_readline" >&6
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021377if test $ac_cv_lib_termcap_readline = yes; then
21378 cat >>confdefs.h <<_ACEOF
21379#define HAVE_LIBTERMCAP 1
21380_ACEOF
21381
21382 LIBS="-ltermcap $LIBS"
21383
21384fi
21385
21386fi
21387
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021388# check for readline 2.1
Skip Montanaro89e975f2007-08-22 19:05:21 +000021389echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
21390echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021391if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
21392 echo $ECHO_N "(cached) $ECHO_C" >&6
21393else
21394 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021395LIBS="-lreadline $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021396cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021397/* confdefs.h. */
21398_ACEOF
21399cat confdefs.h >>conftest.$ac_ext
21400cat >>conftest.$ac_ext <<_ACEOF
21401/* end confdefs.h. */
21402
Skip Montanaro89e975f2007-08-22 19:05:21 +000021403/* Override any gcc2 internal prototype to avoid an error. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021404#ifdef __cplusplus
21405extern "C"
21406#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000021407/* We use char because int might match the return type of a gcc2
21408 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021409char rl_callback_handler_install ();
21410int
21411main ()
21412{
Skip Montanaro89e975f2007-08-22 19:05:21 +000021413rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021414 ;
21415 return 0;
21416}
21417_ACEOF
21418rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000021419if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21420 (eval $ac_link) 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021421 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021422 grep -v '^ *+' conftest.er1 >conftest.err
21423 rm -f conftest.er1
21424 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000021426 (exit $ac_status); } &&
21427 { ac_try='test -z "$ac_c_werror_flag"
21428 || test ! -s conftest.err'
21429 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21430 (eval $ac_try) 2>&5
21431 ac_status=$?
21432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21433 (exit $ac_status); }; } &&
21434 { ac_try='test -s conftest$ac_exeext'
21435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21436 (eval $ac_try) 2>&5
21437 ac_status=$?
21438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21439 (exit $ac_status); }; }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021440 ac_cv_lib_readline_rl_callback_handler_install=yes
21441else
21442 echo "$as_me: failed program was:" >&5
21443sed 's/^/| /' conftest.$ac_ext >&5
21444
Skip Montanaro89e975f2007-08-22 19:05:21 +000021445ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021446fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021447rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021448 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021449LIBS=$ac_check_lib_save_LIBS
21450fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021451echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
21452echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021453if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
21454
21455cat >>confdefs.h <<\_ACEOF
21456#define HAVE_RL_CALLBACK 1
21457_ACEOF
21458
21459fi
21460
21461
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021462# check for readline 2.2
21463cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021464/* confdefs.h. */
21465_ACEOF
21466cat confdefs.h >>conftest.$ac_ext
21467cat >>conftest.$ac_ext <<_ACEOF
21468/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021469#include <readline/readline.h>
21470_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +000021471if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21472 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021473 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000021474 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021475 rm -f conftest.er1
21476 cat conftest.err >&5
21477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000021478 (exit $ac_status); } >/dev/null; then
21479 if test -s conftest.err; then
21480 ac_cpp_err=$ac_c_preproc_warn_flag
21481 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
21482 else
21483 ac_cpp_err=
21484 fi
21485else
21486 ac_cpp_err=yes
21487fi
21488if test -z "$ac_cpp_err"; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021489 have_readline=yes
21490else
21491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021492sed 's/^/| /' conftest.$ac_ext >&5
21493
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021494 have_readline=no
21495fi
21496rm -f conftest.err conftest.$ac_ext
21497if test $have_readline = yes
21498then
21499 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021500/* confdefs.h. */
21501_ACEOF
21502cat confdefs.h >>conftest.$ac_ext
21503cat >>conftest.$ac_ext <<_ACEOF
21504/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021505#include <readline/readline.h>
21506
21507_ACEOF
21508if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000021509 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000021510
21511cat >>confdefs.h <<\_ACEOF
21512#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
21513_ACEOF
21514
21515fi
21516rm -f conftest*
21517
21518fi
21519
Martin v. Löwis0daad592001-09-30 21:09:59 +000021520# check for readline 4.0
Skip Montanaro89e975f2007-08-22 19:05:21 +000021521echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
21522echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021523if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
21524 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000021525else
Martin v. Löwis11437992002-04-12 09:54:03 +000021526 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021527LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021528cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021529/* confdefs.h. */
21530_ACEOF
21531cat confdefs.h >>conftest.$ac_ext
21532cat >>conftest.$ac_ext <<_ACEOF
21533/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021534
Skip Montanaro89e975f2007-08-22 19:05:21 +000021535/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021536#ifdef __cplusplus
21537extern "C"
21538#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000021539/* We use char because int might match the return type of a gcc2
21540 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021541char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021542int
21543main ()
21544{
Skip Montanaro89e975f2007-08-22 19:05:21 +000021545rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021546 ;
21547 return 0;
21548}
21549_ACEOF
21550rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000021551if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21552 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021553 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021554 grep -v '^ *+' conftest.er1 >conftest.err
21555 rm -f conftest.er1
21556 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000021558 (exit $ac_status); } &&
21559 { ac_try='test -z "$ac_c_werror_flag"
21560 || test ! -s conftest.err'
21561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21562 (eval $ac_try) 2>&5
21563 ac_status=$?
21564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21565 (exit $ac_status); }; } &&
21566 { ac_try='test -s conftest$ac_exeext'
21567 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21568 (eval $ac_try) 2>&5
21569 ac_status=$?
21570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21571 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021572 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000021573else
Martin v. Löwis11437992002-04-12 09:54:03 +000021574 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021575sed 's/^/| /' conftest.$ac_ext >&5
21576
Skip Montanaro89e975f2007-08-22 19:05:21 +000021577ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000021578fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021579rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021580 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021581LIBS=$ac_check_lib_save_LIBS
21582fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021583echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
21584echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021585if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021586
Martin v. Löwis11437992002-04-12 09:54:03 +000021587cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000021588#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021589_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000021590
Martin v. Löwis0daad592001-09-30 21:09:59 +000021591fi
21592
Michael W. Hudson54241132001-12-07 15:38:26 +000021593
Martin v. Löwis0daad592001-09-30 21:09:59 +000021594# check for readline 4.2
Skip Montanaro89e975f2007-08-22 19:05:21 +000021595echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
21596echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021597if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
21598 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000021599else
Martin v. Löwis11437992002-04-12 09:54:03 +000021600 ac_check_lib_save_LIBS=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000021601LIBS="-lreadline $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021602cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021603/* confdefs.h. */
21604_ACEOF
21605cat confdefs.h >>conftest.$ac_ext
21606cat >>conftest.$ac_ext <<_ACEOF
21607/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021608
Skip Montanaro89e975f2007-08-22 19:05:21 +000021609/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021610#ifdef __cplusplus
21611extern "C"
21612#endif
Skip Montanaro89e975f2007-08-22 19:05:21 +000021613/* We use char because int might match the return type of a gcc2
21614 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021615char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021616int
21617main ()
21618{
Skip Montanaro89e975f2007-08-22 19:05:21 +000021619rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021620 ;
21621 return 0;
21622}
21623_ACEOF
21624rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000021625if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21626 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021627 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021628 grep -v '^ *+' conftest.er1 >conftest.err
21629 rm -f conftest.er1
21630 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000021632 (exit $ac_status); } &&
21633 { ac_try='test -z "$ac_c_werror_flag"
21634 || test ! -s conftest.err'
21635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21636 (eval $ac_try) 2>&5
21637 ac_status=$?
21638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21639 (exit $ac_status); }; } &&
21640 { ac_try='test -s conftest$ac_exeext'
21641 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21642 (eval $ac_try) 2>&5
21643 ac_status=$?
21644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21645 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021646 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000021647else
Martin v. Löwis11437992002-04-12 09:54:03 +000021648 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021649sed 's/^/| /' conftest.$ac_ext >&5
21650
Skip Montanaro89e975f2007-08-22 19:05:21 +000021651ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000021652fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021653rm -f conftest.err conftest.$ac_objext \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021654 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021655LIBS=$ac_check_lib_save_LIBS
21656fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021657echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
21658echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021659if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021660
Martin v. Löwis11437992002-04-12 09:54:03 +000021661cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000021662#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021663_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000021664
Guido van Rossum353ae582001-07-10 16:45:32 +000021665fi
21666
Jack Jansendd19cf82001-12-06 22:36:17 +000021667
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021668# also in readline 4.2
21669cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021670/* confdefs.h. */
21671_ACEOF
21672cat confdefs.h >>conftest.$ac_ext
21673cat >>conftest.$ac_ext <<_ACEOF
21674/* end confdefs.h. */
21675#include <readline/readline.h>
21676_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +000021677if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
21678 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021679 ac_status=$?
21680 grep -v '^ *+' conftest.er1 >conftest.err
21681 rm -f conftest.er1
21682 cat conftest.err >&5
21683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000021684 (exit $ac_status); } >/dev/null; then
21685 if test -s conftest.err; then
21686 ac_cpp_err=$ac_c_preproc_warn_flag
21687 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
21688 else
21689 ac_cpp_err=
21690 fi
21691else
21692 ac_cpp_err=yes
21693fi
21694if test -z "$ac_cpp_err"; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021695 have_readline=yes
21696else
21697 echo "$as_me: failed program was:" >&5
21698sed 's/^/| /' conftest.$ac_ext >&5
21699
21700 have_readline=no
21701fi
21702rm -f conftest.err conftest.$ac_ext
21703if test $have_readline = yes
21704then
21705 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000021706/* confdefs.h. */
21707_ACEOF
21708cat confdefs.h >>conftest.$ac_ext
21709cat >>conftest.$ac_ext <<_ACEOF
21710/* end confdefs.h. */
21711#include <readline/readline.h>
21712
21713_ACEOF
21714if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21715 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
21716
21717cat >>confdefs.h <<\_ACEOF
21718#define HAVE_RL_CATCH_SIGNAL 1
21719_ACEOF
21720
21721fi
21722rm -f conftest*
21723
21724fi
21725
Martin v. Löwis82bca632006-02-10 20:49:30 +000021726# End of readline checks: restore LIBS
21727LIBS=$LIBS_no_readline
21728
Skip Montanaro89e975f2007-08-22 19:05:21 +000021729echo "$as_me:$LINENO: checking for broken nice()" >&5
21730echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021731if test "${ac_cv_broken_nice+set}" = set; then
21732 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000021733else
Martin v. Löwis11437992002-04-12 09:54:03 +000021734
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021735if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000021736 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021737else
Martin v. Löwis11437992002-04-12 09:54:03 +000021738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021739/* confdefs.h. */
21740_ACEOF
21741cat confdefs.h >>conftest.$ac_ext
21742cat >>conftest.$ac_ext <<_ACEOF
21743/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021744
21745int main()
21746{
21747 int val1 = nice(1);
21748 if (val1 != -1 && val1 == nice(2))
21749 exit(0);
21750 exit(1);
21751}
21752
Martin v. Löwis11437992002-04-12 09:54:03 +000021753_ACEOF
21754rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000021755if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21756 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021757 ac_status=$?
21758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21759 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +000021760 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21761 (eval $ac_try) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021762 ac_status=$?
21763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21764 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021765 ac_cv_broken_nice=yes
21766else
Martin v. Löwis11437992002-04-12 09:54:03 +000021767 echo "$as_me: program exited with status $ac_status" >&5
21768echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021769sed 's/^/| /' conftest.$ac_ext >&5
21770
Martin v. Löwis11437992002-04-12 09:54:03 +000021771( exit $ac_status )
21772ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021773fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021774rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21775fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021776fi
21777
Skip Montanaro89e975f2007-08-22 19:05:21 +000021778echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
21779echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021780if test "$ac_cv_broken_nice" = yes
21781then
Martin v. Löwis11437992002-04-12 09:54:03 +000021782
21783cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021784#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021785_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000021786
21787fi
21788
Skip Montanaro89e975f2007-08-22 19:05:21 +000021789echo "$as_me:$LINENO: checking for broken poll()" >&5
21790echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021791if test "$cross_compiling" = yes; then
21792 ac_cv_broken_poll=no
21793else
21794 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021795/* confdefs.h. */
21796_ACEOF
21797cat confdefs.h >>conftest.$ac_ext
21798cat >>conftest.$ac_ext <<_ACEOF
21799/* end confdefs.h. */
21800
21801#include <poll.h>
21802
21803int main (void)
21804 {
21805 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
21806
21807 close (42);
21808
21809 int poll_test = poll (&poll_struct, 1, 0);
21810
21811 if (poll_test < 0)
21812 {
21813 exit(0);
21814 }
21815 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
21816 {
21817 exit(0);
21818 }
21819 else
21820 {
21821 exit(1);
21822 }
21823 }
21824
21825_ACEOF
21826rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000021827if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
21828 (eval $ac_link) 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021829 ac_status=$?
21830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21831 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +000021832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21833 (eval $ac_try) 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021834 ac_status=$?
21835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21836 (exit $ac_status); }; }; then
21837 ac_cv_broken_poll=yes
21838else
21839 echo "$as_me: program exited with status $ac_status" >&5
21840echo "$as_me: failed program was:" >&5
21841sed 's/^/| /' conftest.$ac_ext >&5
21842
21843( exit $ac_status )
21844ac_cv_broken_poll=no
21845fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021846rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021847fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021848echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
21849echo "${ECHO_T}$ac_cv_broken_poll" >&6
Nicholas Bastine62c5c82004-03-21 23:45:42 +000021850if test "$ac_cv_broken_poll" = yes
21851then
21852
21853cat >>confdefs.h <<\_ACEOF
21854#define HAVE_BROKEN_POLL 1
21855_ACEOF
21856
21857fi
21858
Brett Cannon43802422005-02-10 20:48:03 +000021859# 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 +000021860# (which is not required by ISO C or UNIX spec) and/or if we support
21861# tzname[]
Skip Montanaro89e975f2007-08-22 19:05:21 +000021862echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21863echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000021864if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
21865 echo $ECHO_N "(cached) $ECHO_C" >&6
21866else
21867 cat >conftest.$ac_ext <<_ACEOF
21868/* confdefs.h. */
21869_ACEOF
21870cat confdefs.h >>conftest.$ac_ext
21871cat >>conftest.$ac_ext <<_ACEOF
21872/* end confdefs.h. */
21873#include <sys/types.h>
21874#include <$ac_cv_struct_tm>
21875
21876
21877int
21878main ()
21879{
21880static struct tm ac_aggr;
21881if (ac_aggr.tm_zone)
21882return 0;
21883 ;
21884 return 0;
21885}
21886_ACEOF
21887rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000021888if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21889 (eval $ac_compile) 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000021890 ac_status=$?
21891 grep -v '^ *+' conftest.er1 >conftest.err
21892 rm -f conftest.er1
21893 cat conftest.err >&5
21894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000021895 (exit $ac_status); } &&
21896 { ac_try='test -z "$ac_c_werror_flag"
21897 || test ! -s conftest.err'
21898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21899 (eval $ac_try) 2>&5
21900 ac_status=$?
21901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21902 (exit $ac_status); }; } &&
21903 { ac_try='test -s conftest.$ac_objext'
21904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21905 (eval $ac_try) 2>&5
21906 ac_status=$?
21907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21908 (exit $ac_status); }; }; then
Brett Cannon43802422005-02-10 20:48:03 +000021909 ac_cv_member_struct_tm_tm_zone=yes
21910else
21911 echo "$as_me: failed program was:" >&5
21912sed 's/^/| /' conftest.$ac_ext >&5
21913
Skip Montanaro89e975f2007-08-22 19:05:21 +000021914cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000021915/* confdefs.h. */
21916_ACEOF
21917cat confdefs.h >>conftest.$ac_ext
21918cat >>conftest.$ac_ext <<_ACEOF
21919/* end confdefs.h. */
21920#include <sys/types.h>
21921#include <$ac_cv_struct_tm>
21922
21923
21924int
21925main ()
21926{
21927static struct tm ac_aggr;
21928if (sizeof ac_aggr.tm_zone)
21929return 0;
21930 ;
21931 return 0;
21932}
21933_ACEOF
21934rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000021935if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
21936 (eval $ac_compile) 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000021937 ac_status=$?
21938 grep -v '^ *+' conftest.er1 >conftest.err
21939 rm -f conftest.er1
21940 cat conftest.err >&5
21941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000021942 (exit $ac_status); } &&
21943 { ac_try='test -z "$ac_c_werror_flag"
21944 || test ! -s conftest.err'
21945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21946 (eval $ac_try) 2>&5
21947 ac_status=$?
21948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21949 (exit $ac_status); }; } &&
21950 { ac_try='test -s conftest.$ac_objext'
21951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
21952 (eval $ac_try) 2>&5
21953 ac_status=$?
21954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21955 (exit $ac_status); }; }; then
Brett Cannon43802422005-02-10 20:48:03 +000021956 ac_cv_member_struct_tm_tm_zone=yes
21957else
21958 echo "$as_me: failed program was:" >&5
21959sed 's/^/| /' conftest.$ac_ext >&5
21960
Skip Montanaro89e975f2007-08-22 19:05:21 +000021961ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000021962fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021963rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000021964fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021965rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000021966fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000021967echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21968echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
Brett Cannon43802422005-02-10 20:48:03 +000021969if test $ac_cv_member_struct_tm_tm_zone = yes; then
21970
21971cat >>confdefs.h <<_ACEOF
21972#define HAVE_STRUCT_TM_TM_ZONE 1
21973_ACEOF
21974
21975
21976fi
21977
21978if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21979
21980cat >>confdefs.h <<\_ACEOF
21981#define HAVE_TM_ZONE 1
21982_ACEOF
21983
21984else
Skip Montanaro89e975f2007-08-22 19:05:21 +000021985 echo "$as_me:$LINENO: checking for tzname" >&5
21986echo $ECHO_N "checking for tzname... $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000021987if test "${ac_cv_var_tzname+set}" = set; then
21988 echo $ECHO_N "(cached) $ECHO_C" >&6
21989else
21990 cat >conftest.$ac_ext <<_ACEOF
21991/* confdefs.h. */
21992_ACEOF
21993cat confdefs.h >>conftest.$ac_ext
21994cat >>conftest.$ac_ext <<_ACEOF
21995/* end confdefs.h. */
21996#include <time.h>
Skip Montanaro89e975f2007-08-22 19:05:21 +000021997#ifndef tzname /* For SGI. */
21998extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Brett Cannon43802422005-02-10 20:48:03 +000021999#endif
22000
22001int
22002main ()
22003{
Skip Montanaro89e975f2007-08-22 19:05:21 +000022004atoi(*tzname);
Brett Cannon43802422005-02-10 20:48:03 +000022005 ;
22006 return 0;
22007}
22008_ACEOF
22009rm -f conftest.$ac_objext conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000022010if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22011 (eval $ac_link) 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000022012 ac_status=$?
22013 grep -v '^ *+' conftest.er1 >conftest.err
22014 rm -f conftest.er1
22015 cat conftest.err >&5
22016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000022017 (exit $ac_status); } &&
22018 { ac_try='test -z "$ac_c_werror_flag"
22019 || test ! -s conftest.err'
22020 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22021 (eval $ac_try) 2>&5
22022 ac_status=$?
22023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22024 (exit $ac_status); }; } &&
22025 { ac_try='test -s conftest$ac_exeext'
22026 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22027 (eval $ac_try) 2>&5
22028 ac_status=$?
22029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22030 (exit $ac_status); }; }; then
Brett Cannon43802422005-02-10 20:48:03 +000022031 ac_cv_var_tzname=yes
22032else
22033 echo "$as_me: failed program was:" >&5
22034sed 's/^/| /' conftest.$ac_ext >&5
22035
Skip Montanaro89e975f2007-08-22 19:05:21 +000022036ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000022037fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000022038rm -f conftest.err conftest.$ac_objext \
Brett Cannon43802422005-02-10 20:48:03 +000022039 conftest$ac_exeext conftest.$ac_ext
22040fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000022041echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
22042echo "${ECHO_T}$ac_cv_var_tzname" >&6
Brett Cannon43802422005-02-10 20:48:03 +000022043 if test $ac_cv_var_tzname = yes; then
22044
22045cat >>confdefs.h <<\_ACEOF
22046#define HAVE_TZNAME 1
22047_ACEOF
22048
22049 fi
22050fi
22051
Nicholas Bastine62c5c82004-03-21 23:45:42 +000022052
Martin v. Löwis1d459062005-03-14 21:23:33 +000022053# check tzset(3) exists and works like we expect it to
Skip Montanaro89e975f2007-08-22 19:05:21 +000022054echo "$as_me:$LINENO: checking for working tzset()" >&5
22055echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022056if test "${ac_cv_working_tzset+set}" = set; then
22057 echo $ECHO_N "(cached) $ECHO_C" >&6
22058else
22059
22060if test "$cross_compiling" = yes; then
22061 ac_cv_working_tzset=no
22062else
22063 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022064/* confdefs.h. */
22065_ACEOF
22066cat confdefs.h >>conftest.$ac_ext
22067cat >>conftest.$ac_ext <<_ACEOF
22068/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022069
22070#include <stdlib.h>
22071#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000022072#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000022073
22074#if HAVE_TZNAME
22075extern char *tzname[];
22076#endif
22077
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022078int main()
22079{
Brett Cannon18367812003-09-19 00:59:16 +000022080 /* Note that we need to ensure that not only does tzset(3)
22081 do 'something' with localtime, but it works as documented
22082 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000022083 This includes making sure that tzname is set properly if
22084 tm->tm_zone does not exist since it is the alternative way
22085 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000022086
22087 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000022088 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000022089 */
22090
Martin v. Löwis1d459062005-03-14 21:23:33 +000022091 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000022092 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
22093
Neal Norwitz7f2588c2003-04-11 15:35:53 +000022094 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022095 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000022096 if (localtime(&groundhogday)->tm_hour != 0)
22097 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022098#if HAVE_TZNAME
22099 /* For UTC, tzname[1] is sometimes "", sometimes " " */
22100 if (strcmp(tzname[0], "UTC") ||
22101 (tzname[1][0] != 0 && tzname[1][0] != ' '))
22102 exit(1);
22103#endif
Brett Cannon18367812003-09-19 00:59:16 +000022104
Neal Norwitz7f2588c2003-04-11 15:35:53 +000022105 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022106 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000022107 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022108 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022109#if HAVE_TZNAME
22110 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
22111 exit(1);
22112#endif
Brett Cannon18367812003-09-19 00:59:16 +000022113
22114 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
22115 tzset();
22116 if (localtime(&groundhogday)->tm_hour != 11)
22117 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022118#if HAVE_TZNAME
22119 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
22120 exit(1);
22121#endif
22122
22123#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000022124 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
22125 exit(1);
22126 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
22127 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000022128#endif
Brett Cannon18367812003-09-19 00:59:16 +000022129
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022130 exit(0);
22131}
22132
22133_ACEOF
22134rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000022135if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22136 (eval $ac_link) 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022137 ac_status=$?
22138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22139 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +000022140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22141 (eval $ac_try) 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022142 ac_status=$?
22143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22144 (exit $ac_status); }; }; then
22145 ac_cv_working_tzset=yes
22146else
22147 echo "$as_me: program exited with status $ac_status" >&5
22148echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022149sed 's/^/| /' conftest.$ac_ext >&5
22150
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022151( exit $ac_status )
22152ac_cv_working_tzset=no
22153fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000022154rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22155fi
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022156fi
22157
Skip Montanaro89e975f2007-08-22 19:05:21 +000022158echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
22159echo "${ECHO_T}$ac_cv_working_tzset" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000022160if test "$ac_cv_working_tzset" = yes
22161then
22162
22163cat >>confdefs.h <<\_ACEOF
22164#define HAVE_WORKING_TZSET 1
22165_ACEOF
22166
22167fi
22168
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022169# Look for subsecond timestamps in struct stat
Skip Montanaro89e975f2007-08-22 19:05:21 +000022170echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
22171echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022172if test "${ac_cv_stat_tv_nsec+set}" = set; then
22173 echo $ECHO_N "(cached) $ECHO_C" >&6
22174else
22175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022176/* confdefs.h. */
22177_ACEOF
22178cat confdefs.h >>conftest.$ac_ext
22179cat >>conftest.$ac_ext <<_ACEOF
22180/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022181#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022182int
22183main ()
22184{
22185
22186struct stat st;
22187st.st_mtim.tv_nsec = 1;
22188
22189 ;
22190 return 0;
22191}
22192_ACEOF
22193rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000022194if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22195 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022197 grep -v '^ *+' conftest.er1 >conftest.err
22198 rm -f conftest.er1
22199 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000022201 (exit $ac_status); } &&
22202 { ac_try='test -z "$ac_c_werror_flag"
22203 || test ! -s conftest.err'
22204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22205 (eval $ac_try) 2>&5
22206 ac_status=$?
22207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22208 (exit $ac_status); }; } &&
22209 { ac_try='test -s conftest.$ac_objext'
22210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22211 (eval $ac_try) 2>&5
22212 ac_status=$?
22213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22214 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000022215 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022216else
22217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022218sed 's/^/| /' conftest.$ac_ext >&5
22219
Skip Montanaro89e975f2007-08-22 19:05:21 +000022220ac_cv_stat_tv_nsec=no
22221fi
22222rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022223fi
22224
Skip Montanaro89e975f2007-08-22 19:05:21 +000022225echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
22226echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000022227if test "$ac_cv_stat_tv_nsec" = yes
22228then
22229
22230cat >>confdefs.h <<\_ACEOF
22231#define HAVE_STAT_TV_NSEC 1
22232_ACEOF
22233
22234fi
22235
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022236# Look for BSD style subsecond timestamps in struct stat
Skip Montanaro89e975f2007-08-22 19:05:21 +000022237echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
22238echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022239if test "${ac_cv_stat_tv_nsec2+set}" = set; then
22240 echo $ECHO_N "(cached) $ECHO_C" >&6
22241else
22242 cat >conftest.$ac_ext <<_ACEOF
22243/* confdefs.h. */
22244_ACEOF
22245cat confdefs.h >>conftest.$ac_ext
22246cat >>conftest.$ac_ext <<_ACEOF
22247/* end confdefs.h. */
22248#include <sys/stat.h>
22249int
22250main ()
22251{
22252
22253struct stat st;
22254st.st_mtimespec.tv_nsec = 1;
22255
22256 ;
22257 return 0;
22258}
22259_ACEOF
22260rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000022261if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22262 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022263 ac_status=$?
22264 grep -v '^ *+' conftest.er1 >conftest.err
22265 rm -f conftest.er1
22266 cat conftest.err >&5
22267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000022268 (exit $ac_status); } &&
22269 { ac_try='test -z "$ac_c_werror_flag"
22270 || test ! -s conftest.err'
22271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22272 (eval $ac_try) 2>&5
22273 ac_status=$?
22274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22275 (exit $ac_status); }; } &&
22276 { ac_try='test -s conftest.$ac_objext'
22277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22278 (eval $ac_try) 2>&5
22279 ac_status=$?
22280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22281 (exit $ac_status); }; }; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022282 ac_cv_stat_tv_nsec2=yes
22283else
22284 echo "$as_me: failed program was:" >&5
22285sed 's/^/| /' conftest.$ac_ext >&5
22286
Skip Montanaro89e975f2007-08-22 19:05:21 +000022287ac_cv_stat_tv_nsec2=no
22288fi
22289rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022290fi
22291
Skip Montanaro89e975f2007-08-22 19:05:21 +000022292echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
22293echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022294if test "$ac_cv_stat_tv_nsec2" = yes
22295then
22296
22297cat >>confdefs.h <<\_ACEOF
22298#define HAVE_STAT_TV_NSEC2 1
22299_ACEOF
22300
22301fi
22302
Jack Jansen666b1e72001-10-31 12:11:48 +000022303# On HP/UX 11.0, mvwdelch is a block with a return statement
Skip Montanaro89e975f2007-08-22 19:05:21 +000022304echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
22305echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022306if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
22307 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000022308else
Martin v. Löwis11437992002-04-12 09:54:03 +000022309 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022310/* confdefs.h. */
22311_ACEOF
22312cat confdefs.h >>conftest.$ac_ext
22313cat >>conftest.$ac_ext <<_ACEOF
22314/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000022315#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022316int
22317main ()
22318{
Jack Jansen666b1e72001-10-31 12:11:48 +000022319
22320 int rtn;
22321 rtn = mvwdelch(0,0,0);
22322
Martin v. Löwis11437992002-04-12 09:54:03 +000022323 ;
22324 return 0;
22325}
22326_ACEOF
22327rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000022328if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22329 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022330 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022331 grep -v '^ *+' conftest.er1 >conftest.err
22332 rm -f conftest.er1
22333 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000022335 (exit $ac_status); } &&
22336 { ac_try='test -z "$ac_c_werror_flag"
22337 || test ! -s conftest.err'
22338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22339 (eval $ac_try) 2>&5
22340 ac_status=$?
22341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22342 (exit $ac_status); }; } &&
22343 { ac_try='test -s conftest.$ac_objext'
22344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22345 (eval $ac_try) 2>&5
22346 ac_status=$?
22347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22348 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000022349 ac_cv_mvwdelch_is_expression=yes
22350else
Martin v. Löwis11437992002-04-12 09:54:03 +000022351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022352sed 's/^/| /' conftest.$ac_ext >&5
22353
Skip Montanaro89e975f2007-08-22 19:05:21 +000022354ac_cv_mvwdelch_is_expression=no
22355fi
22356rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000022357fi
22358
Skip Montanaro89e975f2007-08-22 19:05:21 +000022359echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
22360echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000022361
22362if test "$ac_cv_mvwdelch_is_expression" = yes
22363then
Martin v. Löwis11437992002-04-12 09:54:03 +000022364
22365cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000022366#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022367_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000022368
22369fi
22370
Skip Montanaro89e975f2007-08-22 19:05:21 +000022371echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
22372echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022373if test "${ac_cv_window_has_flags+set}" = set; then
22374 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000022375else
Martin v. Löwis11437992002-04-12 09:54:03 +000022376 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022377/* confdefs.h. */
22378_ACEOF
22379cat confdefs.h >>conftest.$ac_ext
22380cat >>conftest.$ac_ext <<_ACEOF
22381/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000022382#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022383int
22384main ()
22385{
Jack Jansen666b1e72001-10-31 12:11:48 +000022386
22387 WINDOW *w;
22388 w->_flags = 0;
22389
Martin v. Löwis11437992002-04-12 09:54:03 +000022390 ;
22391 return 0;
22392}
22393_ACEOF
22394rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000022395if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22396 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022397 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022398 grep -v '^ *+' conftest.er1 >conftest.err
22399 rm -f conftest.er1
22400 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022401 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000022402 (exit $ac_status); } &&
22403 { ac_try='test -z "$ac_c_werror_flag"
22404 || test ! -s conftest.err'
22405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22406 (eval $ac_try) 2>&5
22407 ac_status=$?
22408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22409 (exit $ac_status); }; } &&
22410 { ac_try='test -s conftest.$ac_objext'
22411 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22412 (eval $ac_try) 2>&5
22413 ac_status=$?
22414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22415 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000022416 ac_cv_window_has_flags=yes
22417else
Martin v. Löwis11437992002-04-12 09:54:03 +000022418 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022419sed 's/^/| /' conftest.$ac_ext >&5
22420
Skip Montanaro89e975f2007-08-22 19:05:21 +000022421ac_cv_window_has_flags=no
22422fi
22423rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000022424fi
22425
Skip Montanaro89e975f2007-08-22 19:05:21 +000022426echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
22427echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000022428
Jack Jansen666b1e72001-10-31 12:11:48 +000022429
22430if test "$ac_cv_window_has_flags" = yes
22431then
Martin v. Löwis11437992002-04-12 09:54:03 +000022432
22433cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000022434#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022435_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000022436
22437fi
22438
Skip Montanaro89e975f2007-08-22 19:05:21 +000022439echo "$as_me:$LINENO: checking for is_term_resized" >&5
22440echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6
Walter Dörwald4994d952006-06-19 08:07:50 +000022441cat >conftest.$ac_ext <<_ACEOF
22442/* confdefs.h. */
22443_ACEOF
22444cat confdefs.h >>conftest.$ac_ext
22445cat >>conftest.$ac_ext <<_ACEOF
22446/* end confdefs.h. */
22447#include <curses.h>
22448int
22449main ()
22450{
22451void *x=is_term_resized
22452 ;
22453 return 0;
22454}
22455_ACEOF
22456rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000022457if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22458 (eval $ac_compile) 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000022459 ac_status=$?
22460 grep -v '^ *+' conftest.er1 >conftest.err
22461 rm -f conftest.er1
22462 cat conftest.err >&5
22463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000022464 (exit $ac_status); } &&
22465 { ac_try='test -z "$ac_c_werror_flag"
22466 || test ! -s conftest.err'
22467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22468 (eval $ac_try) 2>&5
22469 ac_status=$?
22470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22471 (exit $ac_status); }; } &&
22472 { ac_try='test -s conftest.$ac_objext'
22473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22474 (eval $ac_try) 2>&5
22475 ac_status=$?
22476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22477 (exit $ac_status); }; }; then
Walter Dörwald4994d952006-06-19 08:07:50 +000022478
22479cat >>confdefs.h <<\_ACEOF
22480#define HAVE_CURSES_IS_TERM_RESIZED 1
22481_ACEOF
22482
Skip Montanaro89e975f2007-08-22 19:05:21 +000022483 echo "$as_me:$LINENO: result: yes" >&5
22484echo "${ECHO_T}yes" >&6
Walter Dörwald4994d952006-06-19 08:07:50 +000022485else
22486 echo "$as_me: failed program was:" >&5
22487sed 's/^/| /' conftest.$ac_ext >&5
22488
Skip Montanaro89e975f2007-08-22 19:05:21 +000022489echo "$as_me:$LINENO: result: no" >&5
22490echo "${ECHO_T}no" >&6
Walter Dörwald4994d952006-06-19 08:07:50 +000022491
22492fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000022493rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000022494
Skip Montanaro89e975f2007-08-22 19:05:21 +000022495echo "$as_me:$LINENO: checking for resize_term" >&5
22496echo $ECHO_N "checking for resize_term... $ECHO_C" >&6
Walter Dörwald4994d952006-06-19 08:07:50 +000022497cat >conftest.$ac_ext <<_ACEOF
22498/* confdefs.h. */
22499_ACEOF
22500cat confdefs.h >>conftest.$ac_ext
22501cat >>conftest.$ac_ext <<_ACEOF
22502/* end confdefs.h. */
22503#include <curses.h>
22504int
22505main ()
22506{
22507void *x=resize_term
22508 ;
22509 return 0;
22510}
22511_ACEOF
22512rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000022513if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22514 (eval $ac_compile) 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000022515 ac_status=$?
22516 grep -v '^ *+' conftest.er1 >conftest.err
22517 rm -f conftest.er1
22518 cat conftest.err >&5
22519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000022520 (exit $ac_status); } &&
22521 { ac_try='test -z "$ac_c_werror_flag"
22522 || test ! -s conftest.err'
22523 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22524 (eval $ac_try) 2>&5
22525 ac_status=$?
22526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22527 (exit $ac_status); }; } &&
22528 { ac_try='test -s conftest.$ac_objext'
22529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22530 (eval $ac_try) 2>&5
22531 ac_status=$?
22532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22533 (exit $ac_status); }; }; then
Walter Dörwald4994d952006-06-19 08:07:50 +000022534
22535cat >>confdefs.h <<\_ACEOF
22536#define HAVE_CURSES_RESIZE_TERM 1
22537_ACEOF
22538
Skip Montanaro89e975f2007-08-22 19:05:21 +000022539 echo "$as_me:$LINENO: result: yes" >&5
22540echo "${ECHO_T}yes" >&6
Walter Dörwald4994d952006-06-19 08:07:50 +000022541else
22542 echo "$as_me: failed program was:" >&5
22543sed 's/^/| /' conftest.$ac_ext >&5
22544
Skip Montanaro89e975f2007-08-22 19:05:21 +000022545echo "$as_me:$LINENO: result: no" >&5
22546echo "${ECHO_T}no" >&6
Walter Dörwald4994d952006-06-19 08:07:50 +000022547
22548fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000022549rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000022550
Skip Montanaro89e975f2007-08-22 19:05:21 +000022551echo "$as_me:$LINENO: checking for resizeterm" >&5
22552echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6
Walter Dörwald4994d952006-06-19 08:07:50 +000022553cat >conftest.$ac_ext <<_ACEOF
22554/* confdefs.h. */
22555_ACEOF
22556cat confdefs.h >>conftest.$ac_ext
22557cat >>conftest.$ac_ext <<_ACEOF
22558/* end confdefs.h. */
22559#include <curses.h>
22560int
22561main ()
22562{
22563void *x=resizeterm
22564 ;
22565 return 0;
22566}
22567_ACEOF
22568rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000022569if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22570 (eval $ac_compile) 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000022571 ac_status=$?
22572 grep -v '^ *+' conftest.er1 >conftest.err
22573 rm -f conftest.er1
22574 cat conftest.err >&5
22575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000022576 (exit $ac_status); } &&
22577 { ac_try='test -z "$ac_c_werror_flag"
22578 || test ! -s conftest.err'
22579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22580 (eval $ac_try) 2>&5
22581 ac_status=$?
22582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22583 (exit $ac_status); }; } &&
22584 { ac_try='test -s conftest.$ac_objext'
22585 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22586 (eval $ac_try) 2>&5
22587 ac_status=$?
22588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22589 (exit $ac_status); }; }; then
Walter Dörwald4994d952006-06-19 08:07:50 +000022590
22591cat >>confdefs.h <<\_ACEOF
22592#define HAVE_CURSES_RESIZETERM 1
22593_ACEOF
22594
Skip Montanaro89e975f2007-08-22 19:05:21 +000022595 echo "$as_me:$LINENO: result: yes" >&5
22596echo "${ECHO_T}yes" >&6
Walter Dörwald4994d952006-06-19 08:07:50 +000022597else
22598 echo "$as_me: failed program was:" >&5
22599sed 's/^/| /' conftest.$ac_ext >&5
22600
Skip Montanaro89e975f2007-08-22 19:05:21 +000022601echo "$as_me:$LINENO: result: no" >&5
22602echo "${ECHO_T}no" >&6
Walter Dörwald4994d952006-06-19 08:07:50 +000022603
22604fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000022605rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Walter Dörwald4994d952006-06-19 08:07:50 +000022606
Skip Montanaro89e975f2007-08-22 19:05:21 +000022607echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
22608echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
Martin v. Löwisfefbc202006-10-17 18:59:23 +000022609
22610if test -r /dev/ptmx
22611then
Skip Montanaro89e975f2007-08-22 19:05:21 +000022612 echo "$as_me:$LINENO: result: yes" >&5
22613echo "${ECHO_T}yes" >&6
Martin v. Löwis24a880b2002-12-31 12:55:15 +000022614
22615cat >>confdefs.h <<\_ACEOF
22616#define HAVE_DEV_PTMX 1
22617_ACEOF
22618
Martin v. Löwisfefbc202006-10-17 18:59:23 +000022619else
Skip Montanaro89e975f2007-08-22 19:05:21 +000022620 echo "$as_me:$LINENO: result: no" >&5
22621echo "${ECHO_T}no" >&6
Martin v. Löwis24a880b2002-12-31 12:55:15 +000022622fi
22623
Skip Montanaro89e975f2007-08-22 19:05:21 +000022624echo "$as_me:$LINENO: checking for /dev/ptc" >&5
22625echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
Martin v. Löwisfefbc202006-10-17 18:59:23 +000022626
22627if test -r /dev/ptc
22628then
Skip Montanaro89e975f2007-08-22 19:05:21 +000022629 echo "$as_me:$LINENO: result: yes" >&5
22630echo "${ECHO_T}yes" >&6
Neal Norwitz865400f2003-03-21 01:42:58 +000022631
22632cat >>confdefs.h <<\_ACEOF
22633#define HAVE_DEV_PTC 1
22634_ACEOF
22635
Martin v. Löwisfefbc202006-10-17 18:59:23 +000022636else
Skip Montanaro89e975f2007-08-22 19:05:21 +000022637 echo "$as_me:$LINENO: result: no" >&5
22638echo "${ECHO_T}no" >&6
Neal Norwitz865400f2003-03-21 01:42:58 +000022639fi
22640
Skip Montanaro89e975f2007-08-22 19:05:21 +000022641echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
22642echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6
Brett Cannon09d12362006-05-11 05:11:33 +000022643if test "$cross_compiling" = yes; then
22644 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
22645See \`config.log' for more details." >&5
22646echo "$as_me: error: cannot run test program while cross compiling
22647See \`config.log' for more details." >&2;}
22648 { (exit 1); exit 1; }; }
22649else
22650 cat >conftest.$ac_ext <<_ACEOF
22651/* confdefs.h. */
22652_ACEOF
22653cat confdefs.h >>conftest.$ac_ext
22654cat >>conftest.$ac_ext <<_ACEOF
22655/* end confdefs.h. */
22656#include <stdio.h>
22657#include <stddef.h>
22658#include <string.h>
22659
22660int main()
22661{
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000022662 char buffer[256];
22663
22664#ifdef HAVE_SSIZE_T
22665typedef ssize_t Py_ssize_t;
22666#elif SIZEOF_VOID_P == SIZEOF_LONG
22667typedef long Py_ssize_t;
22668#else
22669typedef int Py_ssize_t;
22670#endif
Brett Cannon09d12362006-05-11 05:11:33 +000022671
22672 if(sprintf(buffer, "%zd", (size_t)123) < 0)
22673 return 1;
22674
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000022675 if (strcmp(buffer, "123"))
22676 return 1;
22677
22678 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
22679 return 1;
22680
22681 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000022682 return 1;
22683
22684 return 0;
22685}
22686_ACEOF
22687rm -f conftest$ac_exeext
Skip Montanaro89e975f2007-08-22 19:05:21 +000022688if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
22689 (eval $ac_link) 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000022690 ac_status=$?
22691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22692 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Skip Montanaro89e975f2007-08-22 19:05:21 +000022693 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22694 (eval $ac_try) 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000022695 ac_status=$?
22696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22697 (exit $ac_status); }; }; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000022698 echo "$as_me:$LINENO: result: yes" >&5
22699echo "${ECHO_T}yes" >&6
Brett Cannon09d12362006-05-11 05:11:33 +000022700
22701cat >>confdefs.h <<\_ACEOF
22702#define PY_FORMAT_SIZE_T "z"
22703_ACEOF
22704
22705else
22706 echo "$as_me: program exited with status $ac_status" >&5
22707echo "$as_me: failed program was:" >&5
22708sed 's/^/| /' conftest.$ac_ext >&5
22709
22710( exit $ac_status )
Skip Montanaro89e975f2007-08-22 19:05:21 +000022711echo "$as_me:$LINENO: result: no" >&5
22712echo "${ECHO_T}no" >&6
Brett Cannon09d12362006-05-11 05:11:33 +000022713fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000022714rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000022715fi
22716
Skip Montanaro89e975f2007-08-22 19:05:21 +000022717echo "$as_me:$LINENO: checking for socklen_t" >&5
22718echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022719if test "${ac_cv_type_socklen_t+set}" = set; then
22720 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000022721else
Martin v. Löwis11437992002-04-12 09:54:03 +000022722 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022723/* confdefs.h. */
22724_ACEOF
22725cat confdefs.h >>conftest.$ac_ext
22726cat >>conftest.$ac_ext <<_ACEOF
22727/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000022728
22729#ifdef HAVE_SYS_TYPES_H
22730#include <sys/types.h>
22731#endif
22732#ifdef HAVE_SYS_SOCKET_H
22733#include <sys/socket.h>
22734#endif
22735
22736
Martin v. Löwis11437992002-04-12 09:54:03 +000022737int
22738main ()
22739{
Skip Montanaro89e975f2007-08-22 19:05:21 +000022740if ((socklen_t *) 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022741 return 0;
Skip Montanaro89e975f2007-08-22 19:05:21 +000022742if (sizeof (socklen_t))
Martin v. Löwis11437992002-04-12 09:54:03 +000022743 return 0;
22744 ;
22745 return 0;
22746}
22747_ACEOF
22748rm -f conftest.$ac_objext
Skip Montanaro89e975f2007-08-22 19:05:21 +000022749if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
22750 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022751 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022752 grep -v '^ *+' conftest.er1 >conftest.err
22753 rm -f conftest.er1
22754 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000022756 (exit $ac_status); } &&
22757 { ac_try='test -z "$ac_c_werror_flag"
22758 || test ! -s conftest.err'
22759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22760 (eval $ac_try) 2>&5
22761 ac_status=$?
22762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22763 (exit $ac_status); }; } &&
22764 { ac_try='test -s conftest.$ac_objext'
22765 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
22766 (eval $ac_try) 2>&5
22767 ac_status=$?
22768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22769 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000022770 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000022771else
Martin v. Löwis11437992002-04-12 09:54:03 +000022772 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022773sed 's/^/| /' conftest.$ac_ext >&5
22774
Skip Montanaro89e975f2007-08-22 19:05:21 +000022775ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000022776fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000022777rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022778fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000022779echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
22780echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022781if test $ac_cv_type_socklen_t = yes; then
22782 :
22783else
Guido van Rossum95713eb2000-05-18 20:53:31 +000022784
Martin v. Löwis01c04012002-11-11 14:58:44 +000022785cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000022786#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000022787_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000022788
22789fi
22790
Michael W. Hudson54241132001-12-07 15:38:26 +000022791
Michael W. Hudson54241132001-12-07 15:38:26 +000022792
22793
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000022794for h in `(cd $srcdir;echo Python/thread_*.h)`
22795do
22796 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
22797done
22798
Michael W. Hudson54241132001-12-07 15:38:26 +000022799
Neal Norwitzd24499d2005-12-18 21:36:39 +000022800SRCDIRS="Parser Grammar Objects Python Modules Mac"
Skip Montanaro89e975f2007-08-22 19:05:21 +000022801echo "$as_me:$LINENO: checking for build directories" >&5
22802echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000022803for dir in $SRCDIRS; do
22804 if test ! -d $dir; then
22805 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000022806 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000022807done
Skip Montanaro89e975f2007-08-22 19:05:21 +000022808echo "$as_me:$LINENO: result: done" >&5
22809echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000022810
Guido van Rossum627b2d71993-12-24 10:39:16 +000022811# generate output files
Skip Montanaro89e975f2007-08-22 19:05:21 +000022812 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000022813
Martin v. Löwis11437992002-04-12 09:54:03 +000022814cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022815# This file is a shell script that caches the results of configure
22816# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000022817# scripts and configure runs, see configure's option --config-cache.
22818# It is not useful on other systems. If it contains results you don't
22819# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022820#
Martin v. Löwis11437992002-04-12 09:54:03 +000022821# config.status only pays attention to the cache file if you give it
22822# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022823#
Skip Montanaro6dead952003-09-25 14:50:04 +000022824# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000022825# loading this file, other *unset* `ac_cv_foo' will be assigned the
22826# following values.
22827
22828_ACEOF
22829
Guido van Rossumf78abae1997-01-21 22:02:36 +000022830# The following way of writing the cache mishandles newlines in values,
22831# but we know of no workaround that is simple, portable, and efficient.
Skip Montanaro89e975f2007-08-22 19:05:21 +000022832# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022833# Ultrix sh set writes to stderr and can't be redirected directly,
22834# and sets the high bit in the cache file unless we assign to the vars.
Skip Montanaro89e975f2007-08-22 19:05:21 +000022835{
Martin v. Löwis11437992002-04-12 09:54:03 +000022836 (set) 2>&1 |
Skip Montanaro89e975f2007-08-22 19:05:21 +000022837 case `(ac_space=' '; set | grep ac_space) 2>&1` in
22838 *ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000022839 # `set' does not quote correctly, so add quotes (double-quote
22840 # substitution turns \\\\ into \\, and sed turns \\ into \).
22841 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022842 "s/'/'\\\\''/g;
22843 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +000022844 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022845 *)
22846 # `set' quotes correctly as required by POSIX, so do not add quotes.
Skip Montanaro89e975f2007-08-22 19:05:21 +000022847 sed -n \
22848 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000022849 ;;
Skip Montanaro89e975f2007-08-22 19:05:21 +000022850 esac;
22851} |
Martin v. Löwis11437992002-04-12 09:54:03 +000022852 sed '
22853 t clear
Skip Montanaro89e975f2007-08-22 19:05:21 +000022854 : clear
Martin v. Löwis11437992002-04-12 09:54:03 +000022855 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22856 t end
Skip Montanaro89e975f2007-08-22 19:05:21 +000022857 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22858 : end' >>confcache
22859if diff $cache_file confcache >/dev/null 2>&1; then :; else
22860 if test -w $cache_file; then
22861 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
Martin v. Löwis11437992002-04-12 09:54:03 +000022862 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022863 else
Skip Montanaro89e975f2007-08-22 19:05:21 +000022864 echo "not updating unwritable cache $cache_file"
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022865 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022866fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022867rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000022868
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022869test "x$prefix" = xNONE && prefix=$ac_default_prefix
22870# Let make expand exec_prefix.
22871test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000022872
Skip Montanaro89e975f2007-08-22 19:05:21 +000022873# VPATH may cause trouble with some makes, so we remove $(srcdir),
22874# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22875# trailing colons and then remove the whole line if VPATH becomes empty
22876# (actually we leave an empty line to preserve line numbers).
22877if test "x$srcdir" = x.; then
22878 ac_vpsub='/^[ ]*VPATH[ ]*=/{
22879s/:*\$(srcdir):*/:/;
22880s/:*\${srcdir}:*/:/;
22881s/:*@srcdir@:*/:/;
22882s/^\([^=]*=[ ]*\):*/\1/;
22883s/:*$//;
22884s/^[^=]*=[ ]*$//;
22885}'
22886fi
22887
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022888DEFS=-DHAVE_CONFIG_H
22889
Skip Montanaro6dead952003-09-25 14:50:04 +000022890ac_libobjs=
22891ac_ltlibobjs=
22892for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
22893 # 1. Remove the extension, and $U if already installed.
Skip Montanaro89e975f2007-08-22 19:05:21 +000022894 ac_i=`echo "$ac_i" |
22895 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
22896 # 2. Add them.
22897 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
22898 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000022899done
22900LIBOBJS=$ac_libobjs
22901
22902LTLIBOBJS=$ac_ltlibobjs
22903
22904
Martin v. Löwis11437992002-04-12 09:54:03 +000022905
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022906: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000022907ac_clean_files_save=$ac_clean_files
22908ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22909{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
22910echo "$as_me: creating $CONFIG_STATUS" >&6;}
22911cat >$CONFIG_STATUS <<_ACEOF
22912#! $SHELL
22913# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000022914# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022915# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000022916# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000022917
Martin v. Löwis11437992002-04-12 09:54:03 +000022918debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000022919ac_cs_recheck=false
22920ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000022921SHELL=\${CONFIG_SHELL-$SHELL}
22922_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000022923
Martin v. Löwis11437992002-04-12 09:54:03 +000022924cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000022925## --------------------- ##
22926## M4sh Initialization. ##
22927## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000022928
Skip Montanaro89e975f2007-08-22 19:05:21 +000022929# Be Bourne compatible
Martin v. Löwis11437992002-04-12 09:54:03 +000022930if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22931 emulate sh
22932 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000022933 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
22934 # is contrary to our usage. Disable this feature.
22935 alias -g '${1+"$@"}'='"$@"'
Skip Montanaro89e975f2007-08-22 19:05:21 +000022936elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22937 set -o posix
22938fi
22939DUALCASE=1; export DUALCASE # for MKS sh
Brett Cannon19fab762007-06-02 03:02:29 +000022940
Skip Montanaro89e975f2007-08-22 19:05:21 +000022941# Support unset when possible.
22942if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
22943 as_unset=unset
22944else
22945 as_unset=false
Martin v. Löwis11437992002-04-12 09:54:03 +000022946fi
Michael W. Hudson54241132001-12-07 15:38:26 +000022947
Skip Montanaro6dead952003-09-25 14:50:04 +000022948
Skip Montanaro89e975f2007-08-22 19:05:21 +000022949# Work around bugs in pre-3.0 UWIN ksh.
22950$as_unset ENV MAIL MAILPATH
22951PS1='$ '
22952PS2='> '
22953PS4='+ '
22954
22955# NLS nuisances.
22956for as_var in \
22957 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
22958 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
22959 LC_TELEPHONE LC_TIME
22960do
22961 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
22962 eval $as_var=C; export $as_var
22963 else
22964 $as_unset $as_var
22965 fi
22966done
22967
22968# Required to use basename.
22969if expr a : '\(a\)' >/dev/null 2>&1; then
22970 as_expr=expr
22971else
22972 as_expr=false
22973fi
22974
22975if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
22976 as_basename=basename
22977else
22978 as_basename=false
22979fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022980
22981
Skip Montanaro89e975f2007-08-22 19:05:21 +000022982# Name of the executable.
22983as_me=`$as_basename "$0" ||
22984$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
22985 X"$0" : 'X\(//\)$' \| \
22986 X"$0" : 'X\(/\)$' \| \
22987 . : '\(.\)' 2>/dev/null ||
22988echo X/"$0" |
22989 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
22990 /^X\/\(\/\/\)$/{ s//\1/; q; }
22991 /^X\/\(\/\).*/{ s//\1/; q; }
22992 s/.*/./; q'`
22993
22994
22995# PATH needs CR, and LINENO needs CR and PATH.
Martin v. Löwis11437992002-04-12 09:54:03 +000022996# Avoid depending upon Character Ranges.
22997as_cr_letters='abcdefghijklmnopqrstuvwxyz'
22998as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
22999as_cr_Letters=$as_cr_letters$as_cr_LETTERS
23000as_cr_digits='0123456789'
23001as_cr_alnum=$as_cr_Letters$as_cr_digits
23002
23003# The user is always right.
23004if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000023005 echo "#! /bin/sh" >conf$$.sh
23006 echo "exit 0" >>conf$$.sh
23007 chmod +x conf$$.sh
23008 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023009 PATH_SEPARATOR=';'
23010 else
23011 PATH_SEPARATOR=:
23012 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000023013 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000023014fi
23015
23016
Skip Montanaro89e975f2007-08-22 19:05:21 +000023017 as_lineno_1=$LINENO
23018 as_lineno_2=$LINENO
23019 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
23020 test "x$as_lineno_1" != "x$as_lineno_2" &&
23021 test "x$as_lineno_3" = "x$as_lineno_2" || {
23022 # Find who we are. Look in the path if we contain no path at all
23023 # relative or not.
23024 case $0 in
23025 *[\\/]* ) as_myself=$0 ;;
23026 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000023027for as_dir in $PATH
23028do
23029 IFS=$as_save_IFS
23030 test -z "$as_dir" && as_dir=.
23031 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
23032done
23033
Skip Montanaro89e975f2007-08-22 19:05:21 +000023034 ;;
23035 esac
23036 # We did not find ourselves, most probably we were run as `sh COMMAND'
23037 # in which case we are not to be found in the path.
23038 if test "x$as_myself" = x; then
23039 as_myself=$0
Brett Cannon19fab762007-06-02 03:02:29 +000023040 fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000023041 if test ! -f "$as_myself"; then
23042 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
23043echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
23044 { (exit 1); exit 1; }; }
23045 fi
23046 case $CONFIG_SHELL in
23047 '')
23048 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23049for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
23050do
23051 IFS=$as_save_IFS
23052 test -z "$as_dir" && as_dir=.
23053 for as_base in sh bash ksh sh5; do
23054 case $as_dir in
23055 /*)
23056 if ("$as_dir/$as_base" -c '
Martin v. Löwis11437992002-04-12 09:54:03 +000023057 as_lineno_1=$LINENO
23058 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +000023059 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
Martin v. Löwis11437992002-04-12 09:54:03 +000023060 test "x$as_lineno_1" != "x$as_lineno_2" &&
Skip Montanaro89e975f2007-08-22 19:05:21 +000023061 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
23062 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
23063 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
23064 CONFIG_SHELL=$as_dir/$as_base
23065 export CONFIG_SHELL
23066 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
23067 fi;;
23068 esac
23069 done
23070done
23071;;
23072 esac
Jack Jansendd19cf82001-12-06 22:36:17 +000023073
Martin v. Löwis11437992002-04-12 09:54:03 +000023074 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
23075 # uniformly replaced by the line number. The first 'sed' inserts a
Skip Montanaro89e975f2007-08-22 19:05:21 +000023076 # line-number line before each line; the second 'sed' does the real
23077 # work. The second script uses 'N' to pair each line-number line
23078 # with the numbered line, and appends trailing '-' during
23079 # substitution so that $LINENO is not a special case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000023080 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Skip Montanaro89e975f2007-08-22 19:05:21 +000023081 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
23082 sed '=' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000023083 sed '
23084 N
Skip Montanaro89e975f2007-08-22 19:05:21 +000023085 s,$,-,
23086 : loop
23087 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
Martin v. Löwis11437992002-04-12 09:54:03 +000023088 t loop
Skip Montanaro89e975f2007-08-22 19:05:21 +000023089 s,-$,,
23090 s,^['$as_cr_digits']*\n,,
Martin v. Löwis11437992002-04-12 09:54:03 +000023091 ' >$as_me.lineno &&
Skip Montanaro89e975f2007-08-22 19:05:21 +000023092 chmod +x $as_me.lineno ||
23093 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
23094echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023095 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000023096
Martin v. Löwis11437992002-04-12 09:54:03 +000023097 # Don't try to exec as it changes $[0], causing all sort of problems
23098 # (the dirname of $[0] is not the place where we might find the
Skip Montanaro89e975f2007-08-22 19:05:21 +000023099 # original and so on. Autoconf is especially sensible to this).
23100 . ./$as_me.lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000023101 # Exit status is that of the last command.
23102 exit
23103}
23104
23105
Skip Montanaro89e975f2007-08-22 19:05:21 +000023106case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
23107 *c*,-n*) ECHO_N= ECHO_C='
23108' ECHO_T=' ' ;;
23109 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
23110 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023111esac
23112
Skip Montanaro89e975f2007-08-22 19:05:21 +000023113if expr a : '\(a\)' >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023114 as_expr=expr
23115else
23116 as_expr=false
23117fi
23118
23119rm -f conf$$ conf$$.exe conf$$.file
23120echo >conf$$.file
23121if ln -s conf$$.file conf$$ 2>/dev/null; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000023122 # We could just check for DJGPP; but this test a) works b) is more generic
23123 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
23124 if test -f conf$$.exe; then
23125 # Don't use ln at all; we don't have any links
Martin v. Löwis11437992002-04-12 09:54:03 +000023126 as_ln_s='cp -p'
Skip Montanaro89e975f2007-08-22 19:05:21 +000023127 else
23128 as_ln_s='ln -s'
23129 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023130elif ln conf$$.file conf$$ 2>/dev/null; then
23131 as_ln_s=ln
23132else
23133 as_ln_s='cp -p'
23134fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000023135rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwis11437992002-04-12 09:54:03 +000023136
Skip Montanaro6dead952003-09-25 14:50:04 +000023137if mkdir -p . 2>/dev/null; then
23138 as_mkdir_p=:
23139else
Skip Montanarof0d5f792004-08-15 14:08:23 +000023140 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000023141 as_mkdir_p=false
23142fi
23143
Skip Montanaro89e975f2007-08-22 19:05:21 +000023144as_executable_p="test -f"
Martin v. Löwis11437992002-04-12 09:54:03 +000023145
23146# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000023147as_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 +000023148
23149# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000023150as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000023151
23152
Skip Montanaro89e975f2007-08-22 19:05:21 +000023153# IFS
23154# We need space, tab and new line, in precisely that order.
23155as_nl='
23156'
23157IFS=" $as_nl"
23158
23159# CDPATH.
23160$as_unset CDPATH
23161
Martin v. Löwis11437992002-04-12 09:54:03 +000023162exec 6>&1
23163
Skip Montanaro89e975f2007-08-22 19:05:21 +000023164# Open the log real soon, to keep \$[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000023165# report actual input values of CONFIG_FILES etc. instead of their
Skip Montanaro89e975f2007-08-22 19:05:21 +000023166# values after options handling. Logging --version etc. is OK.
23167exec 5>>config.log
23168{
23169 echo
23170 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
23171## Running $as_me. ##
23172_ASBOX
23173} >&5
23174cat >&5 <<_CSEOF
23175
Neal Norwitz9be57322006-08-18 05:39:20 +000023176This file was extended by python $as_me 2.6, which was
Skip Montanaro89e975f2007-08-22 19:05:21 +000023177generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000023178
23179 CONFIG_FILES = $CONFIG_FILES
23180 CONFIG_HEADERS = $CONFIG_HEADERS
23181 CONFIG_LINKS = $CONFIG_LINKS
23182 CONFIG_COMMANDS = $CONFIG_COMMANDS
23183 $ $0 $@
23184
Skip Montanaro89e975f2007-08-22 19:05:21 +000023185_CSEOF
23186echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
23187echo >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023188_ACEOF
23189
23190# Files that config.status was made for.
Skip Montanaro89e975f2007-08-22 19:05:21 +000023191if test -n "$ac_config_files"; then
23192 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
23193fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023194
Skip Montanaro89e975f2007-08-22 19:05:21 +000023195if test -n "$ac_config_headers"; then
23196 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
23197fi
23198
23199if test -n "$ac_config_links"; then
23200 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
23201fi
23202
23203if test -n "$ac_config_commands"; then
23204 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
23205fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023206
23207cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +000023208
Martin v. Löwis11437992002-04-12 09:54:03 +000023209ac_cs_usage="\
23210\`$as_me' instantiates files from templates according to the
23211current configuration.
23212
23213Usage: $0 [OPTIONS] [FILE]...
23214
23215 -h, --help print this help, then exit
Skip Montanaro89e975f2007-08-22 19:05:21 +000023216 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000023217 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000023218 -d, --debug don't remove temporary files
23219 --recheck update $as_me by reconfiguring in the same conditions
23220 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000023221 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000023222 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000023223 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000023224
23225Configuration files:
23226$config_files
23227
23228Configuration headers:
23229$config_headers
23230
23231Report bugs to <bug-autoconf@gnu.org>."
Brett Cannon19fab762007-06-02 03:02:29 +000023232_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +000023233
Martin v. Löwis11437992002-04-12 09:54:03 +000023234cat >>$CONFIG_STATUS <<_ACEOF
23235ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000023236python config.status 2.6
Skip Montanaro89e975f2007-08-22 19:05:21 +000023237configured by $0, generated by GNU Autoconf 2.59,
23238 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000023239
Skip Montanaro89e975f2007-08-22 19:05:21 +000023240Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000023241This config.status script is free software; the Free Software Foundation
23242gives unlimited permission to copy, distribute and modify it."
Skip Montanaro89e975f2007-08-22 19:05:21 +000023243srcdir=$srcdir
23244INSTALL="$INSTALL"
Martin v. Löwis11437992002-04-12 09:54:03 +000023245_ACEOF
23246
23247cat >>$CONFIG_STATUS <<\_ACEOF
23248# If no file are specified by the user, then we need to provide default
23249# value. By we need to know if files were specified by the user.
23250ac_need_defaults=:
23251while test $# != 0
23252do
23253 case $1 in
23254 --*=*)
Skip Montanaro89e975f2007-08-22 19:05:21 +000023255 ac_option=`expr "x$1" : 'x\([^=]*\)='`
23256 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000023257 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000023258 ;;
Skip Montanaro89e975f2007-08-22 19:05:21 +000023259 -*)
Skip Montanaro6dead952003-09-25 14:50:04 +000023260 ac_option=$1
23261 ac_optarg=$2
23262 ac_shift=shift
23263 ;;
Skip Montanaro89e975f2007-08-22 19:05:21 +000023264 *) # This is not an option, so the user has probably given explicit
23265 # arguments.
23266 ac_option=$1
23267 ac_need_defaults=false;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023268 esac
23269
Skip Montanaro6dead952003-09-25 14:50:04 +000023270 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000023271 # Handling of the options.
Skip Montanaro89e975f2007-08-22 19:05:21 +000023272_ACEOF
23273cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023274 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23275 ac_cs_recheck=: ;;
Skip Montanaro89e975f2007-08-22 19:05:21 +000023276 --version | --vers* | -V )
23277 echo "$ac_cs_version"; exit 0 ;;
23278 --he | --h)
23279 # Conflict between --help and --header
23280 { { echo "$as_me:$LINENO: error: ambiguous option: $1
23281Try \`$0 --help' for more information." >&5
23282echo "$as_me: error: ambiguous option: $1
23283Try \`$0 --help' for more information." >&2;}
23284 { (exit 1); exit 1; }; };;
23285 --help | --hel | -h )
23286 echo "$ac_cs_usage"; exit 0 ;;
23287 --debug | --d* | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000023288 debug=: ;;
23289 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000023290 $ac_shift
23291 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000023292 ac_need_defaults=false;;
23293 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000023294 $ac_shift
23295 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000023296 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000023297 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
23298 | -silent | --silent | --silen | --sile | --sil | --si | --s)
23299 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023300
23301 # This is an error.
Skip Montanaro89e975f2007-08-22 19:05:21 +000023302 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
23303Try \`$0 --help' for more information." >&5
23304echo "$as_me: error: unrecognized option: $1
23305Try \`$0 --help' for more information." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023306 { (exit 1); exit 1; }; } ;;
23307
Skip Montanaro89e975f2007-08-22 19:05:21 +000023308 *) ac_config_targets="$ac_config_targets $1" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023309
23310 esac
23311 shift
23312done
23313
Skip Montanaro6dead952003-09-25 14:50:04 +000023314ac_configure_extra_args=
23315
23316if $ac_cs_silent; then
23317 exec 6>/dev/null
23318 ac_configure_extra_args="$ac_configure_extra_args --silent"
23319fi
23320
23321_ACEOF
23322cat >>$CONFIG_STATUS <<_ACEOF
23323if \$ac_cs_recheck; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000023324 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
23325 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000023326fi
23327
Martin v. Löwis11437992002-04-12 09:54:03 +000023328_ACEOF
23329
Skip Montanaro89e975f2007-08-22 19:05:21 +000023330
23331
23332
Martin v. Löwis11437992002-04-12 09:54:03 +000023333
23334cat >>$CONFIG_STATUS <<\_ACEOF
23335for ac_config_target in $ac_config_targets
23336do
Skip Montanaro89e975f2007-08-22 19:05:21 +000023337 case "$ac_config_target" in
23338 # Handling of arguments.
23339 "Mac/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
23340 "Mac/PythonLauncher/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
23341 "Mac/IDLE/Makefile" ) CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
23342 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
23343 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
23344 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023345 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
23346echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
23347 { (exit 1); exit 1; }; };;
23348 esac
23349done
23350
23351# If the user did not use the arguments to specify the items to instantiate,
23352# then the envvar interface is used. Set only those that are not.
23353# We use the long form for the default assignment because of an extremely
23354# bizarre bug on SunOS 4.1.3.
23355if $ac_need_defaults; then
23356 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
23357 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
23358fi
23359
Skip Montanaro6dead952003-09-25 14:50:04 +000023360# Have a temporary directory for convenience. Make it in the build tree
Skip Montanaro89e975f2007-08-22 19:05:21 +000023361# simply because there is no reason to put it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000023362# creating and moving files from /tmp can sometimes cause problems.
Skip Montanaro89e975f2007-08-22 19:05:21 +000023363# Create a temporary directory, and hook for its removal unless debugging.
Martin v. Löwis11437992002-04-12 09:54:03 +000023364$debug ||
23365{
Skip Montanaro89e975f2007-08-22 19:05:21 +000023366 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000023367 trap '{ (exit 1); exit 1; }' 1 2 13 15
23368}
Skip Montanaro89e975f2007-08-22 19:05:21 +000023369
Martin v. Löwis11437992002-04-12 09:54:03 +000023370# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000023371
Martin v. Löwis11437992002-04-12 09:54:03 +000023372{
Skip Montanaro89e975f2007-08-22 19:05:21 +000023373 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000023374 test -n "$tmp" && test -d "$tmp"
23375} ||
23376{
Skip Montanaro89e975f2007-08-22 19:05:21 +000023377 tmp=./confstat$$-$RANDOM
23378 (umask 077 && mkdir $tmp)
Martin v. Löwis11437992002-04-12 09:54:03 +000023379} ||
23380{
Skip Montanaro6dead952003-09-25 14:50:04 +000023381 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000023382 { (exit 1); exit 1; }
23383}
23384
Skip Montanaro89e975f2007-08-22 19:05:21 +000023385_ACEOF
23386
23387cat >>$CONFIG_STATUS <<_ACEOF
23388
Martin v. Löwis11437992002-04-12 09:54:03 +000023389#
Skip Montanaro89e975f2007-08-22 19:05:21 +000023390# CONFIG_FILES section.
Martin v. Löwis11437992002-04-12 09:54:03 +000023391#
23392
23393# No need to generate the scripts if there are no CONFIG_FILES.
23394# This happens for instance when ./config.status config.h
Skip Montanaro89e975f2007-08-22 19:05:21 +000023395if test -n "\$CONFIG_FILES"; then
23396 # Protect against being on the right side of a sed subst in config.status.
23397 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
23398 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
23399s,@SHELL@,$SHELL,;t t
23400s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
23401s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
23402s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
23403s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
23404s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
23405s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
23406s,@exec_prefix@,$exec_prefix,;t t
23407s,@prefix@,$prefix,;t t
23408s,@program_transform_name@,$program_transform_name,;t t
23409s,@bindir@,$bindir,;t t
23410s,@sbindir@,$sbindir,;t t
23411s,@libexecdir@,$libexecdir,;t t
23412s,@datadir@,$datadir,;t t
23413s,@sysconfdir@,$sysconfdir,;t t
23414s,@sharedstatedir@,$sharedstatedir,;t t
23415s,@localstatedir@,$localstatedir,;t t
23416s,@libdir@,$libdir,;t t
23417s,@includedir@,$includedir,;t t
23418s,@oldincludedir@,$oldincludedir,;t t
23419s,@infodir@,$infodir,;t t
23420s,@mandir@,$mandir,;t t
23421s,@build_alias@,$build_alias,;t t
23422s,@host_alias@,$host_alias,;t t
23423s,@target_alias@,$target_alias,;t t
23424s,@DEFS@,$DEFS,;t t
23425s,@ECHO_C@,$ECHO_C,;t t
23426s,@ECHO_N@,$ECHO_N,;t t
23427s,@ECHO_T@,$ECHO_T,;t t
23428s,@LIBS@,$LIBS,;t t
23429s,@VERSION@,$VERSION,;t t
23430s,@SOVERSION@,$SOVERSION,;t t
23431s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
23432s,@UNIVERSALSDK@,$UNIVERSALSDK,;t t
23433s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
23434s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
23435s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
23436s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
23437s,@FRAMEWORKINSTALLFIRST@,$FRAMEWORKINSTALLFIRST,;t t
23438s,@FRAMEWORKINSTALLLAST@,$FRAMEWORKINSTALLLAST,;t t
23439s,@FRAMEWORKALTINSTALLFIRST@,$FRAMEWORKALTINSTALLFIRST,;t t
23440s,@FRAMEWORKALTINSTALLLAST@,$FRAMEWORKALTINSTALLLAST,;t t
23441s,@FRAMEWORKUNIXTOOLSPREFIX@,$FRAMEWORKUNIXTOOLSPREFIX,;t t
23442s,@MACHDEP@,$MACHDEP,;t t
23443s,@SGI_ABI@,$SGI_ABI,;t t
23444s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
23445s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
23446s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t
23447s,@EXPORT_MACOSX_DEPLOYMENT_TARGET@,$EXPORT_MACOSX_DEPLOYMENT_TARGET,;t t
23448s,@CC@,$CC,;t t
23449s,@CFLAGS@,$CFLAGS,;t t
23450s,@LDFLAGS@,$LDFLAGS,;t t
23451s,@CPPFLAGS@,$CPPFLAGS,;t t
23452s,@ac_ct_CC@,$ac_ct_CC,;t t
23453s,@EXEEXT@,$EXEEXT,;t t
23454s,@OBJEXT@,$OBJEXT,;t t
23455s,@CXX@,$CXX,;t t
23456s,@MAINCC@,$MAINCC,;t t
23457s,@CPP@,$CPP,;t t
23458s,@EGREP@,$EGREP,;t t
23459s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
23460s,@LIBRARY@,$LIBRARY,;t t
23461s,@LDLIBRARY@,$LDLIBRARY,;t t
23462s,@DLLLIBRARY@,$DLLLIBRARY,;t t
23463s,@BLDLIBRARY@,$BLDLIBRARY,;t t
23464s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
23465s,@INSTSONAME@,$INSTSONAME,;t t
23466s,@RUNSHARED@,$RUNSHARED,;t t
23467s,@LINKCC@,$LINKCC,;t t
23468s,@RANLIB@,$RANLIB,;t t
23469s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
23470s,@AR@,$AR,;t t
23471s,@SVNVERSION@,$SVNVERSION,;t t
23472s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
23473s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
23474s,@INSTALL_DATA@,$INSTALL_DATA,;t t
23475s,@LN@,$LN,;t t
23476s,@OPT@,$OPT,;t t
23477s,@BASECFLAGS@,$BASECFLAGS,;t t
23478s,@OTHER_LIBTOOL_OPT@,$OTHER_LIBTOOL_OPT,;t t
23479s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
23480s,@SO@,$SO,;t t
23481s,@LDSHARED@,$LDSHARED,;t t
23482s,@BLDSHARED@,$BLDSHARED,;t t
23483s,@CCSHARED@,$CCSHARED,;t t
23484s,@LINKFORSHARED@,$LINKFORSHARED,;t t
23485s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
23486s,@SHLIBS@,$SHLIBS,;t t
23487s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
23488s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
23489s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
23490s,@LDLAST@,$LDLAST,;t t
23491s,@THREADOBJ@,$THREADOBJ,;t t
23492s,@DLINCLDIR@,$DLINCLDIR,;t t
23493s,@DYNLOADFILE@,$DYNLOADFILE,;t t
23494s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
23495s,@TRUE@,$TRUE,;t t
23496s,@LIBOBJS@,$LIBOBJS,;t t
23497s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
23498s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
23499s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
23500s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
23501s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
23502s,@LIBM@,$LIBM,;t t
23503s,@LIBC@,$LIBC,;t t
23504s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
23505s,@THREADHEADERS@,$THREADHEADERS,;t t
23506s,@SRCDIRS@,$SRCDIRS,;t t
23507s,@LTLIBOBJS@,$LTLIBOBJS,;t t
23508CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023509
23510_ACEOF
23511
Skip Montanaro89e975f2007-08-22 19:05:21 +000023512 cat >>$CONFIG_STATUS <<\_ACEOF
23513 # Split the substitutions into bite-sized pieces for seds with
23514 # small command number limits, like on Digital OSF/1 and HP-UX.
23515 ac_max_sed_lines=48
23516 ac_sed_frag=1 # Number of current file.
23517 ac_beg=1 # First line for current file.
23518 ac_end=$ac_max_sed_lines # Line after last line for current file.
23519 ac_more_lines=:
23520 ac_sed_cmds=
23521 while $ac_more_lines; do
23522 if test $ac_beg -gt 1; then
23523 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23524 else
23525 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
23526 fi
23527 if test ! -s $tmp/subs.frag; then
23528 ac_more_lines=false
23529 else
23530 # The purpose of the label and of the branching condition is to
23531 # speed up the sed processing (if there are no `@' at all, there
23532 # is no need to browse any of the substitutions).
23533 # These are the two extra sed commands mentioned above.
23534 (echo ':t
23535 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
23536 if test -z "$ac_sed_cmds"; then
23537 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
23538 else
23539 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
23540 fi
23541 ac_sed_frag=`expr $ac_sed_frag + 1`
23542 ac_beg=$ac_end
23543 ac_end=`expr $ac_end + $ac_max_sed_lines`
23544 fi
23545 done
23546 if test -z "$ac_sed_cmds"; then
23547 ac_sed_cmds=cat
Martin v. Löwis11437992002-04-12 09:54:03 +000023548 fi
23549fi # test -n "$CONFIG_FILES"
23550
Skip Montanaro89e975f2007-08-22 19:05:21 +000023551_ACEOF
23552cat >>$CONFIG_STATUS <<\_ACEOF
23553for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
23554 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23555 case $ac_file in
23556 - | *:- | *:-:* ) # input from stdin
23557 cat >$tmp/stdin
23558 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23559 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23560 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23561 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23562 * ) ac_file_in=$ac_file.in ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023563 esac
23564
Skip Montanaro89e975f2007-08-22 19:05:21 +000023565 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
23566 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000023567$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023568 X"$ac_file" : 'X\(//\)[^/]' \| \
23569 X"$ac_file" : 'X\(//\)$' \| \
Skip Montanaro89e975f2007-08-22 19:05:21 +000023570 X"$ac_file" : 'X\(/\)' \| \
23571 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000023572echo X"$ac_file" |
Skip Montanaro89e975f2007-08-22 19:05:21 +000023573 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23574 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23575 /^X\(\/\/\)$/{ s//\1/; q; }
23576 /^X\(\/\).*/{ s//\1/; q; }
23577 s/.*/./; q'`
23578 { if $as_mkdir_p; then
23579 mkdir -p "$ac_dir"
23580 else
23581 as_dir="$ac_dir"
Skip Montanaro6dead952003-09-25 14:50:04 +000023582 as_dirs=
Skip Montanaro89e975f2007-08-22 19:05:21 +000023583 while test ! -d "$as_dir"; do
23584 as_dirs="$as_dir $as_dirs"
23585 as_dir=`(dirname "$as_dir") 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000023586$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023587 X"$as_dir" : 'X\(//\)[^/]' \| \
23588 X"$as_dir" : 'X\(//\)$' \| \
Skip Montanaro89e975f2007-08-22 19:05:21 +000023589 X"$as_dir" : 'X\(/\)' \| \
23590 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000023591echo X"$as_dir" |
Skip Montanaro89e975f2007-08-22 19:05:21 +000023592 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23593 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23594 /^X\(\/\/\)$/{ s//\1/; q; }
23595 /^X\(\/\).*/{ s//\1/; q; }
23596 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000023597 done
Skip Montanaro89e975f2007-08-22 19:05:21 +000023598 test ! -n "$as_dirs" || mkdir $as_dirs
23599 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23600echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000023601 { (exit 1); exit 1; }; }; }
Skip Montanaro89e975f2007-08-22 19:05:21 +000023602
Martin v. Löwis11437992002-04-12 09:54:03 +000023603 ac_builddir=.
23604
Skip Montanaro89e975f2007-08-22 19:05:21 +000023605if test "$ac_dir" != .; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023606 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Skip Montanaro89e975f2007-08-22 19:05:21 +000023607 # A "../" for each directory in $ac_dir_suffix.
23608 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
23609else
23610 ac_dir_suffix= ac_top_builddir=
23611fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023612
23613case $srcdir in
Skip Montanaro89e975f2007-08-22 19:05:21 +000023614 .) # No --srcdir option. We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000023615 ac_srcdir=.
Skip Montanaro89e975f2007-08-22 19:05:21 +000023616 if test -z "$ac_top_builddir"; then
23617 ac_top_srcdir=.
23618 else
23619 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
23620 fi ;;
23621 [\\/]* | ?:[\\/]* ) # Absolute path.
Martin v. Löwis11437992002-04-12 09:54:03 +000023622 ac_srcdir=$srcdir$ac_dir_suffix;
Skip Montanaro89e975f2007-08-22 19:05:21 +000023623 ac_top_srcdir=$srcdir ;;
23624 *) # Relative path.
23625 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
23626 ac_top_srcdir=$ac_top_builddir$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023627esac
Skip Montanarof0d5f792004-08-15 14:08:23 +000023628
Skip Montanaro89e975f2007-08-22 19:05:21 +000023629# Do not use `cd foo && pwd` to compute absolute paths, because
23630# the directories may not exist.
23631case `pwd` in
23632.) ac_abs_builddir="$ac_dir";;
23633*)
23634 case "$ac_dir" in
23635 .) ac_abs_builddir=`pwd`;;
23636 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
23637 *) ac_abs_builddir=`pwd`/"$ac_dir";;
23638 esac;;
23639esac
23640case $ac_abs_builddir in
23641.) ac_abs_top_builddir=${ac_top_builddir}.;;
23642*)
23643 case ${ac_top_builddir}. in
23644 .) ac_abs_top_builddir=$ac_abs_builddir;;
23645 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
23646 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
23647 esac;;
23648esac
23649case $ac_abs_builddir in
23650.) ac_abs_srcdir=$ac_srcdir;;
23651*)
23652 case $ac_srcdir in
23653 .) ac_abs_srcdir=$ac_abs_builddir;;
23654 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
23655 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
23656 esac;;
23657esac
23658case $ac_abs_builddir in
23659.) ac_abs_top_srcdir=$ac_top_srcdir;;
23660*)
23661 case $ac_top_srcdir in
23662 .) ac_abs_top_srcdir=$ac_abs_builddir;;
23663 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
23664 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
23665 esac;;
23666esac
Martin v. Löwis11437992002-04-12 09:54:03 +000023667
23668
23669 case $INSTALL in
23670 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Skip Montanaro89e975f2007-08-22 19:05:21 +000023671 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023672 esac
Brett Cannon19fab762007-06-02 03:02:29 +000023673
Skip Montanaro89e975f2007-08-22 19:05:21 +000023674 if test x"$ac_file" != x-; then
23675 { echo "$as_me:$LINENO: creating $ac_file" >&5
23676echo "$as_me: creating $ac_file" >&6;}
23677 rm -f "$ac_file"
23678 fi
23679 # Let's still pretend it is `configure' which instantiates (i.e., don't
23680 # use $as_me), people would be surprised to read:
23681 # /* config.h. Generated by config.status. */
23682 if test x"$ac_file" = x-; then
23683 configure_input=
23684 else
23685 configure_input="$ac_file. "
23686 fi
23687 configure_input=$configure_input"Generated from `echo $ac_file_in |
23688 sed 's,.*/,,'` by configure."
Brett Cannon19fab762007-06-02 03:02:29 +000023689
Skip Montanaro89e975f2007-08-22 19:05:21 +000023690 # First look for the input files in the build tree, otherwise in the
23691 # src tree.
23692 ac_file_inputs=`IFS=:
23693 for f in $ac_file_in; do
23694 case $f in
23695 -) echo $tmp/stdin ;;
23696 [\\/$]*)
23697 # Absolute (can't be DOS-style, as IFS=:)
23698 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23699echo "$as_me: error: cannot find input file: $f" >&2;}
23700 { (exit 1); exit 1; }; }
23701 echo "$f";;
23702 *) # Relative
23703 if test -f "$f"; then
23704 # Build tree
23705 echo "$f"
23706 elif test -f "$srcdir/$f"; then
23707 # Source tree
23708 echo "$srcdir/$f"
23709 else
23710 # /dev/null tree
23711 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23712echo "$as_me: error: cannot find input file: $f" >&2;}
23713 { (exit 1); exit 1; }; }
23714 fi;;
23715 esac
23716 done` || { (exit 1); exit 1; }
Brett Cannon19fab762007-06-02 03:02:29 +000023717_ACEOF
23718cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000023719 sed "$ac_vpsub
23720$extrasub
23721_ACEOF
23722cat >>$CONFIG_STATUS <<\_ACEOF
23723:t
23724/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Skip Montanaro89e975f2007-08-22 19:05:21 +000023725s,@configure_input@,$configure_input,;t t
23726s,@srcdir@,$ac_srcdir,;t t
23727s,@abs_srcdir@,$ac_abs_srcdir,;t t
23728s,@top_srcdir@,$ac_top_srcdir,;t t
23729s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
23730s,@builddir@,$ac_builddir,;t t
23731s,@abs_builddir@,$ac_abs_builddir,;t t
23732s,@top_builddir@,$ac_top_builddir,;t t
23733s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
23734s,@INSTALL@,$ac_INSTALL,;t t
23735" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
23736 rm -f $tmp/stdin
23737 if test x"$ac_file" != x-; then
23738 mv $tmp/out $ac_file
23739 else
23740 cat $tmp/out
23741 rm -f $tmp/out
23742 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023743
Skip Montanaro89e975f2007-08-22 19:05:21 +000023744done
23745_ACEOF
23746cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023747
Skip Montanaro89e975f2007-08-22 19:05:21 +000023748#
23749# CONFIG_HEADER section.
23750#
23751
23752# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23753# NAME is the cpp macro being defined and VALUE is the value it is being given.
23754#
23755# ac_d sets the value in "#define NAME VALUE" lines.
23756ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
23757ac_dB='[ ].*$,\1#\2'
23758ac_dC=' '
23759ac_dD=',;t'
23760# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23761ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
23762ac_uB='$,\1#\2define\3'
23763ac_uC=' '
23764ac_uD=',;t'
23765
23766for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
23767 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000023768 case $ac_file in
Skip Montanaro89e975f2007-08-22 19:05:21 +000023769 - | *:- | *:-:* ) # input from stdin
23770 cat >$tmp/stdin
23771 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23772 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23773 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
23774 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
23775 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023776 esac
Skip Montanaro89e975f2007-08-22 19:05:21 +000023777
23778 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
23779echo "$as_me: creating $ac_file" >&6;}
23780
23781 # First look for the input files in the build tree, otherwise in the
23782 # src tree.
23783 ac_file_inputs=`IFS=:
23784 for f in $ac_file_in; do
23785 case $f in
23786 -) echo $tmp/stdin ;;
23787 [\\/$]*)
23788 # Absolute (can't be DOS-style, as IFS=:)
23789 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23790echo "$as_me: error: cannot find input file: $f" >&2;}
23791 { (exit 1); exit 1; }; }
23792 # Do quote $f, to prevent DOS paths from being IFS'd.
23793 echo "$f";;
23794 *) # Relative
23795 if test -f "$f"; then
23796 # Build tree
23797 echo "$f"
23798 elif test -f "$srcdir/$f"; then
23799 # Source tree
23800 echo "$srcdir/$f"
23801 else
23802 # /dev/null tree
23803 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
23804echo "$as_me: error: cannot find input file: $f" >&2;}
23805 { (exit 1); exit 1; }; }
23806 fi;;
23807 esac
23808 done` || { (exit 1); exit 1; }
23809 # Remove the trailing spaces.
23810 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
23811
Martin v. Löwis11437992002-04-12 09:54:03 +000023812_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023813
Skip Montanaro89e975f2007-08-22 19:05:21 +000023814# Transform confdefs.h into two sed scripts, `conftest.defines' and
23815# `conftest.undefs', that substitutes the proper values into
23816# config.h.in to produce config.h. The first handles `#define'
23817# templates, and the second `#undef' templates.
23818# And first: Protect against being on the right side of a sed subst in
23819# config.status. Protect against being in an unquoted here document
23820# in config.status.
23821rm -f conftest.defines conftest.undefs
23822# Using a here document instead of a string reduces the quoting nightmare.
23823# Putting comments in sed scripts is not portable.
23824#
23825# `end' is used to avoid that the second main sed command (meant for
23826# 0-ary CPP macros) applies to n-ary macro definitions.
23827# See the Autoconf documentation for `clear'.
23828cat >confdef2sed.sed <<\_ACEOF
23829s/[\\&,]/\\&/g
23830s,[\\$`],\\&,g
23831t clear
23832: clear
23833s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
23834t end
23835s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
23836: end
23837_ACEOF
23838# If some macros were called several times there might be several times
23839# the same #defines, which is useless. Nevertheless, we may not want to
23840# sort them, since we want the *last* AC-DEFINE to be honored.
23841uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
23842sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
23843rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023844
Skip Montanaro89e975f2007-08-22 19:05:21 +000023845# This sed command replaces #undef with comments. This is necessary, for
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023846# example, in the case of _POSIX_SOURCE, which is predefined and required
23847# on some systems where configure will not decide to define it.
Skip Montanaro89e975f2007-08-22 19:05:21 +000023848cat >>conftest.undefs <<\_ACEOF
23849s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
Brett Cannon19fab762007-06-02 03:02:29 +000023850_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +000023851
23852# Break up conftest.defines because some shells have a limit on the size
23853# of here documents, and old seds have small limits too (100 cmds).
23854echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
23855echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
23856echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
23857echo ' :' >>$CONFIG_STATUS
23858rm -f conftest.tail
23859while grep . conftest.defines >/dev/null
23860do
23861 # Write a limited-size here document to $tmp/defines.sed.
23862 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
23863 # Speed up: don't consider the non `#define' lines.
23864 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
23865 # Work around the forget-to-reset-the-flag bug.
23866 echo 't clr' >>$CONFIG_STATUS
23867 echo ': clr' >>$CONFIG_STATUS
23868 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000023869 echo 'CEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +000023870 sed -f $tmp/defines.sed $tmp/in >$tmp/out
23871 rm -f $tmp/in
23872 mv $tmp/out $tmp/in
23873' >>$CONFIG_STATUS
23874 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000023875 rm -f conftest.defines
23876 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000023877done
Skip Montanaro89e975f2007-08-22 19:05:21 +000023878rm -f conftest.defines
23879echo ' fi # grep' >>$CONFIG_STATUS
23880echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000023881
Skip Montanaro89e975f2007-08-22 19:05:21 +000023882# Break up conftest.undefs because some shells have a limit on the size
23883# of here documents, and old seds have small limits too (100 cmds).
23884echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
23885rm -f conftest.tail
23886while grep . conftest.undefs >/dev/null
23887do
23888 # Write a limited-size here document to $tmp/undefs.sed.
23889 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
23890 # Speed up: don't consider the non `#undef'
23891 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
23892 # Work around the forget-to-reset-the-flag bug.
23893 echo 't clr' >>$CONFIG_STATUS
23894 echo ': clr' >>$CONFIG_STATUS
23895 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
23896 echo 'CEOF
23897 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
23898 rm -f $tmp/in
23899 mv $tmp/out $tmp/in
23900' >>$CONFIG_STATUS
23901 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
23902 rm -f conftest.undefs
23903 mv conftest.tail conftest.undefs
23904done
23905rm -f conftest.undefs
23906
Martin v. Löwis11437992002-04-12 09:54:03 +000023907cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro89e975f2007-08-22 19:05:21 +000023908 # Let's still pretend it is `configure' which instantiates (i.e., don't
23909 # use $as_me), people would be surprised to read:
23910 # /* config.h. Generated by config.status. */
23911 if test x"$ac_file" = x-; then
23912 echo "/* Generated by configure. */" >$tmp/config.h
23913 else
23914 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
23915 fi
23916 cat $tmp/in >>$tmp/config.h
23917 rm -f $tmp/in
Martin v. Löwis11437992002-04-12 09:54:03 +000023918 if test x"$ac_file" != x-; then
Skip Montanaro89e975f2007-08-22 19:05:21 +000023919 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023920 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
23921echo "$as_me: $ac_file is unchanged" >&6;}
23922 else
Skip Montanaro89e975f2007-08-22 19:05:21 +000023923 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
23924$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23925 X"$ac_file" : 'X\(//\)[^/]' \| \
23926 X"$ac_file" : 'X\(//\)$' \| \
23927 X"$ac_file" : 'X\(/\)' \| \
23928 . : '\(.\)' 2>/dev/null ||
23929echo X"$ac_file" |
23930 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23931 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23932 /^X\(\/\/\)$/{ s//\1/; q; }
23933 /^X\(\/\).*/{ s//\1/; q; }
23934 s/.*/./; q'`
23935 { if $as_mkdir_p; then
23936 mkdir -p "$ac_dir"
23937 else
23938 as_dir="$ac_dir"
23939 as_dirs=
23940 while test ! -d "$as_dir"; do
23941 as_dirs="$as_dir $as_dirs"
23942 as_dir=`(dirname "$as_dir") 2>/dev/null ||
23943$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
23944 X"$as_dir" : 'X\(//\)[^/]' \| \
23945 X"$as_dir" : 'X\(//\)$' \| \
23946 X"$as_dir" : 'X\(/\)' \| \
23947 . : '\(.\)' 2>/dev/null ||
23948echo X"$as_dir" |
23949 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
23950 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
23951 /^X\(\/\/\)$/{ s//\1/; q; }
23952 /^X\(\/\).*/{ s//\1/; q; }
23953 s/.*/./; q'`
23954 done
23955 test ! -n "$as_dirs" || mkdir $as_dirs
23956 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
23957echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
23958 { (exit 1); exit 1; }; }; }
23959
Martin v. Löwis11437992002-04-12 09:54:03 +000023960 rm -f $ac_file
Skip Montanaro89e975f2007-08-22 19:05:21 +000023961 mv $tmp/config.h $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000023962 fi
23963 else
Skip Montanaro89e975f2007-08-22 19:05:21 +000023964 cat $tmp/config.h
23965 rm -f $tmp/config.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023966 fi
Skip Montanaro89e975f2007-08-22 19:05:21 +000023967done
23968_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000023969
Skip Montanaro89e975f2007-08-22 19:05:21 +000023970cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000023971
Martin v. Löwis11437992002-04-12 09:54:03 +000023972{ (exit 0); exit 0; }
23973_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023974chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000023975ac_clean_files=$ac_clean_files_save
23976
23977
23978# configure is writing to config.log, and then calls config.status.
23979# config.status does its own redirection, appending to config.log.
23980# Unfortunately, on DOS this fails, as config.log is still kept open
23981# by configure, so config.status won't be able to write to it; its
23982# output is simply discarded. So we exec the FD to /dev/null,
23983# effectively closing config.log, so it can be properly (re)opened and
23984# appended to by config.status. When coming back to configure, we
23985# need to make the FD available again.
23986if test "$no_create" != yes; then
23987 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000023988 ac_config_status_args=
23989 test "$silent" = yes &&
23990 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000023991 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000023992 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000023993 exec 5>>config.log
23994 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
23995 # would make configure fail if this is the last instruction.
23996 $ac_cs_success || { (exit 1); exit 1; }
23997fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000023998
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000023999
Martin v. Löwisf7afe952006-04-14 15:16:15 +000024000echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000024001if test ! -f Modules/Setup
24002then
24003 cp $srcdir/Modules/Setup.dist Modules/Setup
24004fi
24005
Martin v. Löwisf7afe952006-04-14 15:16:15 +000024006echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000024007if test ! -f Modules/Setup.local
24008then
24009 echo "# Edit this file for local setup changes" >Modules/Setup.local
24010fi
24011
24012echo "creating Makefile"
24013$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
24014 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000024015 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000024016
24017case $ac_sys_system in
24018BeOS)
24019 { echo "$as_me:$LINENO: WARNING:
24020
24021 Support for BeOS is deprecated as of Python 2.6.
24022 See PEP 11 for the gory details.
24023 " >&5
24024echo "$as_me: WARNING:
24025
24026 Support for BeOS is deprecated as of Python 2.6.
24027 See PEP 11 for the gory details.
24028 " >&2;}
24029 ;;
24030*) ;;
24031esac
24032
Neil Schemenauerc761fc82001-02-19 04:50:49 +000024033mv config.c Modules