blob: 2b9f13d8b4e27fcd06dc9dc5952b7e1e8f506594 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Brett Cannon43802422005-02-10 20:48:03 +00002# From configure.in Revision: 1.481 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00004# Generated by GNU Autoconf 2.59 for python 2.5.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Skip Montanarof0d5f792004-08-15 14:08:23 +00006# Copyright (C) 2003 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +00009## --------------------- ##
10## M4sh Initialization. ##
11## --------------------- ##
12
13# Be Bourne compatible
14if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
15 emulate sh
16 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000017 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18 # is contrary to our usage. Disable this feature.
19 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000020elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21 set -o posix
22fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000023DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000024
Martin v. Löwis11437992002-04-12 09:54:03 +000025# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027 as_unset=unset
28else
29 as_unset=false
30fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
33# Work around bugs in pre-3.0 UWIN ksh.
34$as_unset ENV MAIL MAILPATH
35PS1='$ '
36PS2='> '
37PS4='+ '
38
39# NLS nuisances.
40for as_var in \
41 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
42 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
43 LC_TELEPHONE LC_TIME
44do
Skip Montanarof0d5f792004-08-15 14:08:23 +000045 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000046 eval $as_var=C; export $as_var
47 else
48 $as_unset $as_var
49 fi
50done
51
52# Required to use basename.
53if expr a : '\(a\)' >/dev/null 2>&1; then
54 as_expr=expr
55else
56 as_expr=false
57fi
58
59if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
60 as_basename=basename
61else
62 as_basename=false
63fi
Martin v. Löwis11437992002-04-12 09:54:03 +000064
65
66# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000067as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000068$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
69 X"$0" : 'X\(//\)$' \| \
70 X"$0" : 'X\(/\)$' \| \
71 . : '\(.\)' 2>/dev/null ||
72echo X/"$0" |
73 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
74 /^X\/\(\/\/\)$/{ s//\1/; q; }
75 /^X\/\(\/\).*/{ s//\1/; q; }
76 s/.*/./; q'`
77
Skip Montanaro6dead952003-09-25 14:50:04 +000078
Martin v. Löwis11437992002-04-12 09:54:03 +000079# PATH needs CR, and LINENO needs CR and PATH.
80# Avoid depending upon Character Ranges.
81as_cr_letters='abcdefghijklmnopqrstuvwxyz'
82as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
83as_cr_Letters=$as_cr_letters$as_cr_LETTERS
84as_cr_digits='0123456789'
85as_cr_alnum=$as_cr_Letters$as_cr_digits
86
87# The user is always right.
88if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000089 echo "#! /bin/sh" >conf$$.sh
90 echo "exit 0" >>conf$$.sh
91 chmod +x conf$$.sh
92 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000093 PATH_SEPARATOR=';'
94 else
95 PATH_SEPARATOR=:
96 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000097 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000098fi
99
100
101 as_lineno_1=$LINENO
102 as_lineno_2=$LINENO
103 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
104 test "x$as_lineno_1" != "x$as_lineno_2" &&
105 test "x$as_lineno_3" = "x$as_lineno_2" || {
106 # Find who we are. Look in the path if we contain no path at all
107 # relative or not.
108 case $0 in
109 *[\\/]* ) as_myself=$0 ;;
110 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
111for as_dir in $PATH
112do
113 IFS=$as_save_IFS
114 test -z "$as_dir" && as_dir=.
115 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
116done
117
118 ;;
119 esac
120 # We did not find ourselves, most probably we were run as `sh COMMAND'
121 # in which case we are not to be found in the path.
122 if test "x$as_myself" = x; then
123 as_myself=$0
124 fi
125 if test ! -f "$as_myself"; then
126 { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
127 { (exit 1); exit 1; }; }
128 fi
129 case $CONFIG_SHELL in
130 '')
131 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
132for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
133do
134 IFS=$as_save_IFS
135 test -z "$as_dir" && as_dir=.
136 for as_base in sh bash ksh sh5; do
137 case $as_dir in
138 /*)
139 if ("$as_dir/$as_base" -c '
140 as_lineno_1=$LINENO
141 as_lineno_2=$LINENO
142 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
143 test "x$as_lineno_1" != "x$as_lineno_2" &&
144 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +0000145 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
146 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000147 CONFIG_SHELL=$as_dir/$as_base
148 export CONFIG_SHELL
149 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
150 fi;;
151 esac
152 done
153done
154;;
155 esac
156
157 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
158 # uniformly replaced by the line number. The first 'sed' inserts a
159 # line-number line before each line; the second 'sed' does the real
160 # work. The second script uses 'N' to pair each line-number line
161 # with the numbered line, and appends trailing '-' during
162 # substitution so that $LINENO is not a special case at line end.
163 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
164 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
165 sed '=' <$as_myself |
166 sed '
167 N
168 s,$,-,
169 : loop
170 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
171 t loop
172 s,-$,,
173 s,^['$as_cr_digits']*\n,,
174 ' >$as_me.lineno &&
175 chmod +x $as_me.lineno ||
176 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
177 { (exit 1); exit 1; }; }
178
179 # Don't try to exec as it changes $[0], causing all sort of problems
180 # (the dirname of $[0] is not the place where we might find the
181 # original and so on. Autoconf is especially sensible to this).
182 . ./$as_me.lineno
183 # Exit status is that of the last command.
184 exit
185}
186
187
188case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
189 *c*,-n*) ECHO_N= ECHO_C='
190' ECHO_T=' ' ;;
191 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
192 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
193esac
194
195if expr a : '\(a\)' >/dev/null 2>&1; then
196 as_expr=expr
197else
198 as_expr=false
199fi
200
201rm -f conf$$ conf$$.exe conf$$.file
202echo >conf$$.file
203if ln -s conf$$.file conf$$ 2>/dev/null; then
204 # We could just check for DJGPP; but this test a) works b) is more generic
205 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
206 if test -f conf$$.exe; then
207 # Don't use ln at all; we don't have any links
208 as_ln_s='cp -p'
209 else
210 as_ln_s='ln -s'
211 fi
212elif ln conf$$.file conf$$ 2>/dev/null; then
213 as_ln_s=ln
214else
215 as_ln_s='cp -p'
216fi
217rm -f conf$$ conf$$.exe conf$$.file
218
Skip Montanaro6dead952003-09-25 14:50:04 +0000219if mkdir -p . 2>/dev/null; then
220 as_mkdir_p=:
221else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000222 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000223 as_mkdir_p=false
224fi
225
Martin v. Löwis11437992002-04-12 09:54:03 +0000226as_executable_p="test -f"
227
228# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000229as_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 +0000230
231# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000232as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000233
234
235# IFS
236# We need space, tab and new line, in precisely that order.
237as_nl='
238'
239IFS=" $as_nl"
240
241# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +0000242$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000243
244
245# Name of the host.
246# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
247# so uname gets run too.
248ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
249
250exec 6>&1
251
252#
253# Initializations.
254#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000255ac_default_prefix=/usr/local
Skip Montanaro6dead952003-09-25 14:50:04 +0000256ac_config_libobj_dir=.
Martin v. Löwis11437992002-04-12 09:54:03 +0000257cross_compiling=no
258subdirs=
259MFLAGS=
260MAKEFLAGS=
261SHELL=${CONFIG_SHELL-/bin/sh}
262
263# Maximum number of lines to put in a shell here document.
264# This variable seems obsolete. It should probably be removed, and
265# only ac_max_sed_lines should be used.
266: ${ac_max_here_lines=38}
267
268# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000269PACKAGE_NAME='python'
270PACKAGE_TARNAME='python'
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +0000271PACKAGE_VERSION='2.5'
272PACKAGE_STRING='python 2.5'
Martin v. Löwis88afe662002-10-26 13:47:44 +0000273PACKAGE_BUGREPORT=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000274
275ac_unique_file="Include/object.h"
276# Factoring default headers for most tests.
277ac_includes_default="\
278#include <stdio.h>
279#if HAVE_SYS_TYPES_H
280# include <sys/types.h>
281#endif
282#if HAVE_SYS_STAT_H
283# include <sys/stat.h>
284#endif
285#if STDC_HEADERS
286# include <stdlib.h>
287# include <stddef.h>
288#else
289# if HAVE_STDLIB_H
290# include <stdlib.h>
291# endif
292#endif
293#if HAVE_STRING_H
294# if !STDC_HEADERS && HAVE_MEMORY_H
295# include <memory.h>
296# endif
297# include <string.h>
298#endif
299#if HAVE_STRINGS_H
300# include <strings.h>
301#endif
302#if HAVE_INTTYPES_H
303# include <inttypes.h>
304#else
305# if HAVE_STDINT_H
306# include <stdint.h>
307# endif
308#endif
309#if HAVE_UNISTD_H
310# include <unistd.h>
311#endif"
312
Jack Jansen6b08a402004-06-03 12:41:45 +0000313ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS VERSION SOVERSION CONFIG_ARGS PYTHONFRAMEWORK PYTHONFRAMEWORKDIR PYTHONFRAMEWORKPREFIX PYTHONFRAMEWORKINSTALLDIR MACHDEP SGI_ABI EXTRAPLATDIR EXTRAMACHDEPPATH CONFIGURE_MACOSX_DEPLOYMENT_TARGET CXX MAINOBJ EXEEXT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT CPP EGREP BUILDEXEEXT LIBRARY LDLIBRARY DLLLIBRARY BLDLIBRARY LDLIBRARYDIR INSTSONAME RUNSHARED LINKCC RANLIB ac_ct_RANLIB AR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN OPT BASECFLAGS 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 +0000314ac_subst_files=''
Guido van Rossum627b2d71993-12-24 10:39:16 +0000315
Guido van Rossum7f43da71994-08-01 12:15:30 +0000316# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000317ac_init_help=
318ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000319# The variables have the same names as the options, with
320# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000321cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000322exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000323no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000324no_recursion=
325prefix=NONE
326program_prefix=NONE
327program_suffix=NONE
328program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000329silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000330site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000331srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000332verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000333x_includes=NONE
334x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000335
336# Installation directory options.
337# These are left unexpanded so users can "make install exec_prefix=/foo"
338# and all the variables that are supposed to be based on exec_prefix
339# by default will actually change.
340# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000341bindir='${exec_prefix}/bin'
342sbindir='${exec_prefix}/sbin'
343libexecdir='${exec_prefix}/libexec'
344datadir='${prefix}/share'
345sysconfdir='${prefix}/etc'
346sharedstatedir='${prefix}/com'
347localstatedir='${prefix}/var'
348libdir='${exec_prefix}/lib'
349includedir='${prefix}/include'
350oldincludedir='/usr/include'
351infodir='${prefix}/info'
352mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000353
Guido van Rossum7f43da71994-08-01 12:15:30 +0000354ac_prev=
355for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000356do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000357 # If the previous option needs an argument, assign it.
358 if test -n "$ac_prev"; then
359 eval "$ac_prev=\$ac_option"
360 ac_prev=
361 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000362 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000363
Martin v. Löwis11437992002-04-12 09:54:03 +0000364 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000365
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000366 # Accept the important Cygnus configure options, so we can diagnose typos.
367
Martin v. Löwis11437992002-04-12 09:54:03 +0000368 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000369
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000370 -bindir | --bindir | --bindi | --bind | --bin | --bi)
371 ac_prev=bindir ;;
372 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000373 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000374
375 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000376 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000377 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000378 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000379
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000380 -cache-file | --cache-file | --cache-fil | --cache-fi \
381 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
382 ac_prev=cache_file ;;
383 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
384 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000385 cache_file=$ac_optarg ;;
386
387 --config-cache | -C)
388 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000389
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000390 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
391 ac_prev=datadir ;;
392 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
393 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000394 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000395
Guido van Rossum7f43da71994-08-01 12:15:30 +0000396 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000397 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000398 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000399 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
400 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
401 { (exit 1); exit 1; }; }
402 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
403 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000404
405 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000406 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000407 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000408 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
409 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
410 { (exit 1); exit 1; }; }
411 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
412 case $ac_option in
413 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000414 *) ac_optarg=yes ;;
415 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000416 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000417
Guido van Rossum7f43da71994-08-01 12:15:30 +0000418 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
419 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
420 | --exec | --exe | --ex)
421 ac_prev=exec_prefix ;;
422 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
423 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
424 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000425 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000426
427 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000428 # Obsolete; use --with-gas.
429 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000430
Martin v. Löwis11437992002-04-12 09:54:03 +0000431 -help | --help | --hel | --he | -h)
432 ac_init_help=long ;;
433 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
434 ac_init_help=recursive ;;
435 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
436 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000437
438 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000439 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000440 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000441 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000442
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000443 -includedir | --includedir | --includedi | --included | --include \
444 | --includ | --inclu | --incl | --inc)
445 ac_prev=includedir ;;
446 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
447 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000448 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000449
450 -infodir | --infodir | --infodi | --infod | --info | --inf)
451 ac_prev=infodir ;;
452 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000453 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000454
455 -libdir | --libdir | --libdi | --libd)
456 ac_prev=libdir ;;
457 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000459
460 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
461 | --libexe | --libex | --libe)
462 ac_prev=libexecdir ;;
463 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
464 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000465 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000466
467 -localstatedir | --localstatedir | --localstatedi | --localstated \
468 | --localstate | --localstat | --localsta | --localst \
469 | --locals | --local | --loca | --loc | --lo)
470 ac_prev=localstatedir ;;
471 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
472 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
473 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000474 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000475
476 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
477 ac_prev=mandir ;;
478 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000479 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000480
Guido van Rossum7f43da71994-08-01 12:15:30 +0000481 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000482 # Obsolete; use --without-fp.
483 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000484
485 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000486 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000487 no_create=yes ;;
488
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000489 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
490 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
491 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000492
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000493 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
494 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
495 | --oldin | --oldi | --old | --ol | --o)
496 ac_prev=oldincludedir ;;
497 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
498 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
499 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000500 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000501
Guido van Rossum7f43da71994-08-01 12:15:30 +0000502 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
503 ac_prev=prefix ;;
504 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000505 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000506
507 -program-prefix | --program-prefix | --program-prefi | --program-pref \
508 | --program-pre | --program-pr | --program-p)
509 ac_prev=program_prefix ;;
510 -program-prefix=* | --program-prefix=* | --program-prefi=* \
511 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000512 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000513
514 -program-suffix | --program-suffix | --program-suffi | --program-suff \
515 | --program-suf | --program-su | --program-s)
516 ac_prev=program_suffix ;;
517 -program-suffix=* | --program-suffix=* | --program-suffi=* \
518 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000519 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000520
521 -program-transform-name | --program-transform-name \
522 | --program-transform-nam | --program-transform-na \
523 | --program-transform-n | --program-transform- \
524 | --program-transform | --program-transfor \
525 | --program-transfo | --program-transf \
526 | --program-trans | --program-tran \
527 | --progr-tra | --program-tr | --program-t)
528 ac_prev=program_transform_name ;;
529 -program-transform-name=* | --program-transform-name=* \
530 | --program-transform-nam=* | --program-transform-na=* \
531 | --program-transform-n=* | --program-transform-=* \
532 | --program-transform=* | --program-transfor=* \
533 | --program-transfo=* | --program-transf=* \
534 | --program-trans=* | --program-tran=* \
535 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000536 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000537
538 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
539 | -silent | --silent | --silen | --sile | --sil)
540 silent=yes ;;
541
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000542 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
543 ac_prev=sbindir ;;
544 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
545 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000546 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000547
548 -sharedstatedir | --sharedstatedir | --sharedstatedi \
549 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
550 | --sharedst | --shareds | --shared | --share | --shar \
551 | --sha | --sh)
552 ac_prev=sharedstatedir ;;
553 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
554 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
555 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
556 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000557 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000558
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000559 -site | --site | --sit)
560 ac_prev=site ;;
561 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000562 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000563
Guido van Rossum7f43da71994-08-01 12:15:30 +0000564 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
565 ac_prev=srcdir ;;
566 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000567 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000568
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000569 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
570 | --syscon | --sysco | --sysc | --sys | --sy)
571 ac_prev=sysconfdir ;;
572 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
573 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000574 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000575
Guido van Rossum7f43da71994-08-01 12:15:30 +0000576 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000577 ac_prev=target_alias ;;
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 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000580
581 -v | -verbose | --verbose | --verbos | --verbo | --verb)
582 verbose=yes ;;
583
Martin v. Löwis11437992002-04-12 09:54:03 +0000584 -version | --version | --versio | --versi | --vers | -V)
585 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000586
587 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000588 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000589 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000590 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
591 { echo "$as_me: error: invalid package name: $ac_package" >&2
592 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000593 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000594 case $ac_option in
595 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000596 *) ac_optarg=yes ;;
597 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000598 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000599
600 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000601 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000602 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000603 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
604 { echo "$as_me: error: invalid package name: $ac_package" >&2
605 { (exit 1); exit 1; }; }
606 ac_package=`echo $ac_package | sed 's/-/_/g'`
607 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000608
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000609 --x)
610 # Obsolete; use --with-x.
611 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000612
613 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
614 | --x-incl | --x-inc | --x-in | --x-i)
615 ac_prev=x_includes ;;
616 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
617 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000618 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000619
620 -x-libraries | --x-libraries | --x-librarie | --x-librari \
621 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
622 ac_prev=x_libraries ;;
623 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
624 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000625 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000626
Martin v. Löwis11437992002-04-12 09:54:03 +0000627 -*) { echo "$as_me: error: unrecognized option: $ac_option
628Try \`$0 --help' for more information." >&2
629 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000630 ;;
631
Martin v. Löwis11437992002-04-12 09:54:03 +0000632 *=*)
633 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
634 # Reject names that are not valid shell variable names.
635 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
636 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
637 { (exit 1); exit 1; }; }
638 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
639 eval "$ac_envvar='$ac_optarg'"
640 export $ac_envvar ;;
641
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000642 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000643 # FIXME: should be removed in autoconf 3.0.
644 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
645 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
646 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
647 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000648 ;;
649
650 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000651done
652
Guido van Rossum7f43da71994-08-01 12:15:30 +0000653if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000654 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
655 { echo "$as_me: error: missing argument to $ac_option" >&2
656 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000657fi
658
Martin v. Löwis11437992002-04-12 09:54:03 +0000659# Be sure to have absolute paths.
660for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000661do
Martin v. Löwis11437992002-04-12 09:54:03 +0000662 eval ac_val=$`echo $ac_var`
663 case $ac_val in
664 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
665 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
666 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000667 esac
668done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000669
Martin v. Löwis11437992002-04-12 09:54:03 +0000670# Be sure to have absolute paths.
671for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
Skip Montanarof0d5f792004-08-15 14:08:23 +0000672 localstatedir libdir includedir oldincludedir infodir mandir
Martin v. Löwis11437992002-04-12 09:54:03 +0000673do
674 eval ac_val=$`echo $ac_var`
675 case $ac_val in
676 [\\/$]* | ?:[\\/]* ) ;;
677 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
678 { (exit 1); exit 1; }; };;
679 esac
680done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000681
Martin v. Löwis11437992002-04-12 09:54:03 +0000682# There might be people who depend on the old broken behavior: `$host'
683# used to hold the argument of --host etc.
684# FIXME: To remove some day.
685build=$build_alias
686host=$host_alias
687target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000688
Martin v. Löwis11437992002-04-12 09:54:03 +0000689# FIXME: To remove some day.
690if test "x$host_alias" != x; then
691 if test "x$build_alias" = x; then
692 cross_compiling=maybe
693 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
694 If a cross compiler is detected then cross compile mode will be used." >&2
695 elif test "x$build_alias" != "x$host_alias"; then
696 cross_compiling=yes
697 fi
698fi
699
700ac_tool_prefix=
701test -n "$host_alias" && ac_tool_prefix=$host_alias-
702
703test "$silent" = yes && exec 6>/dev/null
704
Guido van Rossum627b2d71993-12-24 10:39:16 +0000705
706# Find the source files, if location was not specified.
707if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000708 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000709 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000710 ac_confdir=`(dirname "$0") 2>/dev/null ||
711$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +0000712 X"$0" : 'X\(//\)[^/]' \| \
713 X"$0" : 'X\(//\)$' \| \
714 X"$0" : 'X\(/\)' \| \
715 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000716echo X"$0" |
717 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
718 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
719 /^X\(\/\/\)$/{ s//\1/; q; }
720 /^X\(\/\).*/{ s//\1/; q; }
721 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000722 srcdir=$ac_confdir
723 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000724 srcdir=..
725 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000726else
727 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000728fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000729if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000730 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000731 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
732 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000733 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000734 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
735 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000736 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000737fi
Skip Montanaro6dead952003-09-25 14:50:04 +0000738(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
739 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
740 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000741srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
742ac_env_build_alias_set=${build_alias+set}
743ac_env_build_alias_value=$build_alias
744ac_cv_env_build_alias_set=${build_alias+set}
745ac_cv_env_build_alias_value=$build_alias
746ac_env_host_alias_set=${host_alias+set}
747ac_env_host_alias_value=$host_alias
748ac_cv_env_host_alias_set=${host_alias+set}
749ac_cv_env_host_alias_value=$host_alias
750ac_env_target_alias_set=${target_alias+set}
751ac_env_target_alias_value=$target_alias
752ac_cv_env_target_alias_set=${target_alias+set}
753ac_cv_env_target_alias_value=$target_alias
754ac_env_CC_set=${CC+set}
755ac_env_CC_value=$CC
756ac_cv_env_CC_set=${CC+set}
757ac_cv_env_CC_value=$CC
758ac_env_CFLAGS_set=${CFLAGS+set}
759ac_env_CFLAGS_value=$CFLAGS
760ac_cv_env_CFLAGS_set=${CFLAGS+set}
761ac_cv_env_CFLAGS_value=$CFLAGS
762ac_env_LDFLAGS_set=${LDFLAGS+set}
763ac_env_LDFLAGS_value=$LDFLAGS
764ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
765ac_cv_env_LDFLAGS_value=$LDFLAGS
766ac_env_CPPFLAGS_set=${CPPFLAGS+set}
767ac_env_CPPFLAGS_value=$CPPFLAGS
768ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
769ac_cv_env_CPPFLAGS_value=$CPPFLAGS
770ac_env_CPP_set=${CPP+set}
771ac_env_CPP_value=$CPP
772ac_cv_env_CPP_set=${CPP+set}
773ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000774
Martin v. Löwis11437992002-04-12 09:54:03 +0000775#
776# Report the --help message.
777#
778if test "$ac_init_help" = "long"; then
779 # Omit some internal or obsolete options to make the list less imposing.
780 # This message is too long to be a string in the A/UX 3.1 sh.
781 cat <<_ACEOF
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +0000782\`configure' configures python 2.5 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000783
784Usage: $0 [OPTION]... [VAR=VALUE]...
785
786To assign environment variables (e.g., CC, CFLAGS...), specify them as
787VAR=VALUE. See below for descriptions of some of the useful variables.
788
789Defaults for the options are specified in brackets.
790
791Configuration:
792 -h, --help display this help and exit
793 --help=short display options specific to this package
794 --help=recursive display the short help of all the included packages
795 -V, --version display version information and exit
796 -q, --quiet, --silent do not print \`checking...' messages
797 --cache-file=FILE cache test results in FILE [disabled]
798 -C, --config-cache alias for \`--cache-file=config.cache'
799 -n, --no-create do not create output files
800 --srcdir=DIR find the sources in DIR [configure dir or \`..']
801
802_ACEOF
803
804 cat <<_ACEOF
805Installation directories:
806 --prefix=PREFIX install architecture-independent files in PREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +0000807 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +0000808 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Skip Montanarof0d5f792004-08-15 14:08:23 +0000809 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +0000810
811By default, \`make install' will install all the files in
812\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
813an installation prefix other than \`$ac_default_prefix' using \`--prefix',
814for instance \`--prefix=\$HOME'.
815
816For better control, use the options below.
817
818Fine tuning of the installation directories:
819 --bindir=DIR user executables [EPREFIX/bin]
820 --sbindir=DIR system admin executables [EPREFIX/sbin]
821 --libexecdir=DIR program executables [EPREFIX/libexec]
822 --datadir=DIR read-only architecture-independent data [PREFIX/share]
823 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
824 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
825 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
826 --libdir=DIR object code libraries [EPREFIX/lib]
827 --includedir=DIR C header files [PREFIX/include]
828 --oldincludedir=DIR C header files for non-gcc [/usr/include]
829 --infodir=DIR info documentation [PREFIX/info]
830 --mandir=DIR man documentation [PREFIX/man]
831_ACEOF
832
833 cat <<\_ACEOF
834_ACEOF
835fi
836
837if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000838 case $ac_init_help in
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +0000839 short | recursive ) echo "Configuration of python 2.5:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +0000840 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000841 cat <<\_ACEOF
842
843Optional Features:
844 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
845 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000846 --enable-framework[=INSTALLDIR]
847 Build (MacOSX|Darwin) framework
848 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +0000849 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000850 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
851 --enable-ipv6 Enable ipv6 (with ipv4) support
852 --disable-ipv6 Disable ipv6 support
853 --enable-unicode[=ucs[24]]
854 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000855
856Optional Packages:
857 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
858 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000859 --without-gcc never use gcc
860 --with-cxx=<compiler> enable C++ support
861 --with-suffix=.exe set executable suffix
862 --with-pydebug build with Py_DEBUG defined
863 --with-libs='lib1 ...' link against additional libs
864 --with-signal-module disable/enable signal module
865 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
866 --with(out)-threads[=DIRECTORY]
867 disable/enable thread support
868 --with(out)-thread[=DIRECTORY]
869 deprecated; use --with(out)-threads
870 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000871 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +0000872 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000873 --with(out)-pymalloc disable/enable specialized mallocs
874 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000875 --with-fpectl enable SIGFPE catching
876 --with-libm=STRING math library
877 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000878
879Some influential environment variables:
880 CC C compiler command
881 CFLAGS C compiler flags
882 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
883 nonstandard directory <lib dir>
884 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
885 headers in a nonstandard directory <include dir>
886 CPP C preprocessor
887
888Use these variables to override the choices made by `configure' or to help
889it to find libraries and programs with nonstandard names/locations.
890
891_ACEOF
892fi
893
894if test "$ac_init_help" = "recursive"; then
895 # If there are subdirs, report their specific --help.
896 ac_popdir=`pwd`
897 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
898 test -d $ac_dir || continue
899 ac_builddir=.
900
901if test "$ac_dir" != .; then
902 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
903 # A "../" for each directory in $ac_dir_suffix.
904 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
905else
906 ac_dir_suffix= ac_top_builddir=
907fi
908
909case $srcdir in
910 .) # No --srcdir option. We are building in place.
911 ac_srcdir=.
912 if test -z "$ac_top_builddir"; then
913 ac_top_srcdir=.
914 else
915 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
916 fi ;;
917 [\\/]* | ?:[\\/]* ) # Absolute path.
918 ac_srcdir=$srcdir$ac_dir_suffix;
919 ac_top_srcdir=$srcdir ;;
920 *) # Relative path.
921 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
922 ac_top_srcdir=$ac_top_builddir$srcdir ;;
923esac
Skip Montanarof0d5f792004-08-15 14:08:23 +0000924
925# Do not use `cd foo && pwd` to compute absolute paths, because
926# the directories may not exist.
927case `pwd` in
928.) ac_abs_builddir="$ac_dir";;
929*)
930 case "$ac_dir" in
931 .) ac_abs_builddir=`pwd`;;
932 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
933 *) ac_abs_builddir=`pwd`/"$ac_dir";;
934 esac;;
935esac
936case $ac_abs_builddir in
937.) ac_abs_top_builddir=${ac_top_builddir}.;;
938*)
939 case ${ac_top_builddir}. in
940 .) ac_abs_top_builddir=$ac_abs_builddir;;
941 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
942 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
943 esac;;
944esac
945case $ac_abs_builddir in
946.) ac_abs_srcdir=$ac_srcdir;;
947*)
948 case $ac_srcdir in
949 .) ac_abs_srcdir=$ac_abs_builddir;;
950 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
951 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
952 esac;;
953esac
954case $ac_abs_builddir in
955.) ac_abs_top_srcdir=$ac_top_srcdir;;
956*)
957 case $ac_top_srcdir in
958 .) ac_abs_top_srcdir=$ac_abs_builddir;;
959 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
960 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
961 esac;;
962esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000963
964 cd $ac_dir
965 # Check for guested configure; otherwise get Cygnus style configure.
966 if test -f $ac_srcdir/configure.gnu; then
967 echo
968 $SHELL $ac_srcdir/configure.gnu --help=recursive
969 elif test -f $ac_srcdir/configure; then
970 echo
971 $SHELL $ac_srcdir/configure --help=recursive
972 elif test -f $ac_srcdir/configure.ac ||
Skip Montanarof0d5f792004-08-15 14:08:23 +0000973 test -f $ac_srcdir/configure.in; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 echo
975 $ac_configure --help
976 else
977 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
978 fi
Brett Cannon43802422005-02-10 20:48:03 +0000979 cd $ac_popdir
Martin v. Löwis11437992002-04-12 09:54:03 +0000980 done
981fi
982
983test -n "$ac_init_help" && exit 0
984if $ac_init_version; then
985 cat <<\_ACEOF
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +0000986python configure 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +0000987generated by GNU Autoconf 2.59
Martin v. Löwis11437992002-04-12 09:54:03 +0000988
Skip Montanarof0d5f792004-08-15 14:08:23 +0000989Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +0000990This configure script is free software; the Free Software Foundation
991gives unlimited permission to copy, distribute and modify it.
992_ACEOF
993 exit 0
994fi
995exec 5>config.log
996cat >&5 <<_ACEOF
997This file contains any messages produced by compilers while
998running configure, to aid debugging if configure makes a mistake.
999
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00001000It was created by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +00001001generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001002
1003 $ $0 $@
1004
1005_ACEOF
1006{
1007cat <<_ASUNAME
1008## --------- ##
1009## Platform. ##
1010## --------- ##
1011
1012hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1013uname -m = `(uname -m) 2>/dev/null || echo unknown`
1014uname -r = `(uname -r) 2>/dev/null || echo unknown`
1015uname -s = `(uname -s) 2>/dev/null || echo unknown`
1016uname -v = `(uname -v) 2>/dev/null || echo unknown`
1017
1018/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1019/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1020
1021/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1022/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1023/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1024hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
1025/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1026/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1027/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1028
1029_ASUNAME
1030
1031as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1032for as_dir in $PATH
1033do
1034 IFS=$as_save_IFS
1035 test -z "$as_dir" && as_dir=.
1036 echo "PATH: $as_dir"
1037done
1038
1039} >&5
1040
1041cat >&5 <<_ACEOF
1042
1043
1044## ----------- ##
1045## Core tests. ##
1046## ----------- ##
1047
1048_ACEOF
1049
1050
1051# Keep a trace of the command line.
1052# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001053# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001054# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001055# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001056ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001057ac_configure_args0=
1058ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001059ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001060ac_must_keep_next=false
1061for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001062do
Skip Montanaro6dead952003-09-25 14:50:04 +00001063 for ac_arg
1064 do
1065 case $ac_arg in
1066 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1067 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1068 | -silent | --silent | --silen | --sile | --sil)
1069 continue ;;
1070 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1071 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1072 esac
1073 case $ac_pass in
1074 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1075 2)
1076 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1077 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001078 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001079 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001080 case $ac_arg in
1081 *=* | --config-cache | -C | -disable-* | --disable-* \
1082 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1083 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1084 | -with-* | --with-* | -without-* | --without-* | --x)
1085 case "$ac_configure_args0 " in
1086 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1087 esac
1088 ;;
1089 -* ) ac_must_keep_next=true ;;
1090 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001091 fi
1092 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1093 # Get rid of the leading space.
1094 ac_sep=" "
1095 ;;
1096 esac
1097 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001098done
Skip Montanaro6dead952003-09-25 14:50:04 +00001099$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1100$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 +00001101
1102# When interrupted or exit'd, cleanup temporary files, and complete
1103# config.log. We remove comments because anyway the quotes in there
1104# would cause problems or look ugly.
1105# WARNING: Be sure not to use single quotes in there, as some shells,
1106# such as our DU 5.0 friend, will then `close' the trap.
1107trap 'exit_status=$?
1108 # Save into config.log some information that might help in debugging.
1109 {
1110 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001111
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 cat <<\_ASBOX
1113## ---------------- ##
1114## Cache variables. ##
1115## ---------------- ##
1116_ASBOX
1117 echo
1118 # The following way of writing the cache mishandles newlines in values,
1119{
1120 (set) 2>&1 |
1121 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1122 *ac_space=\ *)
1123 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001124 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1125 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 ;;
1127 *)
1128 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +00001129 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 ;;
1131 esac;
1132}
1133 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001134
1135 cat <<\_ASBOX
1136## ----------------- ##
1137## Output variables. ##
1138## ----------------- ##
1139_ASBOX
1140 echo
1141 for ac_var in $ac_subst_vars
1142 do
1143 eval ac_val=$`echo $ac_var`
1144 echo "$ac_var='"'"'$ac_val'"'"'"
1145 done | sort
1146 echo
1147
1148 if test -n "$ac_subst_files"; then
1149 cat <<\_ASBOX
1150## ------------- ##
1151## Output files. ##
1152## ------------- ##
1153_ASBOX
1154 echo
1155 for ac_var in $ac_subst_files
1156 do
1157 eval ac_val=$`echo $ac_var`
Skip Montanarof0d5f792004-08-15 14:08:23 +00001158 echo "$ac_var='"'"'$ac_val'"'"'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001159 done | sort
1160 echo
1161 fi
1162
Martin v. Löwis11437992002-04-12 09:54:03 +00001163 if test -s confdefs.h; then
1164 cat <<\_ASBOX
1165## ----------- ##
1166## confdefs.h. ##
1167## ----------- ##
1168_ASBOX
1169 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001170 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001171 echo
1172 fi
1173 test "$ac_signal" != 0 &&
1174 echo "$as_me: caught signal $ac_signal"
1175 echo "$as_me: exit $exit_status"
1176 } >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00001177 rm -f core *.core &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001178 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1179 exit $exit_status
1180 ' 0
1181for ac_signal in 1 2 13 15; do
1182 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1183done
1184ac_signal=0
1185
1186# confdefs.h avoids OS command line length limits that DEFS can exceed.
1187rm -rf conftest* confdefs.h
1188# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1189echo >confdefs.h
1190
1191# Predefined preprocessor variables.
1192
1193cat >>confdefs.h <<_ACEOF
1194#define PACKAGE_NAME "$PACKAGE_NAME"
1195_ACEOF
1196
1197
1198cat >>confdefs.h <<_ACEOF
1199#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1200_ACEOF
1201
1202
1203cat >>confdefs.h <<_ACEOF
1204#define PACKAGE_VERSION "$PACKAGE_VERSION"
1205_ACEOF
1206
1207
1208cat >>confdefs.h <<_ACEOF
1209#define PACKAGE_STRING "$PACKAGE_STRING"
1210_ACEOF
1211
1212
1213cat >>confdefs.h <<_ACEOF
1214#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1215_ACEOF
1216
1217
1218# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001219# Prefer explicitly selected file to automatically selected ones.
1220if test -z "$CONFIG_SITE"; then
1221 if test "x$prefix" != xNONE; then
1222 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1223 else
1224 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1225 fi
1226fi
1227for ac_site_file in $CONFIG_SITE; do
1228 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001229 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1230echo "$as_me: loading site script $ac_site_file" >&6;}
1231 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001232 . "$ac_site_file"
1233 fi
1234done
1235
1236if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001237 # Some versions of bash will fail to source /dev/null (special
1238 # files actually), so we avoid doing that.
1239 if test -f "$cache_file"; then
1240 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1241echo "$as_me: loading cache $cache_file" >&6;}
1242 case $cache_file in
1243 [\\/]* | ?:[\\/]* ) . $cache_file;;
1244 *) . ./$cache_file;;
1245 esac
1246 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001247else
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1249echo "$as_me: creating cache $cache_file" >&6;}
1250 >$cache_file
1251fi
1252
1253# Check that the precious variables saved in the cache have kept the same
1254# value.
1255ac_cache_corrupted=false
1256for ac_var in `(set) 2>&1 |
Skip Montanarof0d5f792004-08-15 14:08:23 +00001257 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001258 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1259 eval ac_new_set=\$ac_env_${ac_var}_set
1260 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1261 eval ac_new_val="\$ac_env_${ac_var}_value"
1262 case $ac_old_set,$ac_new_set in
1263 set,)
1264 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1265echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1266 ac_cache_corrupted=: ;;
1267 ,set)
1268 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1269echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1270 ac_cache_corrupted=: ;;
1271 ,);;
1272 *)
1273 if test "x$ac_old_val" != "x$ac_new_val"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001274 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001275echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001276 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001277echo "$as_me: former value: $ac_old_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001278 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001279echo "$as_me: current value: $ac_new_val" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00001280 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001281 fi;;
1282 esac
1283 # Pass precious variables to config.status.
1284 if test "$ac_new_set" = set; then
1285 case $ac_new_val in
1286 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1287 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1288 *) ac_arg=$ac_var=$ac_new_val ;;
1289 esac
1290 case " $ac_configure_args " in
1291 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1292 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1293 esac
1294 fi
1295done
1296if $ac_cache_corrupted; then
1297 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1298echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1299 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1300echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1301 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001302fi
1303
Guido van Rossum7f43da71994-08-01 12:15:30 +00001304ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001305ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001306ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1307ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1308ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001309
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310
Michael W. Hudson54241132001-12-07 15:38:26 +00001311
1312
Guido van Rossum627b2d71993-12-24 10:39:16 +00001313
Martin v. Löwis11437992002-04-12 09:54:03 +00001314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
Martin v. Löwis88afe662002-10-26 13:47:44 +00001327
1328
1329
1330
1331
1332
1333
1334
1335
Skip Montanaro6dead952003-09-25 14:50:04 +00001336
1337 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001338
1339
Martin v. Löwis11437992002-04-12 09:54:03 +00001340
1341
1342
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001343
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001344
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001345# We don't use PACKAGE_ variables, and they cause conflicts
1346# with other autoconf-based packages that include Python.h
1347grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1348rm confdefs.h
1349mv confdefs.h.new confdefs.h
1350
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001351
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00001352VERSION=2.5
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001353
Martin v. Löwis1142de32002-03-29 16:28:31 +00001354
1355SOVERSION=1.0
1356
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001357# The later defininition of _XOPEN_SOURCE disables certain features
1358# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1359
1360cat >>confdefs.h <<\_ACEOF
1361#define _GNU_SOURCE 1
1362_ACEOF
1363
1364
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001365# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1366# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1367# them.
1368
1369cat >>confdefs.h <<\_ACEOF
1370#define _NETBSD_SOURCE 1
1371_ACEOF
1372
1373
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001374# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1375# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1376# them.
1377
1378cat >>confdefs.h <<\_ACEOF
1379#define __BSD_VISIBLE 1
1380_ACEOF
1381
1382
Martin v. Löwisd6320502004-08-12 13:45:08 +00001383# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1384# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1385
1386cat >>confdefs.h <<\_ACEOF
1387#define _BSD_TYPES 1
1388_ACEOF
1389
1390
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001391define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001392
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001393# Arguments passed to configure.
1394
1395CONFIG_ARGS="$ac_configure_args"
1396
Jack Jansene578a632001-08-15 01:27:14 +00001397# Check whether --enable-framework or --disable-framework was given.
1398if test "${enable_framework+set}" = set; then
1399 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001400
Jack Jansene578a632001-08-15 01:27:14 +00001401 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001402 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001403 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001404 esac
1405 case $enableval in
1406 no)
1407 PYTHONFRAMEWORK=
1408 PYTHONFRAMEWORKDIR=no-framework
1409 PYTHONFRAMEWORKPREFIX=
1410 PYTHONFRAMEWORKINSTALLDIR=
1411 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001412 ;;
1413 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001414 PYTHONFRAMEWORK=Python
1415 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001416 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001417 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1418 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001419 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001420
Guido van Rossum563e7081996-09-10 18:20:48 +00001421else
Martin v. Löwis11437992002-04-12 09:54:03 +00001422
Jack Jansene578a632001-08-15 01:27:14 +00001423 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001424 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001425 PYTHONFRAMEWORKPREFIX=
1426 PYTHONFRAMEWORKINSTALLDIR=
1427 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001428
Martin v. Löwis11437992002-04-12 09:54:03 +00001429fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001430
1431
1432
1433
Jack Jansene578a632001-08-15 01:27:14 +00001434
1435##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436## AC_HELP_STRING(--with-dyld,
1437## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001438##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001439# Set name for machine-dependent library files
1440
Martin v. Löwis11437992002-04-12 09:54:03 +00001441echo "$as_me:$LINENO: checking MACHDEP" >&5
1442echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001443if test -z "$MACHDEP"
1444then
Guido van Rossum563e7081996-09-10 18:20:48 +00001445 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001446 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1447 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001448 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001449 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001450 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001451 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001452 ac_md_system=`echo $ac_sys_system |
1453 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1454 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001455 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001456 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001457
Guido van Rossum07397971997-04-29 21:49:50 +00001458 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001459 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001460 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001461 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001462 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001463 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001464 esac
1465fi
Guido van Rossum91922671997-10-09 20:24:13 +00001466
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001467# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1468# disable features if it is defined, without any means to access these
1469# features as extensions. For these systems, we skip the definition of
1470# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1471# some feature, make sure there is no alternative way to access this
1472# feature. Also, when using wildcards, make sure you have verified the
1473# need for not defining _XOPEN_SOURCE on all systems matching the
1474# wildcard, and that the wildcard does not include future systems
1475# (which may remove their limitations).
1476case $ac_sys_system/$ac_sys_release in
1477 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1478 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001479 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis99968282004-09-15 06:02:54 +00001480 OpenBSD/2.* | OpenBSD/3.[0123456])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001481 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001482 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1483 # of union __?sigval. Reported by Stuart Bishop.
1484 SunOS/5.6)
1485 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001486 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1487 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00001488 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00001489 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001490 define_xopen_source=no;;
1491 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001492 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001493 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001494 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001495 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1496 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1497 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1498 # This should hopefully be fixed in FreeBSD 4.9
1499 FreeBSD/4.8* | Darwin/6* )
1500 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001501 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
1502 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
1503 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001504 AIX/4)
1505 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00001506 AIX/5)
1507 if test `uname -r` -eq 1; then
1508 define_xopen_source=no
1509 fi
1510 ;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001511esac
1512
1513if test $define_xopen_source = yes
1514then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001515 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
1516 # defined precisely as g++ defines it
1517 case $ac_sys_system/$ac_sys_release in
1518 SunOS/5.8|SunOS/5.9)
1519
1520cat >>confdefs.h <<\_ACEOF
1521#define _XOPEN_SOURCE 500
1522_ACEOF
1523
1524 ;;
1525 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001526
1527cat >>confdefs.h <<\_ACEOF
1528#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001529_ACEOF
1530
Skip Montanarof0d5f792004-08-15 14:08:23 +00001531 ;;
1532 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001533
1534 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1535 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1536 # several APIs are not declared. Since this is also needed in some
1537 # cases for HP-UX, we define it globally.
1538
1539
1540cat >>confdefs.h <<\_ACEOF
1541#define _XOPEN_SOURCE_EXTENDED 1
1542_ACEOF
1543
1544
1545cat >>confdefs.h <<\_ACEOF
1546#define _POSIX_C_SOURCE 200112L
1547_ACEOF
1548
1549
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001550fi
1551
Guido van Rossum91922671997-10-09 20:24:13 +00001552#
1553# SGI compilers allow the specification of the both the ABI and the
1554# ISA on the command line. Depending on the values of these switches,
1555# different and often incompatable code will be generated.
1556#
1557# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1558# thus supply support for various ABI/ISA combinations. The MACHDEP
1559# variable is also adjusted.
1560#
1561
1562if test ! -z "$SGI_ABI"
1563then
1564 CC="cc $SGI_ABI"
1565 LDFLAGS="$SGI_ABI $LDFLAGS"
1566 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1567fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001568echo "$as_me:$LINENO: result: $MACHDEP" >&5
1569echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001570
Jack Jansen83f898c2002-12-30 22:23:40 +00001571# And add extra plat-mac for darwin
1572
Jack Jansen7b59b422003-03-17 15:44:10 +00001573
Jack Jansen83f898c2002-12-30 22:23:40 +00001574echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1575echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1576if test -z "$EXTRAPLATDIR"
1577then
1578 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001579 darwin)
1580 EXTRAPLATDIR="\$(PLATMACDIRS)"
1581 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1582 ;;
1583 *)
1584 EXTRAPLATDIR=""
1585 EXTRAMACHDEPPATH=""
1586 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001587 esac
1588fi
1589echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1590echo "${ECHO_T}$EXTRAPLATDIR" >&6
1591
Jack Jansen6b08a402004-06-03 12:41:45 +00001592# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
1593# it may influence the way we can build extensions, so distutils
1594# needs to check it
1595
1596CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
1597
Guido van Rossum627b2d71993-12-24 10:39:16 +00001598# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001599
1600# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1601# for debug/optimization stuff. BASECFLAGS is for flags that are required
1602# just to get things to compile and link. Users are free to override OPT
1603# when running configure or make. The build should not break if they do.
1604# BASECFLAGS should generally not be messed with, however.
1605
1606# XXX shouldn't some/most/all of this code be merged with the stuff later
1607# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001608echo "$as_me:$LINENO: checking for --without-gcc" >&5
1609echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1610
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001611# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001612if test "${with_gcc+set}" = set; then
1613 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001614
Guido van Rossum7f43da71994-08-01 12:15:30 +00001615 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001616 no) CC=cc
1617 without_gcc=yes;;
1618 yes) CC=gcc
1619 without_gcc=no;;
1620 *) CC=$withval
1621 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001622 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001623else
Martin v. Löwis11437992002-04-12 09:54:03 +00001624
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001625 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001626 AIX*) CC=cc_r
1627 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001628 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001629 case $BE_HOST_CPU in
1630 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001631 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001632 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001633 BASECFLAGS="$BASECFLAGS -export pragma"
1634 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001635 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001636 ;;
1637 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001638 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001639 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001640 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001641 ;;
1642 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001643 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1644echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1645 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001646 ;;
1647 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001648 AR="\$(srcdir)/Modules/ar_beos"
1649 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001650 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001651 Monterey*)
1652 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001653 without_gcc=;;
1654 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001655 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001656fi;
1657echo "$as_me:$LINENO: result: $without_gcc" >&5
1658echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001659
1660
Guido van Rossum95012191999-12-16 17:50:52 +00001661
Fred Drakea1a84e72001-03-06 05:52:16 +00001662MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001663echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1664echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1665
Guido van Rossum95012191999-12-16 17:50:52 +00001666# Check whether --with-cxx or --without-cxx was given.
1667if test "${with_cxx+set}" = set; then
1668 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001669
Martin v. Löwis22352952000-12-13 17:37:02 +00001670 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001671 case $withval in
1672 no) CXX=
1673 with_cxx=no;;
1674 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001675 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001676 with_cxx=$withval;;
1677 esac
1678else
Martin v. Löwis11437992002-04-12 09:54:03 +00001679
Guido van Rossum95012191999-12-16 17:50:52 +00001680 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001681 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001682
Martin v. Löwis11437992002-04-12 09:54:03 +00001683fi;
1684echo "$as_me:$LINENO: result: $with_cxx" >&5
1685echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001686
1687if test "$with_cxx" = "yes"
1688then
Martin v. Löwis11437992002-04-12 09:54:03 +00001689 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1690echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1691 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001692fi
1693
1694
1695
1696
Martin v. Löwis11437992002-04-12 09:54:03 +00001697if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001698then
1699 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1700do
Martin v. Löwis11437992002-04-12 09:54:03 +00001701 # Extract the first word of "$ac_prog", so it can be a program name with args.
Martin v. Löwis22352952000-12-13 17:37:02 +00001702set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001703echo "$as_me:$LINENO: checking for $ac_word" >&5
1704echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1705if test "${ac_cv_prog_CXX+set}" = set; then
1706 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001707else
1708 if test -n "$CXX"; then
1709 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1710else
Martin v. Löwis11437992002-04-12 09:54:03 +00001711as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1712for as_dir in $PATH
1713do
1714 IFS=$as_save_IFS
1715 test -z "$as_dir" && as_dir=.
1716 for ac_exec_ext in '' $ac_executable_extensions; do
1717 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1718 ac_cv_prog_CXX="$ac_prog"
1719 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1720 break 2
1721 fi
1722done
1723done
1724
Martin v. Löwis22352952000-12-13 17:37:02 +00001725fi
1726fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001727CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001728if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001729 echo "$as_me:$LINENO: result: $CXX" >&5
1730echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001731else
Martin v. Löwis11437992002-04-12 09:54:03 +00001732 echo "$as_me:$LINENO: result: no" >&5
1733echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001734fi
1735
Martin v. Löwis11437992002-04-12 09:54:03 +00001736 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001737done
1738test -n "$CXX" || CXX="notfound"
1739
1740 if test "$CXX" = "notfound"
1741 then
1742 CXX=
1743 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001744 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001745ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001746ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1747ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1748ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00001750/* confdefs.h. */
1751_ACEOF
1752cat confdefs.h >>conftest.$ac_ext
1753cat >>conftest.$ac_ext <<_ACEOF
1754/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001755
Martin v. Löwis11437992002-04-12 09:54:03 +00001756int
1757main ()
1758{
Michael W. Hudson54241132001-12-07 15:38:26 +00001759
Martin v. Löwis11437992002-04-12 09:54:03 +00001760 ;
1761 return 0;
1762}
1763_ACEOF
1764ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001765ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001766# Try to create an executable without -o first, disregard a.out.
1767# It will help us diagnose broken compilers, and finding out an intuition
1768# of exeext.
Skip Montanarof0d5f792004-08-15 14:08:23 +00001769echo "$as_me:$LINENO: checking for C++ compiler default output file name" >&5
1770echo $ECHO_N "checking for C++ compiler default output file name... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001771ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1772if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1773 (eval $ac_link_default) 2>&5
1774 ac_status=$?
1775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1776 (exit $ac_status); }; then
1777 # Find the output, starting from the most likely. This scheme is
1778# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1779# resort.
1780
1781# Be careful to initialize this variable, since it used to be cached.
1782# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1783ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001784# b.out is created by i960 compilers.
1785for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1786do
1787 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001788 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001789 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001790 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001791 conftest.$ac_ext )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001792 # This is the source file.
1793 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001794 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001795 # We found the default executable, but exeext='' is most
1796 # certainly right.
1797 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001798 *.* )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001799 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1800 # FIXME: I believe we export ac_cv_exeext for Libtool,
1801 # but it would be cool to find out if it's true. Does anybody
1802 # maintain Libtool? --akim.
1803 export ac_cv_exeext
1804 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001805 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00001806 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001807 esac
1808done
1809else
1810 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001811sed 's/^/| /' conftest.$ac_ext >&5
1812
1813{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1814See \`config.log' for more details." >&5
1815echo "$as_me: error: C++ compiler cannot create executables
1816See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001817 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001818fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001819
1820ac_exeext=$ac_cv_exeext
1821echo "$as_me:$LINENO: result: $ac_file" >&5
1822echo "${ECHO_T}$ac_file" >&6
1823
1824# Check the compiler produces executables we can run. If not, either
1825# the compiler is broken, or we cross compile.
1826echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1827echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1828# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1829# If not cross compiling, check that we can run a simple program.
1830if test "$cross_compiling" != yes; then
1831 if { ac_try='./$ac_file'
1832 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1833 (eval $ac_try) 2>&5
1834 ac_status=$?
1835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1836 (exit $ac_status); }; }; then
1837 cross_compiling=no
1838 else
1839 if test "$cross_compiling" = maybe; then
1840 cross_compiling=yes
1841 else
1842 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001843If you meant to cross compile, use \`--host'.
1844See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001845echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001846If you meant to cross compile, use \`--host'.
1847See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001848 { (exit 1); exit 1; }; }
1849 fi
1850 fi
1851fi
1852echo "$as_me:$LINENO: result: yes" >&5
1853echo "${ECHO_T}yes" >&6
1854
Skip Montanaro6dead952003-09-25 14:50:04 +00001855rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001856ac_clean_files=$ac_clean_files_save
1857# Check the compiler produces executables we can run. If not, either
1858# the compiler is broken, or we cross compile.
1859echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1860echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1861echo "$as_me:$LINENO: result: $cross_compiling" >&5
1862echo "${ECHO_T}$cross_compiling" >&6
1863
1864echo "$as_me:$LINENO: checking for suffix of executables" >&5
1865echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1866if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1867 (eval $ac_link) 2>&5
1868 ac_status=$?
1869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1870 (exit $ac_status); }; then
1871 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1872# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1873# work properly (i.e., refer to `conftest.exe'), while it won't with
1874# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001875for ac_file in conftest.exe conftest conftest.*; do
1876 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001877 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001878 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001879 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00001880 export ac_cv_exeext
1881 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001882 * ) break;;
1883 esac
1884done
1885else
Skip Montanaro6dead952003-09-25 14:50:04 +00001886 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1887See \`config.log' for more details." >&5
1888echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1889See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001890 { (exit 1); exit 1; }; }
1891fi
1892
1893rm -f conftest$ac_cv_exeext
1894echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1895echo "${ECHO_T}$ac_cv_exeext" >&6
1896
1897rm -f conftest.$ac_ext
1898EXEEXT=$ac_cv_exeext
1899ac_exeext=$EXEEXT
1900
1901 ac_ext=c
1902ac_cpp='$CPP $CPPFLAGS'
1903ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1904ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1905ac_compiler_gnu=$ac_cv_c_compiler_gnu
1906
1907
Martin v. Löwis22352952000-12-13 17:37:02 +00001908
1909 fi
1910fi
1911
Guido van Rossum8b131c51995-03-09 14:10:13 +00001912# If the user switches compilers, we can't believe the cache
1913if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1914then
Martin v. Löwis11437992002-04-12 09:54:03 +00001915 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1916(it is also a good idea to do 'make clean' before compiling)" >&5
1917echo "$as_me: error: cached CC is different -- throw away $cache_file
1918(it is also a good idea to do 'make clean' before compiling)" >&2;}
1919 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001920fi
1921
Martin v. Löwis11437992002-04-12 09:54:03 +00001922ac_ext=c
1923ac_cpp='$CPP $CPPFLAGS'
1924ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1925ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1926ac_compiler_gnu=$ac_cv_c_compiler_gnu
1927if test -n "$ac_tool_prefix"; then
1928 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1929set dummy ${ac_tool_prefix}gcc; ac_word=$2
1930echo "$as_me:$LINENO: checking for $ac_word" >&5
1931echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1932if test "${ac_cv_prog_CC+set}" = set; then
1933 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001934else
1935 if test -n "$CC"; then
1936 ac_cv_prog_CC="$CC" # Let the user override the test.
1937else
Martin v. Löwis11437992002-04-12 09:54:03 +00001938as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1939for as_dir in $PATH
1940do
1941 IFS=$as_save_IFS
1942 test -z "$as_dir" && as_dir=.
1943 for ac_exec_ext in '' $ac_executable_extensions; do
1944 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1945 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1946 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1947 break 2
1948 fi
1949done
1950done
1951
Jack Jansendd19cf82001-12-06 22:36:17 +00001952fi
1953fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001954CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001955if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001956 echo "$as_me:$LINENO: result: $CC" >&5
1957echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001958else
Martin v. Löwis11437992002-04-12 09:54:03 +00001959 echo "$as_me:$LINENO: result: no" >&5
1960echo "${ECHO_T}no" >&6
1961fi
1962
1963fi
1964if test -z "$ac_cv_prog_CC"; then
1965 ac_ct_CC=$CC
1966 # Extract the first word of "gcc", so it can be a program name with args.
1967set dummy gcc; ac_word=$2
1968echo "$as_me:$LINENO: checking for $ac_word" >&5
1969echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1970if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1971 echo $ECHO_N "(cached) $ECHO_C" >&6
1972else
1973 if test -n "$ac_ct_CC"; then
1974 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1975else
1976as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1977for as_dir in $PATH
1978do
1979 IFS=$as_save_IFS
1980 test -z "$as_dir" && as_dir=.
1981 for ac_exec_ext in '' $ac_executable_extensions; do
1982 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1983 ac_cv_prog_ac_ct_CC="gcc"
1984 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1985 break 2
1986 fi
1987done
1988done
1989
1990fi
1991fi
1992ac_ct_CC=$ac_cv_prog_ac_ct_CC
1993if test -n "$ac_ct_CC"; then
1994 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1995echo "${ECHO_T}$ac_ct_CC" >&6
1996else
1997 echo "$as_me:$LINENO: result: no" >&5
1998echo "${ECHO_T}no" >&6
1999fi
2000
2001 CC=$ac_ct_CC
2002else
2003 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002004fi
2005
Jack Jansendd19cf82001-12-06 22:36:17 +00002006if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002007 if test -n "$ac_tool_prefix"; then
2008 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2009set dummy ${ac_tool_prefix}cc; ac_word=$2
2010echo "$as_me:$LINENO: checking for $ac_word" >&5
2011echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2012if test "${ac_cv_prog_CC+set}" = set; then
2013 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002014else
2015 if test -n "$CC"; then
2016 ac_cv_prog_CC="$CC" # Let the user override the test.
2017else
Martin v. Löwis11437992002-04-12 09:54:03 +00002018as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2019for as_dir in $PATH
2020do
2021 IFS=$as_save_IFS
2022 test -z "$as_dir" && as_dir=.
2023 for ac_exec_ext in '' $ac_executable_extensions; do
2024 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2025 ac_cv_prog_CC="${ac_tool_prefix}cc"
2026 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2027 break 2
2028 fi
2029done
2030done
2031
2032fi
2033fi
2034CC=$ac_cv_prog_CC
2035if test -n "$CC"; then
2036 echo "$as_me:$LINENO: result: $CC" >&5
2037echo "${ECHO_T}$CC" >&6
2038else
2039 echo "$as_me:$LINENO: result: no" >&5
2040echo "${ECHO_T}no" >&6
2041fi
2042
2043fi
2044if test -z "$ac_cv_prog_CC"; then
2045 ac_ct_CC=$CC
2046 # Extract the first word of "cc", so it can be a program name with args.
2047set dummy cc; ac_word=$2
2048echo "$as_me:$LINENO: checking for $ac_word" >&5
2049echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2050if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2051 echo $ECHO_N "(cached) $ECHO_C" >&6
2052else
2053 if test -n "$ac_ct_CC"; then
2054 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2055else
2056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2057for as_dir in $PATH
2058do
2059 IFS=$as_save_IFS
2060 test -z "$as_dir" && as_dir=.
2061 for ac_exec_ext in '' $ac_executable_extensions; do
2062 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2063 ac_cv_prog_ac_ct_CC="cc"
2064 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2065 break 2
2066 fi
2067done
2068done
2069
2070fi
2071fi
2072ac_ct_CC=$ac_cv_prog_ac_ct_CC
2073if test -n "$ac_ct_CC"; then
2074 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2075echo "${ECHO_T}$ac_ct_CC" >&6
2076else
2077 echo "$as_me:$LINENO: result: no" >&5
2078echo "${ECHO_T}no" >&6
2079fi
2080
2081 CC=$ac_ct_CC
2082else
2083 CC="$ac_cv_prog_CC"
2084fi
2085
2086fi
2087if test -z "$CC"; then
2088 # Extract the first word of "cc", so it can be a program name with args.
2089set dummy cc; ac_word=$2
2090echo "$as_me:$LINENO: checking for $ac_word" >&5
2091echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2092if test "${ac_cv_prog_CC+set}" = set; then
2093 echo $ECHO_N "(cached) $ECHO_C" >&6
2094else
2095 if test -n "$CC"; then
2096 ac_cv_prog_CC="$CC" # Let the user override the test.
2097else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002098 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002099as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2100for as_dir in $PATH
2101do
2102 IFS=$as_save_IFS
2103 test -z "$as_dir" && as_dir=.
2104 for ac_exec_ext in '' $ac_executable_extensions; do
2105 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2106 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2107 ac_prog_rejected=yes
2108 continue
2109 fi
2110 ac_cv_prog_CC="cc"
2111 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2112 break 2
2113 fi
2114done
2115done
2116
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002117if test $ac_prog_rejected = yes; then
2118 # We found a bogon in the path, so make sure we never use it.
2119 set dummy $ac_cv_prog_CC
2120 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002121 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002122 # We chose a different compiler from the bogus one.
2123 # However, it has the same basename, so the bogon will be chosen
2124 # first if we set CC to just the basename; use the full file name.
2125 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002126 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002127 fi
2128fi
2129fi
2130fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002131CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002132if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002133 echo "$as_me:$LINENO: result: $CC" >&5
2134echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002135else
Martin v. Löwis11437992002-04-12 09:54:03 +00002136 echo "$as_me:$LINENO: result: no" >&5
2137echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002138fi
2139
Martin v. Löwis11437992002-04-12 09:54:03 +00002140fi
2141if test -z "$CC"; then
2142 if test -n "$ac_tool_prefix"; then
2143 for ac_prog in cl
2144 do
2145 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2146set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2147echo "$as_me:$LINENO: checking for $ac_word" >&5
2148echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2149if test "${ac_cv_prog_CC+set}" = set; then
2150 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002151else
2152 if test -n "$CC"; then
2153 ac_cv_prog_CC="$CC" # Let the user override the test.
2154else
Martin v. Löwis11437992002-04-12 09:54:03 +00002155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2156for as_dir in $PATH
2157do
2158 IFS=$as_save_IFS
2159 test -z "$as_dir" && as_dir=.
2160 for ac_exec_ext in '' $ac_executable_extensions; do
2161 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2162 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2163 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2164 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002165 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002166done
2167done
2168
2169fi
2170fi
2171CC=$ac_cv_prog_CC
2172if test -n "$CC"; then
2173 echo "$as_me:$LINENO: result: $CC" >&5
2174echo "${ECHO_T}$CC" >&6
2175else
2176 echo "$as_me:$LINENO: result: no" >&5
2177echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002178fi
2179
Martin v. Löwis11437992002-04-12 09:54:03 +00002180 test -n "$CC" && break
2181 done
2182fi
2183if test -z "$CC"; then
2184 ac_ct_CC=$CC
2185 for ac_prog in cl
2186do
2187 # Extract the first word of "$ac_prog", so it can be a program name with args.
2188set dummy $ac_prog; ac_word=$2
2189echo "$as_me:$LINENO: checking for $ac_word" >&5
2190echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2191if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2192 echo $ECHO_N "(cached) $ECHO_C" >&6
2193else
2194 if test -n "$ac_ct_CC"; then
2195 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2196else
2197as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2198for as_dir in $PATH
2199do
2200 IFS=$as_save_IFS
2201 test -z "$as_dir" && as_dir=.
2202 for ac_exec_ext in '' $ac_executable_extensions; do
2203 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2204 ac_cv_prog_ac_ct_CC="$ac_prog"
2205 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2206 break 2
2207 fi
2208done
2209done
Jack Jansendd19cf82001-12-06 22:36:17 +00002210
Martin v. Löwis11437992002-04-12 09:54:03 +00002211fi
2212fi
2213ac_ct_CC=$ac_cv_prog_ac_ct_CC
2214if test -n "$ac_ct_CC"; then
2215 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2216echo "${ECHO_T}$ac_ct_CC" >&6
2217else
2218 echo "$as_me:$LINENO: result: no" >&5
2219echo "${ECHO_T}no" >&6
2220fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002221
Martin v. Löwis11437992002-04-12 09:54:03 +00002222 test -n "$ac_ct_CC" && break
2223done
Michael W. Hudson54241132001-12-07 15:38:26 +00002224
Martin v. Löwis11437992002-04-12 09:54:03 +00002225 CC=$ac_ct_CC
2226fi
2227
2228fi
2229
2230
Skip Montanaro6dead952003-09-25 14:50:04 +00002231test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2232See \`config.log' for more details." >&5
2233echo "$as_me: error: no acceptable C compiler found in \$PATH
2234See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002235 { (exit 1); exit 1; }; }
2236
2237# Provide some information about the compiler.
2238echo "$as_me:$LINENO:" \
2239 "checking for C compiler version" >&5
2240ac_compiler=`set X $ac_compile; echo $2`
2241{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2242 (eval $ac_compiler --version </dev/null >&5) 2>&5
2243 ac_status=$?
2244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2245 (exit $ac_status); }
2246{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2247 (eval $ac_compiler -v </dev/null >&5) 2>&5
2248 ac_status=$?
2249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2250 (exit $ac_status); }
2251{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2252 (eval $ac_compiler -V </dev/null >&5) 2>&5
2253 ac_status=$?
2254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2255 (exit $ac_status); }
2256
2257cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002258/* confdefs.h. */
2259_ACEOF
2260cat confdefs.h >>conftest.$ac_ext
2261cat >>conftest.$ac_ext <<_ACEOF
2262/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002263
Martin v. Löwis11437992002-04-12 09:54:03 +00002264int
2265main ()
2266{
2267
2268 ;
2269 return 0;
2270}
2271_ACEOF
2272ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002273ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002274# Try to create an executable without -o first, disregard a.out.
2275# It will help us diagnose broken compilers, and finding out an intuition
2276# of exeext.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002277echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2278echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002279ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2280if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2281 (eval $ac_link_default) 2>&5
2282 ac_status=$?
2283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2284 (exit $ac_status); }; then
2285 # Find the output, starting from the most likely. This scheme is
2286# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2287# resort.
2288
2289# Be careful to initialize this variable, since it used to be cached.
2290# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2291ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002292# b.out is created by i960 compilers.
2293for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2294do
2295 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002296 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002297 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002298 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002299 conftest.$ac_ext )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002300 # This is the source file.
2301 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002302 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002303 # We found the default executable, but exeext='' is most
2304 # certainly right.
2305 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002306 *.* )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002307 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2308 # FIXME: I believe we export ac_cv_exeext for Libtool,
2309 # but it would be cool to find out if it's true. Does anybody
2310 # maintain Libtool? --akim.
2311 export ac_cv_exeext
2312 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002313 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002314 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002315 esac
2316done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002317else
Martin v. Löwis11437992002-04-12 09:54:03 +00002318 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002319sed 's/^/| /' conftest.$ac_ext >&5
2320
2321{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2322See \`config.log' for more details." >&5
2323echo "$as_me: error: C compiler cannot create executables
2324See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002325 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002326fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002327
Martin v. Löwis11437992002-04-12 09:54:03 +00002328ac_exeext=$ac_cv_exeext
2329echo "$as_me:$LINENO: result: $ac_file" >&5
2330echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002331
Martin v. Löwis11437992002-04-12 09:54:03 +00002332# Check the compiler produces executables we can run. If not, either
2333# the compiler is broken, or we cross compile.
2334echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2335echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2336# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2337# If not cross compiling, check that we can run a simple program.
2338if test "$cross_compiling" != yes; then
2339 if { ac_try='./$ac_file'
2340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2341 (eval $ac_try) 2>&5
2342 ac_status=$?
2343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2344 (exit $ac_status); }; }; then
2345 cross_compiling=no
2346 else
2347 if test "$cross_compiling" = maybe; then
2348 cross_compiling=yes
2349 else
2350 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002351If you meant to cross compile, use \`--host'.
2352See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002353echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002354If you meant to cross compile, use \`--host'.
2355See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002356 { (exit 1); exit 1; }; }
2357 fi
2358 fi
2359fi
2360echo "$as_me:$LINENO: result: yes" >&5
2361echo "${ECHO_T}yes" >&6
2362
Skip Montanaro6dead952003-09-25 14:50:04 +00002363rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002364ac_clean_files=$ac_clean_files_save
2365# Check the compiler produces executables we can run. If not, either
2366# the compiler is broken, or we cross compile.
2367echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2368echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2369echo "$as_me:$LINENO: result: $cross_compiling" >&5
2370echo "${ECHO_T}$cross_compiling" >&6
2371
2372echo "$as_me:$LINENO: checking for suffix of executables" >&5
2373echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2374if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2375 (eval $ac_link) 2>&5
2376 ac_status=$?
2377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2378 (exit $ac_status); }; then
2379 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2380# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2381# work properly (i.e., refer to `conftest.exe'), while it won't with
2382# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002383for ac_file in conftest.exe conftest conftest.*; do
2384 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002385 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002386 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002387 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002388 export ac_cv_exeext
2389 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002390 * ) break;;
2391 esac
2392done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002393else
Skip Montanaro6dead952003-09-25 14:50:04 +00002394 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2395See \`config.log' for more details." >&5
2396echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2397See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002398 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002399fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002400
Martin v. Löwis11437992002-04-12 09:54:03 +00002401rm -f conftest$ac_cv_exeext
2402echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2403echo "${ECHO_T}$ac_cv_exeext" >&6
2404
2405rm -f conftest.$ac_ext
2406EXEEXT=$ac_cv_exeext
2407ac_exeext=$EXEEXT
2408echo "$as_me:$LINENO: checking for suffix of object files" >&5
2409echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2410if test "${ac_cv_objext+set}" = set; then
2411 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002412else
Martin v. Löwis11437992002-04-12 09:54:03 +00002413 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002414/* confdefs.h. */
2415_ACEOF
2416cat confdefs.h >>conftest.$ac_ext
2417cat >>conftest.$ac_ext <<_ACEOF
2418/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002419
Martin v. Löwis11437992002-04-12 09:54:03 +00002420int
2421main ()
2422{
2423
2424 ;
2425 return 0;
2426}
2427_ACEOF
2428rm -f conftest.o conftest.obj
2429if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2430 (eval $ac_compile) 2>&5
2431 ac_status=$?
2432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2433 (exit $ac_status); }; then
2434 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2435 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002436 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002437 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2438 break;;
2439 esac
2440done
2441else
2442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002443sed 's/^/| /' conftest.$ac_ext >&5
2444
2445{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2446See \`config.log' for more details." >&5
2447echo "$as_me: error: cannot compute suffix of object files: cannot compile
2448See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002449 { (exit 1); exit 1; }; }
2450fi
2451
2452rm -f conftest.$ac_cv_objext conftest.$ac_ext
2453fi
2454echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2455echo "${ECHO_T}$ac_cv_objext" >&6
2456OBJEXT=$ac_cv_objext
2457ac_objext=$OBJEXT
2458echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2459echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2460if test "${ac_cv_c_compiler_gnu+set}" = set; then
2461 echo $ECHO_N "(cached) $ECHO_C" >&6
2462else
2463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002464/* confdefs.h. */
2465_ACEOF
2466cat confdefs.h >>conftest.$ac_ext
2467cat >>conftest.$ac_ext <<_ACEOF
2468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002469
Martin v. Löwis11437992002-04-12 09:54:03 +00002470int
2471main ()
2472{
2473#ifndef __GNUC__
2474 choke me
2475#endif
2476
2477 ;
2478 return 0;
2479}
2480_ACEOF
2481rm -f conftest.$ac_objext
2482if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002483 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002484 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002485 grep -v '^ *+' conftest.er1 >conftest.err
2486 rm -f conftest.er1
2487 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2489 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002490 { ac_try='test -z "$ac_c_werror_flag"
2491 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2493 (eval $ac_try) 2>&5
2494 ac_status=$?
2495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2496 (exit $ac_status); }; } &&
2497 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2499 (eval $ac_try) 2>&5
2500 ac_status=$?
2501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2502 (exit $ac_status); }; }; then
2503 ac_compiler_gnu=yes
2504else
2505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002506sed 's/^/| /' conftest.$ac_ext >&5
2507
Martin v. Löwis11437992002-04-12 09:54:03 +00002508ac_compiler_gnu=no
2509fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002510rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002511ac_cv_c_compiler_gnu=$ac_compiler_gnu
2512
2513fi
2514echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2515echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2516GCC=`test $ac_compiler_gnu = yes && echo yes`
2517ac_test_CFLAGS=${CFLAGS+set}
2518ac_save_CFLAGS=$CFLAGS
2519CFLAGS="-g"
2520echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2521echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2522if test "${ac_cv_prog_cc_g+set}" = set; then
2523 echo $ECHO_N "(cached) $ECHO_C" >&6
2524else
2525 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002526/* confdefs.h. */
2527_ACEOF
2528cat confdefs.h >>conftest.$ac_ext
2529cat >>conftest.$ac_ext <<_ACEOF
2530/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002531
Martin v. Löwis11437992002-04-12 09:54:03 +00002532int
2533main ()
2534{
2535
2536 ;
2537 return 0;
2538}
2539_ACEOF
2540rm -f conftest.$ac_objext
2541if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002542 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002543 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002544 grep -v '^ *+' conftest.er1 >conftest.err
2545 rm -f conftest.er1
2546 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2548 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002549 { ac_try='test -z "$ac_c_werror_flag"
2550 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2552 (eval $ac_try) 2>&5
2553 ac_status=$?
2554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2555 (exit $ac_status); }; } &&
2556 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2558 (eval $ac_try) 2>&5
2559 ac_status=$?
2560 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2561 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002562 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002563else
Martin v. Löwis11437992002-04-12 09:54:03 +00002564 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002565sed 's/^/| /' conftest.$ac_ext >&5
2566
Martin v. Löwis11437992002-04-12 09:54:03 +00002567ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002568fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002569rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002570fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002571echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2572echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002573if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002574 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002575elif test $ac_cv_prog_cc_g = yes; then
2576 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002577 CFLAGS="-g -O2"
2578 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002579 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002580 fi
2581else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002582 if test "$GCC" = yes; then
2583 CFLAGS="-O2"
2584 else
2585 CFLAGS=
2586 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002587fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002588echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2589echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2590if test "${ac_cv_prog_cc_stdc+set}" = set; then
2591 echo $ECHO_N "(cached) $ECHO_C" >&6
2592else
2593 ac_cv_prog_cc_stdc=no
2594ac_save_CC=$CC
2595cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002596/* confdefs.h. */
2597_ACEOF
2598cat confdefs.h >>conftest.$ac_ext
2599cat >>conftest.$ac_ext <<_ACEOF
2600/* end confdefs.h. */
2601#include <stdarg.h>
2602#include <stdio.h>
2603#include <sys/types.h>
2604#include <sys/stat.h>
2605/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2606struct buf { int x; };
2607FILE * (*rcsopen) (struct buf *, struct stat *, int);
2608static char *e (p, i)
2609 char **p;
2610 int i;
2611{
2612 return p[i];
2613}
2614static char *f (char * (*g) (char **, int), char **p, ...)
2615{
2616 char *s;
2617 va_list v;
2618 va_start (v,p);
2619 s = g (p, va_arg (v,int));
2620 va_end (v);
2621 return s;
2622}
Skip Montanarof0d5f792004-08-15 14:08:23 +00002623
2624/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
2625 function prototypes and stuff, but not '\xHH' hex character constants.
2626 These don't provoke an error unfortunately, instead are silently treated
2627 as 'x'. The following induces an error, until -std1 is added to get
2628 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
2629 array size at least. It's necessary to write '\x00'==0 to get something
2630 that's true only with -std1. */
2631int osf4_cc_array ['\x00' == 0 ? 1 : -1];
2632
Skip Montanaro6dead952003-09-25 14:50:04 +00002633int test (int i, double x);
2634struct s1 {int (*f) (int a);};
2635struct s2 {int (*f) (double a);};
2636int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2637int argc;
2638char **argv;
2639int
2640main ()
2641{
2642return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2643 ;
2644 return 0;
2645}
2646_ACEOF
2647# Don't try gcc -ansi; that turns off useful extensions and
2648# breaks some systems' header files.
2649# AIX -qlanglvl=ansi
2650# Ultrix and OSF/1 -std1
2651# HP-UX 10.20 and later -Ae
2652# HP-UX older versions -Aa -D_HPUX_SOURCE
2653# SVR4 -Xc -D__EXTENSIONS__
2654for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2655do
2656 CC="$ac_save_CC $ac_arg"
2657 rm -f conftest.$ac_objext
2658if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002659 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00002660 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002661 grep -v '^ *+' conftest.er1 >conftest.err
2662 rm -f conftest.er1
2663 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2665 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002666 { ac_try='test -z "$ac_c_werror_flag"
2667 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2669 (eval $ac_try) 2>&5
2670 ac_status=$?
2671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2672 (exit $ac_status); }; } &&
2673 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00002674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2675 (eval $ac_try) 2>&5
2676 ac_status=$?
2677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2678 (exit $ac_status); }; }; then
2679 ac_cv_prog_cc_stdc=$ac_arg
2680break
2681else
2682 echo "$as_me: failed program was:" >&5
2683sed 's/^/| /' conftest.$ac_ext >&5
2684
2685fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002686rm -f conftest.err conftest.$ac_objext
Skip Montanaro6dead952003-09-25 14:50:04 +00002687done
2688rm -f conftest.$ac_ext conftest.$ac_objext
2689CC=$ac_save_CC
2690
2691fi
2692
2693case "x$ac_cv_prog_cc_stdc" in
2694 x|xno)
2695 echo "$as_me:$LINENO: result: none needed" >&5
2696echo "${ECHO_T}none needed" >&6 ;;
2697 *)
2698 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2699echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2700 CC="$CC $ac_cv_prog_cc_stdc" ;;
2701esac
2702
Martin v. Löwis11437992002-04-12 09:54:03 +00002703# Some people use a C++ compiler to compile C. Since we use `exit',
2704# in C++ we need to declare it. In case someone uses the same compiler
2705# for both compiling C and C++ we need to have the C++ compiler decide
2706# the declaration of exit, since it's the most demanding environment.
2707cat >conftest.$ac_ext <<_ACEOF
2708#ifndef __cplusplus
2709 choke me
2710#endif
2711_ACEOF
2712rm -f conftest.$ac_objext
2713if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002714 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002716 grep -v '^ *+' conftest.er1 >conftest.err
2717 rm -f conftest.er1
2718 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2720 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002721 { ac_try='test -z "$ac_c_werror_flag"
2722 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2724 (eval $ac_try) 2>&5
2725 ac_status=$?
2726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2727 (exit $ac_status); }; } &&
2728 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2730 (eval $ac_try) 2>&5
2731 ac_status=$?
2732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2733 (exit $ac_status); }; }; then
2734 for ac_declaration in \
Skip Montanarof0d5f792004-08-15 14:08:23 +00002735 '' \
Martin v. Löwis11437992002-04-12 09:54:03 +00002736 'extern "C" void std::exit (int) throw (); using std::exit;' \
2737 'extern "C" void std::exit (int); using std::exit;' \
2738 'extern "C" void exit (int) throw ();' \
2739 'extern "C" void exit (int);' \
2740 'void exit (int);'
2741do
2742 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002743/* confdefs.h. */
2744_ACEOF
2745cat confdefs.h >>conftest.$ac_ext
2746cat >>conftest.$ac_ext <<_ACEOF
2747/* end confdefs.h. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002748$ac_declaration
Skip Montanarof0d5f792004-08-15 14:08:23 +00002749#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00002750int
2751main ()
2752{
2753exit (42);
2754 ;
2755 return 0;
2756}
2757_ACEOF
2758rm -f conftest.$ac_objext
2759if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002760 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002761 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002762 grep -v '^ *+' conftest.er1 >conftest.err
2763 rm -f conftest.er1
2764 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2766 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002767 { ac_try='test -z "$ac_c_werror_flag"
2768 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002769 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2770 (eval $ac_try) 2>&5
2771 ac_status=$?
2772 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2773 (exit $ac_status); }; } &&
2774 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002775 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2776 (eval $ac_try) 2>&5
2777 ac_status=$?
2778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2779 (exit $ac_status); }; }; then
2780 :
2781else
2782 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002783sed 's/^/| /' conftest.$ac_ext >&5
2784
Martin v. Löwis11437992002-04-12 09:54:03 +00002785continue
2786fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002787rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002788 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002789/* confdefs.h. */
2790_ACEOF
2791cat confdefs.h >>conftest.$ac_ext
2792cat >>conftest.$ac_ext <<_ACEOF
2793/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002794$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002795int
2796main ()
2797{
2798exit (42);
2799 ;
2800 return 0;
2801}
2802_ACEOF
2803rm -f conftest.$ac_objext
2804if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00002805 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00002806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00002807 grep -v '^ *+' conftest.er1 >conftest.err
2808 rm -f conftest.er1
2809 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2811 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00002812 { ac_try='test -z "$ac_c_werror_flag"
2813 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00002814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2815 (eval $ac_try) 2>&5
2816 ac_status=$?
2817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2818 (exit $ac_status); }; } &&
2819 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2821 (eval $ac_try) 2>&5
2822 ac_status=$?
2823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2824 (exit $ac_status); }; }; then
2825 break
2826else
2827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002828sed 's/^/| /' conftest.$ac_ext >&5
2829
Martin v. Löwis11437992002-04-12 09:54:03 +00002830fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002831rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002832done
2833rm -f conftest*
2834if test -n "$ac_declaration"; then
2835 echo '#ifdef __cplusplus' >>confdefs.h
2836 echo $ac_declaration >>confdefs.h
2837 echo '#endif' >>confdefs.h
2838fi
2839
2840else
2841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002842sed 's/^/| /' conftest.$ac_ext >&5
2843
Martin v. Löwis11437992002-04-12 09:54:03 +00002844fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00002845rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002846ac_ext=c
2847ac_cpp='$CPP $CPPFLAGS'
2848ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2849ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2850ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002851
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002852
2853# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002854
2855ac_ext=c
2856ac_cpp='$CPP $CPPFLAGS'
2857ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2858ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2859ac_compiler_gnu=$ac_cv_c_compiler_gnu
2860echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2861echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002862# On Suns, sometimes $CPP names a directory.
2863if test -n "$CPP" && test -d "$CPP"; then
2864 CPP=
2865fi
2866if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002867 if test "${ac_cv_prog_CPP+set}" = set; then
2868 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002869else
Martin v. Löwis11437992002-04-12 09:54:03 +00002870 # Double quotes because CPP needs to be expanded
2871 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2872 do
2873 ac_preproc_ok=false
2874for ac_c_preproc_warn_flag in '' yes
2875do
2876 # Use a header file that comes with gcc, so configuring glibc
2877 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002878 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2879 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002880 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002881 # not just through cpp. "Syntax error" is here to catch this case.
2882 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002883/* confdefs.h. */
2884_ACEOF
2885cat confdefs.h >>conftest.$ac_ext
2886cat >>conftest.$ac_ext <<_ACEOF
2887/* end confdefs.h. */
2888#ifdef __STDC__
2889# include <limits.h>
2890#else
2891# include <assert.h>
2892#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00002893 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00002894_ACEOF
2895if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2896 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2897 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002898 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002899 rm -f conftest.er1
2900 cat conftest.err >&5
2901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2902 (exit $ac_status); } >/dev/null; then
2903 if test -s conftest.err; then
2904 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00002905 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00002906 else
2907 ac_cpp_err=
2908 fi
2909else
2910 ac_cpp_err=yes
2911fi
2912if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002913 :
2914else
Martin v. Löwis11437992002-04-12 09:54:03 +00002915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002916sed 's/^/| /' conftest.$ac_ext >&5
2917
Martin v. Löwis11437992002-04-12 09:54:03 +00002918 # Broken: fails on valid input.
2919continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002920fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002921rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002922
Martin v. Löwis11437992002-04-12 09:54:03 +00002923 # OK, works on sane cases. Now check whether non-existent headers
2924 # can be detected and how.
2925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002926/* confdefs.h. */
2927_ACEOF
2928cat confdefs.h >>conftest.$ac_ext
2929cat >>conftest.$ac_ext <<_ACEOF
2930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002931#include <ac_nonexistent.h>
2932_ACEOF
2933if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2934 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2935 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002936 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002937 rm -f conftest.er1
2938 cat conftest.err >&5
2939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2940 (exit $ac_status); } >/dev/null; then
2941 if test -s conftest.err; then
2942 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00002943 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00002944 else
2945 ac_cpp_err=
2946 fi
2947else
2948 ac_cpp_err=yes
2949fi
2950if test -z "$ac_cpp_err"; then
2951 # Broken: success on invalid input.
2952continue
2953else
2954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002955sed 's/^/| /' conftest.$ac_ext >&5
2956
Martin v. Löwis11437992002-04-12 09:54:03 +00002957 # Passes both tests.
2958ac_preproc_ok=:
2959break
2960fi
2961rm -f conftest.err conftest.$ac_ext
2962
2963done
2964# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2965rm -f conftest.err conftest.$ac_ext
2966if $ac_preproc_ok; then
2967 break
2968fi
2969
2970 done
2971 ac_cv_prog_CPP=$CPP
2972
2973fi
2974 CPP=$ac_cv_prog_CPP
2975else
2976 ac_cv_prog_CPP=$CPP
2977fi
2978echo "$as_me:$LINENO: result: $CPP" >&5
2979echo "${ECHO_T}$CPP" >&6
2980ac_preproc_ok=false
2981for ac_c_preproc_warn_flag in '' yes
2982do
2983 # Use a header file that comes with gcc, so configuring glibc
2984 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002985 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2986 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002987 # On the NeXT, cc -E runs the code through the compiler's parser,
2988 # not just through cpp. "Syntax error" is here to catch this case.
2989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002990/* confdefs.h. */
2991_ACEOF
2992cat confdefs.h >>conftest.$ac_ext
2993cat >>conftest.$ac_ext <<_ACEOF
2994/* end confdefs.h. */
2995#ifdef __STDC__
2996# include <limits.h>
2997#else
2998# include <assert.h>
2999#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003000 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003001_ACEOF
3002if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3003 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3004 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003005 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003006 rm -f conftest.er1
3007 cat conftest.err >&5
3008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3009 (exit $ac_status); } >/dev/null; then
3010 if test -s conftest.err; then
3011 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003012 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003013 else
3014 ac_cpp_err=
3015 fi
3016else
3017 ac_cpp_err=yes
3018fi
3019if test -z "$ac_cpp_err"; then
3020 :
3021else
3022 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003023sed 's/^/| /' conftest.$ac_ext >&5
3024
Martin v. Löwis11437992002-04-12 09:54:03 +00003025 # Broken: fails on valid input.
3026continue
3027fi
3028rm -f conftest.err conftest.$ac_ext
3029
3030 # OK, works on sane cases. Now check whether non-existent headers
3031 # can be detected and how.
3032 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003033/* confdefs.h. */
3034_ACEOF
3035cat confdefs.h >>conftest.$ac_ext
3036cat >>conftest.$ac_ext <<_ACEOF
3037/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003038#include <ac_nonexistent.h>
3039_ACEOF
3040if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
3041 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3042 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003043 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003044 rm -f conftest.er1
3045 cat conftest.err >&5
3046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3047 (exit $ac_status); } >/dev/null; then
3048 if test -s conftest.err; then
3049 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00003050 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00003051 else
3052 ac_cpp_err=
3053 fi
3054else
3055 ac_cpp_err=yes
3056fi
3057if test -z "$ac_cpp_err"; then
3058 # Broken: success on invalid input.
3059continue
3060else
3061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003062sed 's/^/| /' conftest.$ac_ext >&5
3063
Martin v. Löwis11437992002-04-12 09:54:03 +00003064 # Passes both tests.
3065ac_preproc_ok=:
3066break
3067fi
3068rm -f conftest.err conftest.$ac_ext
3069
3070done
3071# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3072rm -f conftest.err conftest.$ac_ext
3073if $ac_preproc_ok; then
3074 :
3075else
Skip Montanaro6dead952003-09-25 14:50:04 +00003076 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
3077See \`config.log' for more details." >&5
3078echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
3079See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00003080 { (exit 1); exit 1; }; }
3081fi
3082
3083ac_ext=c
3084ac_cpp='$CPP $CPPFLAGS'
3085ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3086ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3087ac_compiler_gnu=$ac_cv_c_compiler_gnu
3088
3089
Skip Montanaro6dead952003-09-25 14:50:04 +00003090echo "$as_me:$LINENO: checking for egrep" >&5
3091echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3092if test "${ac_cv_prog_egrep+set}" = set; then
3093 echo $ECHO_N "(cached) $ECHO_C" >&6
3094else
3095 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3096 then ac_cv_prog_egrep='grep -E'
3097 else ac_cv_prog_egrep='egrep'
3098 fi
3099fi
3100echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
3101echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3102 EGREP=$ac_cv_prog_egrep
3103
3104
Martin v. Löwis11437992002-04-12 09:54:03 +00003105
3106echo "$as_me:$LINENO: checking for AIX" >&5
3107echo $ECHO_N "checking for AIX... $ECHO_C" >&6
3108cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003109/* confdefs.h. */
3110_ACEOF
3111cat confdefs.h >>conftest.$ac_ext
3112cat >>conftest.$ac_ext <<_ACEOF
3113/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003114#ifdef _AIX
3115 yes
3116#endif
3117
Martin v. Löwis11437992002-04-12 09:54:03 +00003118_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003120 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003121 echo "$as_me:$LINENO: result: yes" >&5
3122echo "${ECHO_T}yes" >&6
3123cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003124#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003125_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003126
3127else
Martin v. Löwis11437992002-04-12 09:54:03 +00003128 echo "$as_me:$LINENO: result: no" >&5
3129echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003130fi
3131rm -f conftest*
3132
Michael W. Hudson54241132001-12-07 15:38:26 +00003133
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003134
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003135# Check for unsupported systems
3136case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003137Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003138 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3139 echo See README for details.
3140 exit 1;;
3141esac
3142
Michael W. Hudson54241132001-12-07 15:38:26 +00003143
Martin v. Löwis11437992002-04-12 09:54:03 +00003144echo "$as_me:$LINENO: checking for --with-suffix" >&5
3145echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003146
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003147# Check whether --with-suffix or --without-suffix was given.
3148if test "${with_suffix+set}" = set; then
3149 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003150
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003151 case $withval in
3152 no) EXEEXT=;;
3153 yes) EXEEXT=.exe;;
3154 *) EXEEXT=$withval;;
3155 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003156fi;
3157echo "$as_me:$LINENO: result: $EXEEXT" >&5
3158echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003159
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003160# Test whether we're running on a non-case-sensitive system, in which
3161# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003162
Martin v. Löwis11437992002-04-12 09:54:03 +00003163echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3164echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003165if test ! -d CaseSensitiveTestDir; then
3166mkdir CaseSensitiveTestDir
3167fi
3168
3169if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003170then
Martin v. Löwis11437992002-04-12 09:54:03 +00003171 echo "$as_me:$LINENO: result: yes" >&5
3172echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003173 BUILDEXEEXT=.exe
3174else
Martin v. Löwis11437992002-04-12 09:54:03 +00003175 echo "$as_me:$LINENO: result: no" >&5
3176echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003177 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003178fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003179rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003180
Guido van Rossumdd997f71998-10-07 19:58:26 +00003181case $MACHDEP in
3182bsdos*)
3183 case $CC in
3184 gcc) CC="$CC -D_HAVE_BSDI";;
3185 esac;;
3186esac
3187
Guido van Rossum24b1e751997-08-21 02:29:16 +00003188case $ac_sys_system in
3189hp*|HP*)
3190 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003191 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003192 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003193Monterey*)
3194 case $CC in
3195 cc) CC="$CC -Wl,-Bexport";;
3196 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003197SunOS*)
3198 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003199
3200cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003201#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003202_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003203
3204 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003205esac
3206
Michael W. Hudson54241132001-12-07 15:38:26 +00003207
3208
Martin v. Löwis11437992002-04-12 09:54:03 +00003209echo "$as_me:$LINENO: checking LIBRARY" >&5
3210echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003211if test -z "$LIBRARY"
3212then
3213 LIBRARY='libpython$(VERSION).a'
3214fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003215echo "$as_me:$LINENO: result: $LIBRARY" >&5
3216echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003217
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003218# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003219# name of the library into which to insert object files). BLDLIBRARY is also
3220# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3221# is blank as the main program is not linked directly against LDLIBRARY.
3222# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3223# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3224# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3225# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003226#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003227# RUNSHARED is used to run shared python without installed libraries
3228#
3229# INSTSONAME is the name of the shared library that will be use to install
3230# on the system - some systems like version suffix, others don't
3231
3232
Michael W. Hudson54241132001-12-07 15:38:26 +00003233
3234
3235
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003236
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003237LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003238BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003239INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003240DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003241LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003242RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003243
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003244# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003245# If CXX is set, and if it is needed to link a main function that was
3246# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3247# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003248# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003249# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003250
Martin v. Löwis11437992002-04-12 09:54:03 +00003251echo "$as_me:$LINENO: checking LINKCC" >&5
3252echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003253if test -z "$LINKCC"
3254then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003255 if test -z "$CXX"; then
3256 LINKCC="\$(PURIFY) \$(CC)"
3257 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003258 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003259 $CXX -c conftest.$ac_ext 2>&5
3260 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3261 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3262 then
3263 LINKCC="\$(PURIFY) \$(CC)"
3264 else
3265 LINKCC="\$(PURIFY) \$(CXX)"
3266 fi
3267 rm -fr conftest*
3268 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003269 case $ac_sys_system in
3270 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003271 exp_extra="\"\""
3272 if test $ac_sys_release -ge 5 -o \
3273 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3274 exp_extra="."
3275 fi
3276 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003277 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003278 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003279 esac
3280fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003281echo "$as_me:$LINENO: result: $LINKCC" >&5
3282echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003283
Martin v. Löwis11437992002-04-12 09:54:03 +00003284echo "$as_me:$LINENO: checking for --enable-shared" >&5
3285echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003286# Check whether --enable-shared or --disable-shared was given.
3287if test "${enable_shared+set}" = set; then
3288 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003289
Martin v. Löwis11437992002-04-12 09:54:03 +00003290fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003291
3292if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003293then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003294 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003295 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003296 enable_shared="yes";;
3297 *)
3298 enable_shared="no";;
3299 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003300fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003301echo "$as_me:$LINENO: result: $enable_shared" >&5
3302echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003303
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003304echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3305echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6
3306# Check whether --enable-profiling or --disable-profiling was given.
3307if test "${enable_profiling+set}" = set; then
3308 enableval="$enable_profiling"
3309 ac_save_cc="$CC"
3310 CC="$CC -pg"
3311 if test "$cross_compiling" = yes; then
3312 ac_enable_profiling="no"
3313else
3314 cat >conftest.$ac_ext <<_ACEOF
3315/* confdefs.h. */
3316_ACEOF
3317cat confdefs.h >>conftest.$ac_ext
3318cat >>conftest.$ac_ext <<_ACEOF
3319/* end confdefs.h. */
3320int main() { return 0; }
3321_ACEOF
3322rm -f conftest$ac_exeext
3323if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3324 (eval $ac_link) 2>&5
3325 ac_status=$?
3326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3327 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3329 (eval $ac_try) 2>&5
3330 ac_status=$?
3331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3332 (exit $ac_status); }; }; then
3333 ac_enable_profiling="yes"
3334else
3335 echo "$as_me: program exited with status $ac_status" >&5
3336echo "$as_me: failed program was:" >&5
3337sed 's/^/| /' conftest.$ac_ext >&5
3338
3339( exit $ac_status )
3340ac_enable_profiling="no"
3341fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003342rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003343fi
3344 CC="$ac_save_cc"
3345fi;
3346echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3347echo "${ECHO_T}$ac_enable_profiling" >&6
3348
3349case "$ac_enable_profiling" in
3350 "yes")
3351 BASECFLAGS="-pg $BASECFLAGS"
3352 LDFLAGS="-pg $LDFLAGS"
3353 ;;
3354esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003355
Martin v. Löwis11437992002-04-12 09:54:03 +00003356echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3357echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003358
Guido van Rossumb8552162001-09-05 14:58:11 +00003359# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3360# library that we build, but we do not want to link against it (we
3361# will find it with a -framework option). For this reason there is an
3362# extra variable BLDLIBRARY against which Python and the extension
3363# modules are linked, BLDLIBRARY. This is normally the same as
3364# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003365if test "$enable_framework"
3366then
3367 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003368 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003369 BLDLIBRARY=''
3370else
3371 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003372fi
Jack Jansene578a632001-08-15 01:27:14 +00003373
Martin v. Löwis1142de32002-03-29 16:28:31 +00003374# Other platforms follow
3375if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003376
3377cat >>confdefs.h <<\_ACEOF
3378#define Py_ENABLE_SHARED 1
3379_ACEOF
3380
Martin v. Löwis1142de32002-03-29 16:28:31 +00003381 case $ac_sys_system in
3382 BeOS*)
3383 LDLIBRARY='libpython$(VERSION).so'
3384 ;;
3385 CYGWIN*)
3386 LDLIBRARY='libpython$(VERSION).dll.a'
3387 DLLLIBRARY='libpython$(VERSION).dll'
3388 ;;
3389 SunOS*)
3390 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003391 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003392 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003393 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003394 ;;
Hye-Shik Chang33761492004-10-26 09:53:46 +00003395 Linux*|GNU*|NetBSD*|FreeBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003396 LDLIBRARY='libpython$(VERSION).so'
3397 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003398 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00003399 case $ac_sys_system in
3400 FreeBSD*)
3401 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
3402 ;;
3403 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003404 INSTSONAME="$LDLIBRARY".$SOVERSION
3405 ;;
3406 hp*|HP*)
3407 LDLIBRARY='libpython$(VERSION).sl'
3408 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003409 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003410 ;;
3411 OSF*)
3412 LDLIBRARY='libpython$(VERSION).so'
3413 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003414 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003415 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003416 atheos*)
3417 LDLIBRARY='libpython$(VERSION).so'
3418 BLDLIBRARY='-L. -lpython$(VERSION)'
3419 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3420 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003421 esac
Jason Tishler30765592003-09-04 11:04:06 +00003422else # shared is disabled
3423 case $ac_sys_system in
3424 CYGWIN*)
3425 BLDLIBRARY='$(LIBRARY)'
3426 LDLIBRARY='libpython$(VERSION).dll.a'
3427 ;;
3428 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003429fi
3430
Martin v. Löwis11437992002-04-12 09:54:03 +00003431echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3432echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003433
Martin v. Löwis11437992002-04-12 09:54:03 +00003434if test -n "$ac_tool_prefix"; then
3435 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3436set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3437echo "$as_me:$LINENO: checking for $ac_word" >&5
3438echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3439if test "${ac_cv_prog_RANLIB+set}" = set; then
3440 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003441else
3442 if test -n "$RANLIB"; then
3443 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3444else
Martin v. Löwis11437992002-04-12 09:54:03 +00003445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3446for as_dir in $PATH
3447do
3448 IFS=$as_save_IFS
3449 test -z "$as_dir" && as_dir=.
3450 for ac_exec_ext in '' $ac_executable_extensions; do
3451 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3452 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3453 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3454 break 2
3455 fi
3456done
3457done
3458
Guido van Rossum627b2d71993-12-24 10:39:16 +00003459fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003460fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003461RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003462if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003463 echo "$as_me:$LINENO: result: $RANLIB" >&5
3464echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003465else
Martin v. Löwis11437992002-04-12 09:54:03 +00003466 echo "$as_me:$LINENO: result: no" >&5
3467echo "${ECHO_T}no" >&6
3468fi
3469
3470fi
3471if test -z "$ac_cv_prog_RANLIB"; then
3472 ac_ct_RANLIB=$RANLIB
3473 # Extract the first word of "ranlib", so it can be a program name with args.
3474set dummy ranlib; ac_word=$2
3475echo "$as_me:$LINENO: checking for $ac_word" >&5
3476echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3477if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3478 echo $ECHO_N "(cached) $ECHO_C" >&6
3479else
3480 if test -n "$ac_ct_RANLIB"; then
3481 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3482else
3483as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3484for as_dir in $PATH
3485do
3486 IFS=$as_save_IFS
3487 test -z "$as_dir" && as_dir=.
3488 for ac_exec_ext in '' $ac_executable_extensions; do
3489 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3490 ac_cv_prog_ac_ct_RANLIB="ranlib"
3491 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3492 break 2
3493 fi
3494done
3495done
3496
3497 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3498fi
3499fi
3500ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3501if test -n "$ac_ct_RANLIB"; then
3502 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3503echo "${ECHO_T}$ac_ct_RANLIB" >&6
3504else
3505 echo "$as_me:$LINENO: result: no" >&5
3506echo "${ECHO_T}no" >&6
3507fi
3508
3509 RANLIB=$ac_ct_RANLIB
3510else
3511 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003512fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003513
3514
Guido van Rossum7f43da71994-08-01 12:15:30 +00003515for ac_prog in ar aal
3516do
Martin v. Löwis11437992002-04-12 09:54:03 +00003517 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003518set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003519echo "$as_me:$LINENO: checking for $ac_word" >&5
3520echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3521if test "${ac_cv_prog_AR+set}" = set; then
3522 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003523else
3524 if test -n "$AR"; then
3525 ac_cv_prog_AR="$AR" # Let the user override the test.
3526else
Martin v. Löwis11437992002-04-12 09:54:03 +00003527as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3528for as_dir in $PATH
3529do
3530 IFS=$as_save_IFS
3531 test -z "$as_dir" && as_dir=.
3532 for ac_exec_ext in '' $ac_executable_extensions; do
3533 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3534 ac_cv_prog_AR="$ac_prog"
3535 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3536 break 2
3537 fi
3538done
3539done
3540
Guido van Rossum7f43da71994-08-01 12:15:30 +00003541fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003542fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003543AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003544if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003545 echo "$as_me:$LINENO: result: $AR" >&5
3546echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003547else
Martin v. Löwis11437992002-04-12 09:54:03 +00003548 echo "$as_me:$LINENO: result: no" >&5
3549echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003550fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003551
Martin v. Löwis11437992002-04-12 09:54:03 +00003552 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003553done
3554test -n "$AR" || AR="ar"
3555
Michael W. Hudson54241132001-12-07 15:38:26 +00003556
Neil Schemenauera42c8272001-03-31 00:01:55 +00003557case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003558bsdos*|hp*|HP*)
3559 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003560 if test -z "$INSTALL"
3561 then
3562 INSTALL="${srcdir}/install-sh -c"
3563 fi
3564esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003565ac_aux_dir=
3566for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3567 if test -f $ac_dir/install-sh; then
3568 ac_aux_dir=$ac_dir
3569 ac_install_sh="$ac_aux_dir/install-sh -c"
3570 break
3571 elif test -f $ac_dir/install.sh; then
3572 ac_aux_dir=$ac_dir
3573 ac_install_sh="$ac_aux_dir/install.sh -c"
3574 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 elif test -f $ac_dir/shtool; then
3576 ac_aux_dir=$ac_dir
3577 ac_install_sh="$ac_aux_dir/shtool install -c"
3578 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003579 fi
3580done
3581if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003582 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3583echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3584 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003585fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003586ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3587ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3588ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003589
3590# Find a good install program. We prefer a C program (faster),
3591# so one script is as good as another. But avoid the broken or
3592# incompatible versions:
3593# SysV /etc/install, /usr/sbin/install
3594# SunOS /usr/etc/install
3595# IRIX /sbin/install
3596# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003597# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003598# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3599# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3600# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00003601# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003602# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003603echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3604echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003605if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003606if test "${ac_cv_path_install+set}" = set; then
3607 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003608else
Martin v. Löwis11437992002-04-12 09:54:03 +00003609 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3610for as_dir in $PATH
3611do
3612 IFS=$as_save_IFS
3613 test -z "$as_dir" && as_dir=.
3614 # Account for people who put trailing slashes in PATH elements.
3615case $as_dir/ in
3616 ./ | .// | /cC/* | \
3617 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00003618 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00003619 /usr/ucb/* ) ;;
3620 *)
3621 # OSF1 and SCO ODT 3.0 have their own names for install.
3622 # Don't use installbsd from OSF since it installs stuff as root
3623 # by default.
3624 for ac_prog in ginstall scoinst install; do
3625 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanarof0d5f792004-08-15 14:08:23 +00003626 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3627 if test $ac_prog = install &&
3628 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3629 # AIX install. It has an incompatible calling convention.
3630 :
3631 elif test $ac_prog = install &&
3632 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3633 # program-specific install script used by HP pwplus--don't use.
3634 :
3635 else
3636 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3637 break 3
3638 fi
3639 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003640 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003641 done
3642 ;;
3643esac
3644done
3645
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003646
3647fi
3648 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003649 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003650 else
3651 # As a last resort, use the slow shell script. We don't cache a
3652 # path for INSTALL within a source directory, because that will
3653 # break other packages using the cache if that directory is
3654 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003655 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003656 fi
3657fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003658echo "$as_me:$LINENO: result: $INSTALL" >&5
3659echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003660
3661# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3662# It thinks the first close brace ends the variable substitution.
3663test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3664
Martin v. Löwis11437992002-04-12 09:54:03 +00003665test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003666
3667test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3668
Michael W. Hudson54241132001-12-07 15:38:26 +00003669
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003670# Not every filesystem supports hard links
3671
3672if test -z "$LN" ; then
3673 case $ac_sys_system in
3674 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003675 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003676 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003677 *) LN=ln;;
3678 esac
3679fi
3680
Fred Drake109d9862001-07-11 06:27:56 +00003681# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003682echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3683echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3684
Fred Drake109d9862001-07-11 06:27:56 +00003685# Check whether --with-pydebug or --without-pydebug was given.
3686if test "${with_pydebug+set}" = set; then
3687 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003688
Fred Drake109d9862001-07-11 06:27:56 +00003689if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003690then
3691
3692cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003693#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003694_ACEOF
3695
3696 echo "$as_me:$LINENO: result: yes" >&5
3697echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003698 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003699else echo "$as_me:$LINENO: result: no" >&5
3700echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003701fi
3702else
Martin v. Löwis11437992002-04-12 09:54:03 +00003703 echo "$as_me:$LINENO: result: no" >&5
3704echo "${ECHO_T}no" >&6
3705fi;
Fred Drake109d9862001-07-11 06:27:56 +00003706
Skip Montanarodecc6a42003-01-01 20:07:49 +00003707# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3708# merged with this chunk of code?
3709
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003710# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003711# ------------------------
3712# (The following bit of code is complicated enough - please keep things
3713# indented properly. Just pretend you're editing Python code. ;-)
3714
3715# There are two parallel sets of case statements below, one that checks to
3716# see if OPT was set and one that does BASECFLAGS setting based upon
3717# compiler and platform. BASECFLAGS tweaks need to be made even if the
3718# user set OPT.
3719
3720# tweak OPT based on compiler and platform, only if the user didn't set
3721# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003722
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003723if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003724then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003725 case $GCC in
3726 yes)
3727 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003728 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003729 if test "$Py_DEBUG" = 'true' ; then
3730 # Optimization messes up debuggers, so turn it off for
3731 # debug builds.
3732 OPT="-g -Wall -Wstrict-prototypes"
3733 else
3734 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003735 fi
3736 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003737 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003738 OPT="-O3 -Wall -Wstrict-prototypes"
3739 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003740 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003741 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003742 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3743 ;;
3744 esac
Fred Drake109d9862001-07-11 06:27:56 +00003745 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003746
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003747 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003748 OPT="-O"
3749 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003750 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003751
3752 # The current (beta) Monterey compiler dies with optimizations
3753 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003754 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003755 Monterey*)
3756 OPT=""
3757 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003758 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003759
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003760fi
3761
Skip Montanarodecc6a42003-01-01 20:07:49 +00003762
3763# tweak BASECFLAGS based on compiler and platform
3764case $GCC in
3765yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003766 # Python violates C99 rules, by casting between incompatible
3767 # pointer types. GCC may generate bad code as a result of that,
3768 # so use -fno-strict-aliasing if supported.
3769 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3770echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3771 ac_save_cc="$CC"
3772 CC="$CC -fno-strict-aliasing"
3773 if test "$cross_compiling" = yes; then
3774 ac_cv_no_strict_aliasing_ok=no
3775else
3776 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003777/* confdefs.h. */
3778_ACEOF
3779cat confdefs.h >>conftest.$ac_ext
3780cat >>conftest.$ac_ext <<_ACEOF
3781/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003782int main() { return 0; }
3783_ACEOF
3784rm -f conftest$ac_exeext
3785if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3786 (eval $ac_link) 2>&5
3787 ac_status=$?
3788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3789 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3790 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3791 (eval $ac_try) 2>&5
3792 ac_status=$?
3793 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3794 (exit $ac_status); }; }; then
3795 ac_cv_no_strict_aliasing_ok=yes
3796else
3797 echo "$as_me: program exited with status $ac_status" >&5
3798echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003799sed 's/^/| /' conftest.$ac_ext >&5
3800
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003801( exit $ac_status )
3802ac_cv_no_strict_aliasing_ok=no
3803fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003804rm -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 +00003805fi
3806 CC="$ac_save_cc"
3807 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3808echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3809 if test $ac_cv_no_strict_aliasing_ok = yes
3810 then
3811 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3812 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003813 case $ac_sys_system in
3814 SCO_SV*)
3815 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3816 ;;
3817 # is there any other compiler on Darwin besides gcc?
3818 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003819 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003820 ;;
3821 esac
3822 ;;
3823
3824*)
3825 case $ac_sys_system in
3826 OpenUNIX*|UnixWare*)
3827 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3828 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003829 OSF*)
3830 BASECFLAGS="$BASECFLAGS -ieee -std"
3831 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003832 SCO_SV*)
3833 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3834 ;;
3835 esac
3836 ;;
3837esac
3838
Fred Drakee1ceaa02001-12-04 20:55:47 +00003839if test "$Py_DEBUG" = 'true'; then
3840 :
3841else
3842 OPT="-DNDEBUG $OPT"
3843fi
3844
Guido van Rossum563e7081996-09-10 18:20:48 +00003845if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003846then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003847 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003848fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003849
Martin v. Löwis11437992002-04-12 09:54:03 +00003850echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3851echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3852if test "${ac_cv_opt_olimit_ok+set}" = set; then
3853 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003854else
3855 ac_save_cc="$CC"
3856CC="$CC -OPT:Olimit=0"
3857if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003858 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003859else
Martin v. Löwis11437992002-04-12 09:54:03 +00003860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003861/* confdefs.h. */
3862_ACEOF
3863cat confdefs.h >>conftest.$ac_ext
3864cat >>conftest.$ac_ext <<_ACEOF
3865/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003866int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003867_ACEOF
3868rm -f conftest$ac_exeext
3869if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3870 (eval $ac_link) 2>&5
3871 ac_status=$?
3872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3873 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3874 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3875 (eval $ac_try) 2>&5
3876 ac_status=$?
3877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3878 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003879 ac_cv_opt_olimit_ok=yes
3880else
Martin v. Löwis11437992002-04-12 09:54:03 +00003881 echo "$as_me: program exited with status $ac_status" >&5
3882echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003883sed 's/^/| /' conftest.$ac_ext >&5
3884
Martin v. Löwis11437992002-04-12 09:54:03 +00003885( exit $ac_status )
3886ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003887fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003888rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003889fi
Guido van Rossum91922671997-10-09 20:24:13 +00003890CC="$ac_save_cc"
3891fi
3892
Martin v. Löwis11437992002-04-12 09:54:03 +00003893echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3894echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003895if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003896 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003897 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3898 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3899 # environment?
3900 Darwin*)
3901 ;;
3902 *)
3903 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3904 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003905 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003906else
Martin v. Löwis11437992002-04-12 09:54:03 +00003907 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3908echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3909 if test "${ac_cv_olimit_ok+set}" = set; then
3910 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003911else
3912 ac_save_cc="$CC"
3913 CC="$CC -Olimit 1500"
3914 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003915 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003916else
Martin v. Löwis11437992002-04-12 09:54:03 +00003917 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003918/* confdefs.h. */
3919_ACEOF
3920cat confdefs.h >>conftest.$ac_ext
3921cat >>conftest.$ac_ext <<_ACEOF
3922/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003923int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003924_ACEOF
3925rm -f conftest$ac_exeext
3926if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3927 (eval $ac_link) 2>&5
3928 ac_status=$?
3929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3930 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3931 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3932 (eval $ac_try) 2>&5
3933 ac_status=$?
3934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3935 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003936 ac_cv_olimit_ok=yes
3937else
Martin v. Löwis11437992002-04-12 09:54:03 +00003938 echo "$as_me: program exited with status $ac_status" >&5
3939echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003940sed 's/^/| /' conftest.$ac_ext >&5
3941
Martin v. Löwis11437992002-04-12 09:54:03 +00003942( exit $ac_status )
3943ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003944fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003945rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003946fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003947 CC="$ac_save_cc"
3948fi
3949
Martin v. Löwis11437992002-04-12 09:54:03 +00003950 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3951echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003952 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003953 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003954 fi
3955fi
3956
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003957# On some compilers, pthreads are available without further options
3958# (e.g. MacOS X). On some of these systems, the compiler will not
3959# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3960# So we have to see first whether pthreads are available without
3961# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003962echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3963echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3964if test "${ac_cv_pthread_is_default+set}" = set; then
3965 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003966else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003967 if test "$cross_compiling" = yes; then
3968 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003969else
Martin v. Löwis11437992002-04-12 09:54:03 +00003970 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003971/* confdefs.h. */
3972_ACEOF
3973cat confdefs.h >>conftest.$ac_ext
3974cat >>conftest.$ac_ext <<_ACEOF
3975/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003976
Martin v. Löwis130fb172001-07-19 11:00:41 +00003977#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003978
3979void* routine(void* p){return NULL;}
3980
3981int main(){
3982 pthread_t p;
3983 if(pthread_create(&p,NULL,routine,NULL)!=0)
3984 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003985 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003986 return 0;
3987}
3988
Martin v. Löwis11437992002-04-12 09:54:03 +00003989_ACEOF
3990rm -f conftest$ac_exeext
3991if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3992 (eval $ac_link) 2>&5
3993 ac_status=$?
3994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3995 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3997 (eval $ac_try) 2>&5
3998 ac_status=$?
3999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4000 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00004001
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004002 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00004003 ac_cv_kthread=no
4004 ac_cv_pthread=no
4005
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004006else
Martin v. Löwis11437992002-04-12 09:54:03 +00004007 echo "$as_me: program exited with status $ac_status" >&5
4008echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004009sed 's/^/| /' conftest.$ac_ext >&5
4010
Martin v. Löwis11437992002-04-12 09:54:03 +00004011( exit $ac_status )
4012ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004013fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004014rm -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 +00004015fi
4016
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004017fi
4018
Martin v. Löwis11437992002-04-12 09:54:03 +00004019echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4020echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004021
Michael W. Hudson54241132001-12-07 15:38:26 +00004022
Martin v. Löwis11437992002-04-12 09:54:03 +00004023if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004024then
4025 ac_cv_kpthread=no
4026else
4027# -Kpthread, if available, provides the right #defines
4028# and linker options to make pthread_create available
4029# Some compilers won't report that they do not support -Kpthread,
4030# so we need to run a program to see whether it really made the
4031# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00004032echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4033echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
4034if test "${ac_cv_kpthread+set}" = set; then
4035 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004036else
4037 ac_save_cc="$CC"
4038CC="$CC -Kpthread"
4039if test "$cross_compiling" = yes; then
4040 ac_cv_kpthread=no
4041else
Martin v. Löwis11437992002-04-12 09:54:03 +00004042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004043/* confdefs.h. */
4044_ACEOF
4045cat confdefs.h >>conftest.$ac_ext
4046cat >>conftest.$ac_ext <<_ACEOF
4047/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004048
4049#include <pthread.h>
4050
4051void* routine(void* p){return NULL;}
4052
4053int main(){
4054 pthread_t p;
4055 if(pthread_create(&p,NULL,routine,NULL)!=0)
4056 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004057 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004058 return 0;
4059}
4060
Martin v. Löwis11437992002-04-12 09:54:03 +00004061_ACEOF
4062rm -f conftest$ac_exeext
4063if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4064 (eval $ac_link) 2>&5
4065 ac_status=$?
4066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4067 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4068 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4069 (eval $ac_try) 2>&5
4070 ac_status=$?
4071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4072 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004073 ac_cv_kpthread=yes
4074else
Martin v. Löwis11437992002-04-12 09:54:03 +00004075 echo "$as_me: program exited with status $ac_status" >&5
4076echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004077sed 's/^/| /' conftest.$ac_ext >&5
4078
Martin v. Löwis11437992002-04-12 09:54:03 +00004079( exit $ac_status )
4080ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004081fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004082rm -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 +00004083fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004084CC="$ac_save_cc"
4085fi
4086
Martin v. Löwis11437992002-04-12 09:54:03 +00004087echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4088echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004089fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004090
Skip Montanarod8d39a02003-07-10 20:44:10 +00004091if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004092then
4093# -Kthread, if available, provides the right #defines
4094# and linker options to make pthread_create available
4095# Some compilers won't report that they do not support -Kthread,
4096# so we need to run a program to see whether it really made the
4097# function available.
4098echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4099echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
4100if test "${ac_cv_kthread+set}" = set; then
4101 echo $ECHO_N "(cached) $ECHO_C" >&6
4102else
4103 ac_save_cc="$CC"
4104CC="$CC -Kthread"
4105if test "$cross_compiling" = yes; then
4106 ac_cv_kthread=no
4107else
4108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004109/* confdefs.h. */
4110_ACEOF
4111cat confdefs.h >>conftest.$ac_ext
4112cat >>conftest.$ac_ext <<_ACEOF
4113/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004114
4115#include <pthread.h>
4116
4117void* routine(void* p){return NULL;}
4118
4119int main(){
4120 pthread_t p;
4121 if(pthread_create(&p,NULL,routine,NULL)!=0)
4122 return 1;
4123 (void)pthread_detach(p);
4124 return 0;
4125}
4126
4127_ACEOF
4128rm -f conftest$ac_exeext
4129if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4130 (eval $ac_link) 2>&5
4131 ac_status=$?
4132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4133 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4135 (eval $ac_try) 2>&5
4136 ac_status=$?
4137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4138 (exit $ac_status); }; }; then
4139 ac_cv_kthread=yes
4140else
4141 echo "$as_me: program exited with status $ac_status" >&5
4142echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004143sed 's/^/| /' conftest.$ac_ext >&5
4144
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004145( exit $ac_status )
4146ac_cv_kthread=no
4147fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004148rm -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 +00004149fi
4150CC="$ac_save_cc"
4151fi
4152
4153echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4154echo "${ECHO_T}$ac_cv_kthread" >&6
4155fi
4156
Skip Montanarod8d39a02003-07-10 20:44:10 +00004157if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004158then
4159# -pthread, if available, provides the right #defines
4160# and linker options to make pthread_create available
4161# Some compilers won't report that they do not support -pthread,
4162# so we need to run a program to see whether it really made the
4163# function available.
4164echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4165echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4166if test "${ac_cv_thread+set}" = set; then
4167 echo $ECHO_N "(cached) $ECHO_C" >&6
4168else
4169 ac_save_cc="$CC"
4170CC="$CC -pthread"
4171if test "$cross_compiling" = yes; then
4172 ac_cv_pthread=no
4173else
4174 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004175/* confdefs.h. */
4176_ACEOF
4177cat confdefs.h >>conftest.$ac_ext
4178cat >>conftest.$ac_ext <<_ACEOF
4179/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004180
4181#include <pthread.h>
4182
4183void* routine(void* p){return NULL;}
4184
4185int main(){
4186 pthread_t p;
4187 if(pthread_create(&p,NULL,routine,NULL)!=0)
4188 return 1;
4189 (void)pthread_detach(p);
4190 return 0;
4191}
4192
4193_ACEOF
4194rm -f conftest$ac_exeext
4195if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4196 (eval $ac_link) 2>&5
4197 ac_status=$?
4198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4199 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4201 (eval $ac_try) 2>&5
4202 ac_status=$?
4203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4204 (exit $ac_status); }; }; then
4205 ac_cv_pthread=yes
4206else
4207 echo "$as_me: program exited with status $ac_status" >&5
4208echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004209sed 's/^/| /' conftest.$ac_ext >&5
4210
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004211( exit $ac_status )
4212ac_cv_pthread=no
4213fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004214rm -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 +00004215fi
4216CC="$ac_save_cc"
4217fi
4218
4219echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4220echo "${ECHO_T}$ac_cv_pthread" >&6
4221fi
4222
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004223# If we have set a CC compiler flag for thread support then
4224# check if it works for CXX, too.
4225ac_cv_cxx_thread=no
4226if test ! -z "$CXX"
4227then
4228echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4229echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4230ac_save_cxx="$CXX"
4231
4232if test "$ac_cv_kpthread" = "yes"
4233then
4234 CXX="$CXX -Kpthread"
4235 ac_cv_cxx_thread=yes
4236elif test "$ac_cv_kthread" = "yes"
4237then
4238 CXX="$CXX -Kthread"
4239 ac_cv_cxx_thread=yes
4240elif test "$ac_cv_pthread" = "yes"
4241then
4242 CXX="$CXX -pthread"
4243 ac_cv_cxx_thread=yes
4244fi
4245
4246if test $ac_cv_cxx_thread = yes
4247then
4248 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4249 $CXX -c conftest.$ac_ext 2>&5
4250 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4251 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4252 then
4253 ac_cv_cxx_thread=yes
4254 else
4255 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004256 fi
4257 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004258fi
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004259echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4260echo "${ECHO_T}$ac_cv_cxx_thread" >&6
Brett Cannonc601e0f2004-11-07 01:24:12 +00004261fi
4262CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004263
Michael W. Hudson54241132001-12-07 15:38:26 +00004264
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004265# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004266echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4267echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4268if test "${ac_cv_header_stdc+set}" = set; then
4269 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004270else
Martin v. Löwis11437992002-04-12 09:54:03 +00004271 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004272/* confdefs.h. */
4273_ACEOF
4274cat confdefs.h >>conftest.$ac_ext
4275cat >>conftest.$ac_ext <<_ACEOF
4276/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004277#include <stdlib.h>
4278#include <stdarg.h>
4279#include <string.h>
4280#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004281
Skip Montanaro6dead952003-09-25 14:50:04 +00004282int
4283main ()
4284{
4285
4286 ;
4287 return 0;
4288}
Martin v. Löwis11437992002-04-12 09:54:03 +00004289_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004290rm -f conftest.$ac_objext
4291if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004292 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004293 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004294 grep -v '^ *+' conftest.er1 >conftest.err
4295 rm -f conftest.er1
4296 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004298 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004299 { ac_try='test -z "$ac_c_werror_flag"
4300 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004301 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4302 (eval $ac_try) 2>&5
4303 ac_status=$?
4304 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4305 (exit $ac_status); }; } &&
4306 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00004307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4308 (eval $ac_try) 2>&5
4309 ac_status=$?
4310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4311 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004312 ac_cv_header_stdc=yes
4313else
Martin v. Löwis11437992002-04-12 09:54:03 +00004314 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004315sed 's/^/| /' conftest.$ac_ext >&5
4316
4317ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004318fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004319rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004320
4321if test $ac_cv_header_stdc = yes; then
4322 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004323 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004324/* confdefs.h. */
4325_ACEOF
4326cat confdefs.h >>conftest.$ac_ext
4327cat >>conftest.$ac_ext <<_ACEOF
4328/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004329#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004330
4331_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004332if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004333 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004334 :
4335else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004336 ac_cv_header_stdc=no
4337fi
4338rm -f conftest*
4339
4340fi
4341
4342if test $ac_cv_header_stdc = yes; then
4343 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004344 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004345/* confdefs.h. */
4346_ACEOF
4347cat confdefs.h >>conftest.$ac_ext
4348cat >>conftest.$ac_ext <<_ACEOF
4349/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004350#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004351
4352_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004353if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004354 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004355 :
4356else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004357 ac_cv_header_stdc=no
4358fi
4359rm -f conftest*
4360
4361fi
4362
4363if test $ac_cv_header_stdc = yes; then
4364 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004365 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004366 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004367else
Martin v. Löwis11437992002-04-12 09:54:03 +00004368 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004369/* confdefs.h. */
4370_ACEOF
4371cat confdefs.h >>conftest.$ac_ext
4372cat >>conftest.$ac_ext <<_ACEOF
4373/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004374#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004375#if ((' ' & 0x0FF) == 0x020)
4376# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4377# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4378#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004379# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004380 (('a' <= (c) && (c) <= 'i') \
4381 || ('j' <= (c) && (c) <= 'r') \
4382 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00004383# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4384#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004385
Martin v. Löwis11437992002-04-12 09:54:03 +00004386#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4387int
4388main ()
4389{
4390 int i;
4391 for (i = 0; i < 256; i++)
4392 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00004393 || toupper (i) != TOUPPER (i))
Martin v. Löwis11437992002-04-12 09:54:03 +00004394 exit(2);
4395 exit (0);
4396}
4397_ACEOF
4398rm -f conftest$ac_exeext
4399if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4400 (eval $ac_link) 2>&5
4401 ac_status=$?
4402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4403 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4404 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4405 (eval $ac_try) 2>&5
4406 ac_status=$?
4407 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4408 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004409 :
4410else
Martin v. Löwis11437992002-04-12 09:54:03 +00004411 echo "$as_me: program exited with status $ac_status" >&5
4412echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004413sed 's/^/| /' conftest.$ac_ext >&5
4414
Martin v. Löwis11437992002-04-12 09:54:03 +00004415( exit $ac_status )
4416ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004417fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004418rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004419fi
4420fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004421fi
4422echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4423echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004424if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004425
4426cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004427#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004428_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004429
4430fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004431
Skip Montanarob9820a32004-01-17 00:16:12 +00004432# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004443 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00004444do
4445as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4446echo "$as_me:$LINENO: checking for $ac_header" >&5
4447echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4448if eval "test \"\${$as_ac_Header+set}\" = set"; then
4449 echo $ECHO_N "(cached) $ECHO_C" >&6
4450else
4451 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00004452/* confdefs.h. */
4453_ACEOF
4454cat confdefs.h >>conftest.$ac_ext
4455cat >>conftest.$ac_ext <<_ACEOF
4456/* end confdefs.h. */
4457$ac_includes_default
4458
4459#include <$ac_header>
4460_ACEOF
4461rm -f conftest.$ac_objext
4462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004463 (eval $ac_compile) 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00004464 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004465 grep -v '^ *+' conftest.er1 >conftest.err
4466 rm -f conftest.er1
4467 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00004468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4469 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004470 { ac_try='test -z "$ac_c_werror_flag"
4471 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004472 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4473 (eval $ac_try) 2>&5
4474 ac_status=$?
4475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4476 (exit $ac_status); }; } &&
4477 { ac_try='test -s conftest.$ac_objext'
Skip Montanarob9820a32004-01-17 00:16:12 +00004478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4479 (eval $ac_try) 2>&5
4480 ac_status=$?
4481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4482 (exit $ac_status); }; }; then
4483 eval "$as_ac_Header=yes"
4484else
4485 echo "$as_me: failed program was:" >&5
4486sed 's/^/| /' conftest.$ac_ext >&5
4487
4488eval "$as_ac_Header=no"
4489fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004490rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00004491fi
4492echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4493echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4494if test `eval echo '${'$as_ac_Header'}'` = yes; then
4495 cat >>confdefs.h <<_ACEOF
4496#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4497_ACEOF
4498
4499fi
4500
4501done
4502
4503
Martin v. Löwis11437992002-04-12 09:54:03 +00004504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
Anthony Baxter8a560de2004-10-13 15:30:56 +00004540
Martin v. Löwisc3001752005-01-23 09:27:24 +00004541
4542for ac_header in curses.h dlfcn.h fcntl.h grp.h shadow.h langinfo.h \
Skip Montanaro7befb992004-02-10 16:50:21 +00004543libintl.h ncurses.h poll.h pthread.h \
4544stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004545unistd.h utime.h \
Anthony Baxter8a560de2004-10-13 15:30:56 +00004546sys/audioio.h sys/bsdtty.h sys/file.h sys/loadavg.h sys/lock.h sys/mkdev.h \
4547sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004548sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwisae2830c2004-09-18 09:54:52 +00004549sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004550sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4551bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004552do
Martin v. Löwis11437992002-04-12 09:54:03 +00004553as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4554if eval "test \"\${$as_ac_Header+set}\" = set"; then
4555 echo "$as_me:$LINENO: checking for $ac_header" >&5
4556echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4557if eval "test \"\${$as_ac_Header+set}\" = set"; then
4558 echo $ECHO_N "(cached) $ECHO_C" >&6
4559fi
4560echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4561echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004562else
Martin v. Löwis11437992002-04-12 09:54:03 +00004563 # Is the header compilable?
4564echo "$as_me:$LINENO: checking $ac_header usability" >&5
4565echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4566cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004567/* confdefs.h. */
4568_ACEOF
4569cat confdefs.h >>conftest.$ac_ext
4570cat >>conftest.$ac_ext <<_ACEOF
4571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004572$ac_includes_default
4573#include <$ac_header>
4574_ACEOF
4575rm -f conftest.$ac_objext
4576if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004577 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004579 grep -v '^ *+' conftest.er1 >conftest.err
4580 rm -f conftest.er1
4581 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4583 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004584 { ac_try='test -z "$ac_c_werror_flag"
4585 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4587 (eval $ac_try) 2>&5
4588 ac_status=$?
4589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4590 (exit $ac_status); }; } &&
4591 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4593 (eval $ac_try) 2>&5
4594 ac_status=$?
4595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4596 (exit $ac_status); }; }; then
4597 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004598else
Martin v. Löwis11437992002-04-12 09:54:03 +00004599 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004600sed 's/^/| /' conftest.$ac_ext >&5
4601
Martin v. Löwis11437992002-04-12 09:54:03 +00004602ac_header_compiler=no
4603fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004604rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004605echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4606echo "${ECHO_T}$ac_header_compiler" >&6
4607
4608# Is the header present?
4609echo "$as_me:$LINENO: checking $ac_header presence" >&5
4610echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4611cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004612/* confdefs.h. */
4613_ACEOF
4614cat confdefs.h >>conftest.$ac_ext
4615cat >>conftest.$ac_ext <<_ACEOF
4616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004617#include <$ac_header>
4618_ACEOF
4619if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4620 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4621 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004622 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004623 rm -f conftest.er1
4624 cat conftest.err >&5
4625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4626 (exit $ac_status); } >/dev/null; then
4627 if test -s conftest.err; then
4628 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00004629 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00004630 else
4631 ac_cpp_err=
4632 fi
4633else
4634 ac_cpp_err=yes
4635fi
4636if test -z "$ac_cpp_err"; then
4637 ac_header_preproc=yes
4638else
4639 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004640sed 's/^/| /' conftest.$ac_ext >&5
4641
Martin v. Löwis11437992002-04-12 09:54:03 +00004642 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004643fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004644rm -f conftest.err conftest.$ac_ext
4645echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4646echo "${ECHO_T}$ac_header_preproc" >&6
4647
4648# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004649case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4650 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00004651 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4652echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004653 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4654echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4655 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004656 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00004657 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004658 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4659echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004660 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4661echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4662 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4663echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4664 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4665echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004666 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4667echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004668 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4669echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004670 (
4671 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +00004672## --------------------------------- ##
4673## Report this to the python lists. ##
4674## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00004675_ASBOX
4676 ) |
4677 sed "s/^/$as_me: WARNING: /" >&2
4678 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004679esac
4680echo "$as_me:$LINENO: checking for $ac_header" >&5
4681echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4682if eval "test \"\${$as_ac_Header+set}\" = set"; then
4683 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004684else
Skip Montanarof0d5f792004-08-15 14:08:23 +00004685 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004686fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004687echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4688echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4689
4690fi
4691if test `eval echo '${'$as_ac_Header'}'` = yes; then
4692 cat >>confdefs.h <<_ACEOF
4693#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4694_ACEOF
4695
4696fi
4697
Guido van Rossum627b2d71993-12-24 10:39:16 +00004698done
4699
Martin v. Löwis11437992002-04-12 09:54:03 +00004700
4701
4702
4703
4704
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004705ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004706for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4707 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4708echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4709echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4710if eval "test \"\${$as_ac_Header+set}\" = set"; then
4711 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004712else
Martin v. Löwis11437992002-04-12 09:54:03 +00004713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004714/* confdefs.h. */
4715_ACEOF
4716cat confdefs.h >>conftest.$ac_ext
4717cat >>conftest.$ac_ext <<_ACEOF
4718/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004719#include <sys/types.h>
4720#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004721
Martin v. Löwis11437992002-04-12 09:54:03 +00004722int
4723main ()
4724{
4725if ((DIR *) 0)
4726return 0;
4727 ;
4728 return 0;
4729}
4730_ACEOF
4731rm -f conftest.$ac_objext
4732if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004733 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004734 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004735 grep -v '^ *+' conftest.er1 >conftest.err
4736 rm -f conftest.er1
4737 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4739 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004740 { ac_try='test -z "$ac_c_werror_flag"
4741 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4743 (eval $ac_try) 2>&5
4744 ac_status=$?
4745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4746 (exit $ac_status); }; } &&
4747 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004748 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4749 (eval $ac_try) 2>&5
4750 ac_status=$?
4751 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4752 (exit $ac_status); }; }; then
4753 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004754else
Martin v. Löwis11437992002-04-12 09:54:03 +00004755 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004756sed 's/^/| /' conftest.$ac_ext >&5
4757
Martin v. Löwis11437992002-04-12 09:54:03 +00004758eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004759fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004760rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004761fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004762echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4763echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4764if test `eval echo '${'$as_ac_Header'}'` = yes; then
4765 cat >>confdefs.h <<_ACEOF
4766#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4767_ACEOF
4768
4769ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004770fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004771
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004772done
4773# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4774if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004775 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4776echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4777if test "${ac_cv_search_opendir+set}" = set; then
4778 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004779else
Martin v. Löwis11437992002-04-12 09:54:03 +00004780 ac_func_search_save_LIBS=$LIBS
4781ac_cv_search_opendir=no
4782cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004783/* confdefs.h. */
4784_ACEOF
4785cat confdefs.h >>conftest.$ac_ext
4786cat >>conftest.$ac_ext <<_ACEOF
4787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004788
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004789/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004790#ifdef __cplusplus
4791extern "C"
4792#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004793/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004794 builtin and then its argument prototype would still apply. */
4795char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004796int
4797main ()
4798{
4799opendir ();
4800 ;
4801 return 0;
4802}
4803_ACEOF
4804rm -f conftest.$ac_objext conftest$ac_exeext
4805if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004806 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004808 grep -v '^ *+' conftest.er1 >conftest.err
4809 rm -f conftest.er1
4810 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4812 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004813 { ac_try='test -z "$ac_c_werror_flag"
4814 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4816 (eval $ac_try) 2>&5
4817 ac_status=$?
4818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4819 (exit $ac_status); }; } &&
4820 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4822 (eval $ac_try) 2>&5
4823 ac_status=$?
4824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4825 (exit $ac_status); }; }; then
4826 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004827else
Martin v. Löwis11437992002-04-12 09:54:03 +00004828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004829sed 's/^/| /' conftest.$ac_ext >&5
4830
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004831fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004832rm -f conftest.err conftest.$ac_objext \
4833 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004834if test "$ac_cv_search_opendir" = no; then
4835 for ac_lib in dir; do
4836 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4837 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004838/* confdefs.h. */
4839_ACEOF
4840cat confdefs.h >>conftest.$ac_ext
4841cat >>conftest.$ac_ext <<_ACEOF
4842/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004843
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004844/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004845#ifdef __cplusplus
4846extern "C"
4847#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004848/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004849 builtin and then its argument prototype would still apply. */
4850char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004851int
4852main ()
4853{
4854opendir ();
4855 ;
4856 return 0;
4857}
4858_ACEOF
4859rm -f conftest.$ac_objext conftest$ac_exeext
4860if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004861 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004862 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004863 grep -v '^ *+' conftest.er1 >conftest.err
4864 rm -f conftest.er1
4865 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4867 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004868 { ac_try='test -z "$ac_c_werror_flag"
4869 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004870 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4871 (eval $ac_try) 2>&5
4872 ac_status=$?
4873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4874 (exit $ac_status); }; } &&
4875 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004876 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4877 (eval $ac_try) 2>&5
4878 ac_status=$?
4879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4880 (exit $ac_status); }; }; then
4881 ac_cv_search_opendir="-l$ac_lib"
4882break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004883else
Martin v. Löwis11437992002-04-12 09:54:03 +00004884 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004885sed 's/^/| /' conftest.$ac_ext >&5
4886
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004887fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004888rm -f conftest.err conftest.$ac_objext \
4889 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004890 done
4891fi
4892LIBS=$ac_func_search_save_LIBS
4893fi
4894echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4895echo "${ECHO_T}$ac_cv_search_opendir" >&6
4896if test "$ac_cv_search_opendir" != no; then
4897 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004898
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004899fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004900
Michael W. Hudson54241132001-12-07 15:38:26 +00004901else
Martin v. Löwis11437992002-04-12 09:54:03 +00004902 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4903echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4904if test "${ac_cv_search_opendir+set}" = set; then
4905 echo $ECHO_N "(cached) $ECHO_C" >&6
4906else
4907 ac_func_search_save_LIBS=$LIBS
4908ac_cv_search_opendir=no
4909cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004910/* confdefs.h. */
4911_ACEOF
4912cat confdefs.h >>conftest.$ac_ext
4913cat >>conftest.$ac_ext <<_ACEOF
4914/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004915
4916/* Override any gcc2 internal prototype to avoid an error. */
4917#ifdef __cplusplus
4918extern "C"
4919#endif
4920/* We use char because int might match the return type of a gcc2
4921 builtin and then its argument prototype would still apply. */
4922char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004923int
4924main ()
4925{
4926opendir ();
4927 ;
4928 return 0;
4929}
4930_ACEOF
4931rm -f conftest.$ac_objext conftest$ac_exeext
4932if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004933 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004934 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004935 grep -v '^ *+' conftest.er1 >conftest.err
4936 rm -f conftest.er1
4937 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4939 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004940 { ac_try='test -z "$ac_c_werror_flag"
4941 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4943 (eval $ac_try) 2>&5
4944 ac_status=$?
4945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4946 (exit $ac_status); }; } &&
4947 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4949 (eval $ac_try) 2>&5
4950 ac_status=$?
4951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4952 (exit $ac_status); }; }; then
4953 ac_cv_search_opendir="none required"
4954else
4955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004956sed 's/^/| /' conftest.$ac_ext >&5
4957
Martin v. Löwis11437992002-04-12 09:54:03 +00004958fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004959rm -f conftest.err conftest.$ac_objext \
4960 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004961if test "$ac_cv_search_opendir" = no; then
4962 for ac_lib in x; do
4963 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4964 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004965/* confdefs.h. */
4966_ACEOF
4967cat confdefs.h >>conftest.$ac_ext
4968cat >>conftest.$ac_ext <<_ACEOF
4969/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004970
4971/* Override any gcc2 internal prototype to avoid an error. */
4972#ifdef __cplusplus
4973extern "C"
4974#endif
4975/* We use char because int might match the return type of a gcc2
4976 builtin and then its argument prototype would still apply. */
4977char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004978int
4979main ()
4980{
4981opendir ();
4982 ;
4983 return 0;
4984}
4985_ACEOF
4986rm -f conftest.$ac_objext conftest$ac_exeext
4987if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004988 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004989 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004990 grep -v '^ *+' conftest.er1 >conftest.err
4991 rm -f conftest.er1
4992 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4994 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00004995 { ac_try='test -z "$ac_c_werror_flag"
4996 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4998 (eval $ac_try) 2>&5
4999 ac_status=$?
5000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5001 (exit $ac_status); }; } &&
5002 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5004 (eval $ac_try) 2>&5
5005 ac_status=$?
5006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5007 (exit $ac_status); }; }; then
5008 ac_cv_search_opendir="-l$ac_lib"
5009break
5010else
5011 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005012sed 's/^/| /' conftest.$ac_ext >&5
5013
Martin v. Löwis11437992002-04-12 09:54:03 +00005014fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005015rm -f conftest.err conftest.$ac_objext \
5016 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005017 done
5018fi
5019LIBS=$ac_func_search_save_LIBS
5020fi
5021echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5022echo "${ECHO_T}$ac_cv_search_opendir" >&6
5023if test "$ac_cv_search_opendir" != no; then
5024 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
5025
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005026fi
5027
5028fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005029
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005030echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5031echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
5032if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5033 echo $ECHO_N "(cached) $ECHO_C" >&6
5034else
5035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005036/* confdefs.h. */
5037_ACEOF
5038cat confdefs.h >>conftest.$ac_ext
5039cat >>conftest.$ac_ext <<_ACEOF
5040/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005041#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005042int
5043main ()
5044{
5045return makedev(0, 0);
5046 ;
5047 return 0;
5048}
5049_ACEOF
5050rm -f conftest.$ac_objext conftest$ac_exeext
5051if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005052 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005054 grep -v '^ *+' conftest.er1 >conftest.err
5055 rm -f conftest.er1
5056 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5058 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005059 { ac_try='test -z "$ac_c_werror_flag"
5060 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5062 (eval $ac_try) 2>&5
5063 ac_status=$?
5064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5065 (exit $ac_status); }; } &&
5066 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5068 (eval $ac_try) 2>&5
5069 ac_status=$?
5070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5071 (exit $ac_status); }; }; then
5072 ac_cv_header_sys_types_h_makedev=yes
5073else
5074 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005075sed 's/^/| /' conftest.$ac_ext >&5
5076
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005077ac_cv_header_sys_types_h_makedev=no
5078fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005079rm -f conftest.err conftest.$ac_objext \
5080 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005081
5082fi
5083echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5084echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
5085
5086if test $ac_cv_header_sys_types_h_makedev = no; then
5087if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5088 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5089echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5090if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5091 echo $ECHO_N "(cached) $ECHO_C" >&6
5092fi
5093echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5094echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5095else
5096 # Is the header compilable?
5097echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5098echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
5099cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005100/* confdefs.h. */
5101_ACEOF
5102cat confdefs.h >>conftest.$ac_ext
5103cat >>conftest.$ac_ext <<_ACEOF
5104/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005105$ac_includes_default
5106#include <sys/mkdev.h>
5107_ACEOF
5108rm -f conftest.$ac_objext
5109if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005110 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005111 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005112 grep -v '^ *+' conftest.er1 >conftest.err
5113 rm -f conftest.er1
5114 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5116 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005117 { ac_try='test -z "$ac_c_werror_flag"
5118 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005119 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5120 (eval $ac_try) 2>&5
5121 ac_status=$?
5122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5123 (exit $ac_status); }; } &&
5124 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5126 (eval $ac_try) 2>&5
5127 ac_status=$?
5128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5129 (exit $ac_status); }; }; then
5130 ac_header_compiler=yes
5131else
5132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005133sed 's/^/| /' conftest.$ac_ext >&5
5134
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005135ac_header_compiler=no
5136fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005137rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005138echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5139echo "${ECHO_T}$ac_header_compiler" >&6
5140
5141# Is the header present?
5142echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5143echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
5144cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005145/* confdefs.h. */
5146_ACEOF
5147cat confdefs.h >>conftest.$ac_ext
5148cat >>conftest.$ac_ext <<_ACEOF
5149/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005150#include <sys/mkdev.h>
5151_ACEOF
5152if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5153 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5154 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005155 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005156 rm -f conftest.er1
5157 cat conftest.err >&5
5158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5159 (exit $ac_status); } >/dev/null; then
5160 if test -s conftest.err; then
5161 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005162 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005163 else
5164 ac_cpp_err=
5165 fi
5166else
5167 ac_cpp_err=yes
5168fi
5169if test -z "$ac_cpp_err"; then
5170 ac_header_preproc=yes
5171else
5172 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005173sed 's/^/| /' conftest.$ac_ext >&5
5174
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005175 ac_header_preproc=no
5176fi
5177rm -f conftest.err conftest.$ac_ext
5178echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5179echo "${ECHO_T}$ac_header_preproc" >&6
5180
5181# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005182case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5183 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005184 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5185echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005186 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5187echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5188 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005189 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005190 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005191 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5192echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005193 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5194echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5195 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5196echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5197 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5198echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005199 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5200echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005201 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5202echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005203 (
5204 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +00005205## --------------------------------- ##
5206## Report this to the python lists. ##
5207## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005208_ASBOX
5209 ) |
5210 sed "s/^/$as_me: WARNING: /" >&2
5211 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005212esac
5213echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5214echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5215if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5216 echo $ECHO_N "(cached) $ECHO_C" >&6
5217else
5218 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5219fi
5220echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5221echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5222
5223fi
5224if test $ac_cv_header_sys_mkdev_h = yes; then
5225
5226cat >>confdefs.h <<\_ACEOF
5227#define MAJOR_IN_MKDEV 1
5228_ACEOF
5229
5230fi
5231
5232
5233
5234 if test $ac_cv_header_sys_mkdev_h = no; then
5235 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5236 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5237echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5238if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5239 echo $ECHO_N "(cached) $ECHO_C" >&6
5240fi
5241echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5242echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5243else
5244 # Is the header compilable?
5245echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5246echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
5247cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005248/* confdefs.h. */
5249_ACEOF
5250cat confdefs.h >>conftest.$ac_ext
5251cat >>conftest.$ac_ext <<_ACEOF
5252/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005253$ac_includes_default
5254#include <sys/sysmacros.h>
5255_ACEOF
5256rm -f conftest.$ac_objext
5257if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005258 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005259 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005260 grep -v '^ *+' conftest.er1 >conftest.err
5261 rm -f conftest.er1
5262 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5264 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005265 { ac_try='test -z "$ac_c_werror_flag"
5266 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005267 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5268 (eval $ac_try) 2>&5
5269 ac_status=$?
5270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5271 (exit $ac_status); }; } &&
5272 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5274 (eval $ac_try) 2>&5
5275 ac_status=$?
5276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5277 (exit $ac_status); }; }; then
5278 ac_header_compiler=yes
5279else
5280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005281sed 's/^/| /' conftest.$ac_ext >&5
5282
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005283ac_header_compiler=no
5284fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005285rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005286echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5287echo "${ECHO_T}$ac_header_compiler" >&6
5288
5289# Is the header present?
5290echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5291echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5292cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005293/* confdefs.h. */
5294_ACEOF
5295cat confdefs.h >>conftest.$ac_ext
5296cat >>conftest.$ac_ext <<_ACEOF
5297/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005298#include <sys/sysmacros.h>
5299_ACEOF
5300if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5301 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5302 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005303 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005304 rm -f conftest.er1
5305 cat conftest.err >&5
5306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5307 (exit $ac_status); } >/dev/null; then
5308 if test -s conftest.err; then
5309 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005310 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005311 else
5312 ac_cpp_err=
5313 fi
5314else
5315 ac_cpp_err=yes
5316fi
5317if test -z "$ac_cpp_err"; then
5318 ac_header_preproc=yes
5319else
5320 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005321sed 's/^/| /' conftest.$ac_ext >&5
5322
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005323 ac_header_preproc=no
5324fi
5325rm -f conftest.err conftest.$ac_ext
5326echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5327echo "${ECHO_T}$ac_header_preproc" >&6
5328
5329# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005330case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5331 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005332 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5333echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005334 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
5335echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
5336 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005337 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005338 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005339 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5340echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005341 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5342echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5343 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
5344echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
5345 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
5346echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005347 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
5348echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005349 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
5350echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005351 (
5352 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +00005353## --------------------------------- ##
5354## Report this to the python lists. ##
5355## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005356_ASBOX
5357 ) |
5358 sed "s/^/$as_me: WARNING: /" >&2
5359 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005360esac
5361echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5362echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5363if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5364 echo $ECHO_N "(cached) $ECHO_C" >&6
5365else
5366 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5367fi
5368echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5369echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5370
5371fi
5372if test $ac_cv_header_sys_sysmacros_h = yes; then
5373
5374cat >>confdefs.h <<\_ACEOF
5375#define MAJOR_IN_SYSMACROS 1
5376_ACEOF
5377
5378fi
5379
5380
5381 fi
5382fi
5383
Michael W. Hudson54241132001-12-07 15:38:26 +00005384
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005385# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005386
5387for ac_header in term.h
5388do
5389as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5390echo "$as_me:$LINENO: checking for $ac_header" >&5
5391echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5392if eval "test \"\${$as_ac_Header+set}\" = set"; then
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005393 echo $ECHO_N "(cached) $ECHO_C" >&6
5394else
5395 cat >conftest.$ac_ext <<_ACEOF
5396/* confdefs.h. */
5397_ACEOF
5398cat confdefs.h >>conftest.$ac_ext
5399cat >>conftest.$ac_ext <<_ACEOF
5400/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005401
Martin v. Löwis5d52e782004-09-18 10:07:03 +00005402#ifdef HAVE_CURSES_H
5403#include <curses.h>
5404#endif
5405
5406
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005407#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005408_ACEOF
5409rm -f conftest.$ac_objext
5410if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
5411 (eval $ac_compile) 2>conftest.er1
5412 ac_status=$?
5413 grep -v '^ *+' conftest.er1 >conftest.err
5414 rm -f conftest.er1
5415 cat conftest.err >&5
5416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5417 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005418 { ac_try='test -z "$ac_c_werror_flag"
5419 || test ! -s conftest.err'
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005420 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5421 (eval $ac_try) 2>&5
5422 ac_status=$?
5423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5424 (exit $ac_status); }; } &&
5425 { ac_try='test -s conftest.$ac_objext'
5426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5427 (eval $ac_try) 2>&5
5428 ac_status=$?
5429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5430 (exit $ac_status); }; }; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005431 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005432else
5433 echo "$as_me: failed program was:" >&5
5434sed 's/^/| /' conftest.$ac_ext >&5
5435
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005436eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005437fi
5438rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
5439fi
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005440echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
5441echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5442if test `eval echo '${'$as_ac_Header'}'` = yes; then
5443 cat >>confdefs.h <<_ACEOF
5444#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5445_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005446
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00005447fi
5448
5449done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00005450
5451
Guido van Rossum627b2d71993-12-24 10:39:16 +00005452# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005453was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005454echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5455echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5456cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005457/* confdefs.h. */
5458_ACEOF
5459cat confdefs.h >>conftest.$ac_ext
5460cat >>conftest.$ac_ext <<_ACEOF
5461/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005462#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005463
5464_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005465if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005466 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005467 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005468else
Martin v. Löwis11437992002-04-12 09:54:03 +00005469
5470
5471cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005472#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005473_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005474
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005475
Guido van Rossum627b2d71993-12-24 10:39:16 +00005476fi
5477rm -f conftest*
5478
Martin v. Löwis11437992002-04-12 09:54:03 +00005479echo "$as_me:$LINENO: result: $was_it_defined" >&5
5480echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005481
Neal Norwitz11690112002-07-30 01:08:28 +00005482# Check whether using makedev requires defining _OSF_SOURCE
5483echo "$as_me:$LINENO: checking for makedev" >&5
5484echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5485cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005486/* confdefs.h. */
5487_ACEOF
5488cat confdefs.h >>conftest.$ac_ext
5489cat >>conftest.$ac_ext <<_ACEOF
5490/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005491#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005492int
5493main ()
5494{
5495 makedev(0, 0)
5496 ;
5497 return 0;
5498}
5499_ACEOF
5500rm -f conftest.$ac_objext conftest$ac_exeext
5501if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005502 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005503 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005504 grep -v '^ *+' conftest.er1 >conftest.err
5505 rm -f conftest.er1
5506 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5508 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005509 { ac_try='test -z "$ac_c_werror_flag"
5510 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5512 (eval $ac_try) 2>&5
5513 ac_status=$?
5514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5515 (exit $ac_status); }; } &&
5516 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005517 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5518 (eval $ac_try) 2>&5
5519 ac_status=$?
5520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5521 (exit $ac_status); }; }; then
5522 ac_cv_has_makedev=yes
5523else
5524 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005525sed 's/^/| /' conftest.$ac_ext >&5
5526
Neal Norwitz11690112002-07-30 01:08:28 +00005527ac_cv_has_makedev=no
5528fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005529rm -f conftest.err conftest.$ac_objext \
5530 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005531if test "$ac_cv_has_makedev" = "no"; then
5532 # we didn't link, try if _OSF_SOURCE will allow us to link
5533 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005534/* confdefs.h. */
5535_ACEOF
5536cat confdefs.h >>conftest.$ac_ext
5537cat >>conftest.$ac_ext <<_ACEOF
5538/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005539
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005540#define _OSF_SOURCE 1
5541#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005542
Neal Norwitz11690112002-07-30 01:08:28 +00005543int
5544main ()
5545{
5546 makedev(0, 0)
5547 ;
5548 return 0;
5549}
5550_ACEOF
5551rm -f conftest.$ac_objext conftest$ac_exeext
5552if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005553 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005555 grep -v '^ *+' conftest.er1 >conftest.err
5556 rm -f conftest.er1
5557 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5559 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005560 { ac_try='test -z "$ac_c_werror_flag"
5561 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005562 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5563 (eval $ac_try) 2>&5
5564 ac_status=$?
5565 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5566 (exit $ac_status); }; } &&
5567 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5569 (eval $ac_try) 2>&5
5570 ac_status=$?
5571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5572 (exit $ac_status); }; }; then
5573 ac_cv_has_makedev=yes
5574else
5575 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005576sed 's/^/| /' conftest.$ac_ext >&5
5577
Neal Norwitz11690112002-07-30 01:08:28 +00005578ac_cv_has_makedev=no
5579fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005580rm -f conftest.err conftest.$ac_objext \
5581 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005582 if test "$ac_cv_has_makedev" = "yes"; then
5583
5584cat >>confdefs.h <<\_ACEOF
5585#define _OSF_SOURCE 1
5586_ACEOF
5587
5588 fi
5589fi
5590echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5591echo "${ECHO_T}$ac_cv_has_makedev" >&6
5592if test "$ac_cv_has_makedev" = "yes"; then
5593
5594cat >>confdefs.h <<\_ACEOF
5595#define HAVE_MAKEDEV 1
5596_ACEOF
5597
5598fi
5599
Martin v. Löwis399a6892002-10-04 10:22:02 +00005600# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5601# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5602# defined, but the compiler does not support pragma redefine_extname,
5603# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5604# structures (such as rlimit64) without declaring them. As a
5605# work-around, disable LFS on such configurations
5606
5607use_lfs=yes
5608echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5609echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5610cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005611/* confdefs.h. */
5612_ACEOF
5613cat confdefs.h >>conftest.$ac_ext
5614cat >>conftest.$ac_ext <<_ACEOF
5615/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005616
5617#define _LARGEFILE_SOURCE 1
5618#define _FILE_OFFSET_BITS 64
5619#include <sys/resource.h>
5620
Martin v. Löwis399a6892002-10-04 10:22:02 +00005621int
5622main ()
5623{
5624struct rlimit foo;
5625 ;
5626 return 0;
5627}
5628_ACEOF
5629rm -f conftest.$ac_objext
5630if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005631 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00005632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005633 grep -v '^ *+' conftest.er1 >conftest.err
5634 rm -f conftest.er1
5635 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00005636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5637 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005638 { ac_try='test -z "$ac_c_werror_flag"
5639 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005640 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5641 (eval $ac_try) 2>&5
5642 ac_status=$?
5643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5644 (exit $ac_status); }; } &&
5645 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis399a6892002-10-04 10:22:02 +00005646 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5647 (eval $ac_try) 2>&5
5648 ac_status=$?
5649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5650 (exit $ac_status); }; }; then
5651 sol_lfs_bug=no
5652else
5653 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005654sed 's/^/| /' conftest.$ac_ext >&5
5655
Martin v. Löwis399a6892002-10-04 10:22:02 +00005656sol_lfs_bug=yes
5657fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005658rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis399a6892002-10-04 10:22:02 +00005659echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5660echo "${ECHO_T}$sol_lfs_bug" >&6
5661if test "$sol_lfs_bug" = "yes"; then
5662 use_lfs=no
5663fi
5664
5665if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005666# Two defines needed to enable largefile support on various platforms
5667# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005668
Martin v. Löwis11437992002-04-12 09:54:03 +00005669cat >>confdefs.h <<\_ACEOF
5670#define _LARGEFILE_SOURCE 1
5671_ACEOF
5672
5673
5674cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005675#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005676_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005677
Martin v. Löwis399a6892002-10-04 10:22:02 +00005678fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005679
Guido van Rossum84e7b241996-08-19 21:59:00 +00005680# Add some code to confdefs.h so that the test for off_t works on SCO
5681cat >> confdefs.h <<\EOF
5682#if defined(SCO_DS)
5683#undef _OFF_T
5684#endif
5685EOF
5686
Guido van Rossumef2255b2000-03-10 22:30:29 +00005687# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005688echo "$as_me:$LINENO: checking for mode_t" >&5
5689echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5690if test "${ac_cv_type_mode_t+set}" = set; then
5691 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005692else
Martin v. Löwis11437992002-04-12 09:54:03 +00005693 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005694/* confdefs.h. */
5695_ACEOF
5696cat confdefs.h >>conftest.$ac_ext
5697cat >>conftest.$ac_ext <<_ACEOF
5698/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005699$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005700int
5701main ()
5702{
5703if ((mode_t *) 0)
5704 return 0;
5705if (sizeof (mode_t))
5706 return 0;
5707 ;
5708 return 0;
5709}
5710_ACEOF
5711rm -f conftest.$ac_objext
5712if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005713 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005714 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005715 grep -v '^ *+' conftest.er1 >conftest.err
5716 rm -f conftest.er1
5717 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005718 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5719 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005720 { ac_try='test -z "$ac_c_werror_flag"
5721 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5723 (eval $ac_try) 2>&5
5724 ac_status=$?
5725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5726 (exit $ac_status); }; } &&
5727 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5729 (eval $ac_try) 2>&5
5730 ac_status=$?
5731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5732 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005733 ac_cv_type_mode_t=yes
5734else
Martin v. Löwis11437992002-04-12 09:54:03 +00005735 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005736sed 's/^/| /' conftest.$ac_ext >&5
5737
Martin v. Löwis11437992002-04-12 09:54:03 +00005738ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005739fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005740rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005741fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005742echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5743echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5744if test $ac_cv_type_mode_t = yes; then
5745 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005746else
Martin v. Löwis11437992002-04-12 09:54:03 +00005747
5748cat >>confdefs.h <<_ACEOF
5749#define mode_t int
5750_ACEOF
5751
5752fi
5753
5754echo "$as_me:$LINENO: checking for off_t" >&5
5755echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5756if test "${ac_cv_type_off_t+set}" = set; then
5757 echo $ECHO_N "(cached) $ECHO_C" >&6
5758else
5759 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005760/* confdefs.h. */
5761_ACEOF
5762cat confdefs.h >>conftest.$ac_ext
5763cat >>conftest.$ac_ext <<_ACEOF
5764/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005765$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005766int
5767main ()
5768{
5769if ((off_t *) 0)
5770 return 0;
5771if (sizeof (off_t))
5772 return 0;
5773 ;
5774 return 0;
5775}
5776_ACEOF
5777rm -f conftest.$ac_objext
5778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005779 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005780 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005781 grep -v '^ *+' conftest.er1 >conftest.err
5782 rm -f conftest.er1
5783 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5785 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005786 { ac_try='test -z "$ac_c_werror_flag"
5787 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5789 (eval $ac_try) 2>&5
5790 ac_status=$?
5791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5792 (exit $ac_status); }; } &&
5793 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005794 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5795 (eval $ac_try) 2>&5
5796 ac_status=$?
5797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5798 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005799 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005800else
Martin v. Löwis11437992002-04-12 09:54:03 +00005801 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005802sed 's/^/| /' conftest.$ac_ext >&5
5803
Martin v. Löwis11437992002-04-12 09:54:03 +00005804ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005805fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005806rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005807fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005808echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5809echo "${ECHO_T}$ac_cv_type_off_t" >&6
5810if test $ac_cv_type_off_t = yes; then
5811 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005812else
Martin v. Löwis11437992002-04-12 09:54:03 +00005813
5814cat >>confdefs.h <<_ACEOF
5815#define off_t long
5816_ACEOF
5817
5818fi
5819
5820echo "$as_me:$LINENO: checking for pid_t" >&5
5821echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5822if test "${ac_cv_type_pid_t+set}" = set; then
5823 echo $ECHO_N "(cached) $ECHO_C" >&6
5824else
5825 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005826/* confdefs.h. */
5827_ACEOF
5828cat confdefs.h >>conftest.$ac_ext
5829cat >>conftest.$ac_ext <<_ACEOF
5830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005831$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005832int
5833main ()
5834{
5835if ((pid_t *) 0)
5836 return 0;
5837if (sizeof (pid_t))
5838 return 0;
5839 ;
5840 return 0;
5841}
5842_ACEOF
5843rm -f conftest.$ac_objext
5844if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005845 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005847 grep -v '^ *+' conftest.er1 >conftest.err
5848 rm -f conftest.er1
5849 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5851 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005852 { ac_try='test -z "$ac_c_werror_flag"
5853 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005854 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5855 (eval $ac_try) 2>&5
5856 ac_status=$?
5857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5858 (exit $ac_status); }; } &&
5859 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5861 (eval $ac_try) 2>&5
5862 ac_status=$?
5863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5864 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005865 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005866else
Martin v. Löwis11437992002-04-12 09:54:03 +00005867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005868sed 's/^/| /' conftest.$ac_ext >&5
5869
Martin v. Löwis11437992002-04-12 09:54:03 +00005870ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005871fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005872rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005873fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005874echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5875echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5876if test $ac_cv_type_pid_t = yes; then
5877 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005878else
Martin v. Löwis11437992002-04-12 09:54:03 +00005879
5880cat >>confdefs.h <<_ACEOF
5881#define pid_t int
5882_ACEOF
5883
5884fi
5885
5886echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5887echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5888if test "${ac_cv_type_signal+set}" = set; then
5889 echo $ECHO_N "(cached) $ECHO_C" >&6
5890else
5891 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005892/* confdefs.h. */
5893_ACEOF
5894cat confdefs.h >>conftest.$ac_ext
5895cat >>conftest.$ac_ext <<_ACEOF
5896/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005897#include <sys/types.h>
5898#include <signal.h>
5899#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005900# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005901#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005902#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005903extern "C" void (*signal (int, void (*)(int)))(int);
5904#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005905void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005906#endif
5907
Martin v. Löwis11437992002-04-12 09:54:03 +00005908int
5909main ()
5910{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005911int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005912 ;
5913 return 0;
5914}
5915_ACEOF
5916rm -f conftest.$ac_objext
5917if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005918 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005920 grep -v '^ *+' conftest.er1 >conftest.err
5921 rm -f conftest.er1
5922 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5924 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005925 { ac_try='test -z "$ac_c_werror_flag"
5926 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5928 (eval $ac_try) 2>&5
5929 ac_status=$?
5930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5931 (exit $ac_status); }; } &&
5932 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005933 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5934 (eval $ac_try) 2>&5
5935 ac_status=$?
5936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5937 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005938 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005939else
Martin v. Löwis11437992002-04-12 09:54:03 +00005940 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005941sed 's/^/| /' conftest.$ac_ext >&5
5942
Martin v. Löwis11437992002-04-12 09:54:03 +00005943ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005944fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005945rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005946fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005947echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5948echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005949
Martin v. Löwis11437992002-04-12 09:54:03 +00005950cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005951#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005952_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005953
Michael W. Hudson54241132001-12-07 15:38:26 +00005954
Martin v. Löwis11437992002-04-12 09:54:03 +00005955echo "$as_me:$LINENO: checking for size_t" >&5
5956echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5957if test "${ac_cv_type_size_t+set}" = set; then
5958 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005959else
Martin v. Löwis11437992002-04-12 09:54:03 +00005960 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005961/* confdefs.h. */
5962_ACEOF
5963cat confdefs.h >>conftest.$ac_ext
5964cat >>conftest.$ac_ext <<_ACEOF
5965/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005966$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005967int
5968main ()
5969{
5970if ((size_t *) 0)
5971 return 0;
5972if (sizeof (size_t))
5973 return 0;
5974 ;
5975 return 0;
5976}
5977_ACEOF
5978rm -f conftest.$ac_objext
5979if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005980 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005982 grep -v '^ *+' conftest.er1 >conftest.err
5983 rm -f conftest.er1
5984 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5986 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00005987 { ac_try='test -z "$ac_c_werror_flag"
5988 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5990 (eval $ac_try) 2>&5
5991 ac_status=$?
5992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5993 (exit $ac_status); }; } &&
5994 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5996 (eval $ac_try) 2>&5
5997 ac_status=$?
5998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5999 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00006000 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006001else
Martin v. Löwis11437992002-04-12 09:54:03 +00006002 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006003sed 's/^/| /' conftest.$ac_ext >&5
6004
Martin v. Löwis11437992002-04-12 09:54:03 +00006005ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006006fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006007rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006008fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006009echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
6010echo "${ECHO_T}$ac_cv_type_size_t" >&6
6011if test $ac_cv_type_size_t = yes; then
6012 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006013else
Martin v. Löwis11437992002-04-12 09:54:03 +00006014
6015cat >>confdefs.h <<_ACEOF
6016#define size_t unsigned
6017_ACEOF
6018
6019fi
6020
6021echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
6022echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
6023if test "${ac_cv_type_uid_t+set}" = set; then
6024 echo $ECHO_N "(cached) $ECHO_C" >&6
6025else
6026 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006027/* confdefs.h. */
6028_ACEOF
6029cat confdefs.h >>conftest.$ac_ext
6030cat >>conftest.$ac_ext <<_ACEOF
6031/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006032#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006033
6034_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006035if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006036 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006037 ac_cv_type_uid_t=yes
6038else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006039 ac_cv_type_uid_t=no
6040fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006041rm -f conftest*
6042
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006043fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006044echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
6045echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006046if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006047
Martin v. Löwis11437992002-04-12 09:54:03 +00006048cat >>confdefs.h <<\_ACEOF
6049#define uid_t int
6050_ACEOF
6051
6052
6053cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006054#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00006055_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006056
6057fi
6058
Jack Jansendd19cf82001-12-06 22:36:17 +00006059
Michael W. Hudson54241132001-12-07 15:38:26 +00006060# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00006061# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00006062echo "$as_me:$LINENO: checking for int" >&5
6063echo $ECHO_N "checking for int... $ECHO_C" >&6
6064if test "${ac_cv_type_int+set}" = set; then
6065 echo $ECHO_N "(cached) $ECHO_C" >&6
6066else
6067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006068/* confdefs.h. */
6069_ACEOF
6070cat confdefs.h >>conftest.$ac_ext
6071cat >>conftest.$ac_ext <<_ACEOF
6072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006073$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006074int
6075main ()
6076{
6077if ((int *) 0)
6078 return 0;
6079if (sizeof (int))
6080 return 0;
6081 ;
6082 return 0;
6083}
6084_ACEOF
6085rm -f conftest.$ac_objext
6086if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006087 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006088 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006089 grep -v '^ *+' conftest.er1 >conftest.err
6090 rm -f conftest.er1
6091 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6093 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006094 { ac_try='test -z "$ac_c_werror_flag"
6095 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6097 (eval $ac_try) 2>&5
6098 ac_status=$?
6099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6100 (exit $ac_status); }; } &&
6101 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006102 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6103 (eval $ac_try) 2>&5
6104 ac_status=$?
6105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6106 (exit $ac_status); }; }; then
6107 ac_cv_type_int=yes
6108else
6109 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006110sed 's/^/| /' conftest.$ac_ext >&5
6111
Martin v. Löwis11437992002-04-12 09:54:03 +00006112ac_cv_type_int=no
6113fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006114rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006115fi
6116echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6117echo "${ECHO_T}$ac_cv_type_int" >&6
6118
6119echo "$as_me:$LINENO: checking size of int" >&5
6120echo $ECHO_N "checking size of int... $ECHO_C" >&6
6121if test "${ac_cv_sizeof_int+set}" = set; then
6122 echo $ECHO_N "(cached) $ECHO_C" >&6
6123else
6124 if test "$ac_cv_type_int" = yes; then
6125 # The cast to unsigned long works around a bug in the HP C Compiler
6126 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6127 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6128 # This bug is HP SR number 8606223364.
6129 if test "$cross_compiling" = yes; then
6130 # Depending upon the size, compute the lo and hi bounds.
6131cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006132/* confdefs.h. */
6133_ACEOF
6134cat confdefs.h >>conftest.$ac_ext
6135cat >>conftest.$ac_ext <<_ACEOF
6136/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006137$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006138int
6139main ()
6140{
6141static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
6142test_array [0] = 0
6143
6144 ;
6145 return 0;
6146}
6147_ACEOF
6148rm -f conftest.$ac_objext
6149if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006150 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006151 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006152 grep -v '^ *+' conftest.er1 >conftest.err
6153 rm -f conftest.er1
6154 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6156 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006157 { ac_try='test -z "$ac_c_werror_flag"
6158 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006159 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6160 (eval $ac_try) 2>&5
6161 ac_status=$?
6162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6163 (exit $ac_status); }; } &&
6164 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006165 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6166 (eval $ac_try) 2>&5
6167 ac_status=$?
6168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6169 (exit $ac_status); }; }; then
6170 ac_lo=0 ac_mid=0
6171 while :; do
6172 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006173/* confdefs.h. */
6174_ACEOF
6175cat confdefs.h >>conftest.$ac_ext
6176cat >>conftest.$ac_ext <<_ACEOF
6177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006178$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006179int
6180main ()
6181{
6182static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6183test_array [0] = 0
6184
6185 ;
6186 return 0;
6187}
6188_ACEOF
6189rm -f conftest.$ac_objext
6190if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006191 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006192 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006193 grep -v '^ *+' conftest.er1 >conftest.err
6194 rm -f conftest.er1
6195 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6197 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006198 { ac_try='test -z "$ac_c_werror_flag"
6199 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006200 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6201 (eval $ac_try) 2>&5
6202 ac_status=$?
6203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6204 (exit $ac_status); }; } &&
6205 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6207 (eval $ac_try) 2>&5
6208 ac_status=$?
6209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6210 (exit $ac_status); }; }; then
6211 ac_hi=$ac_mid; break
6212else
6213 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006214sed 's/^/| /' conftest.$ac_ext >&5
6215
Martin v. Löwis11437992002-04-12 09:54:03 +00006216ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006217 if test $ac_lo -le $ac_mid; then
6218 ac_lo= ac_hi=
6219 break
6220 fi
6221 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006222fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006223rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006224 done
6225else
6226 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006227sed 's/^/| /' conftest.$ac_ext >&5
6228
Martin v. Löwis11437992002-04-12 09:54:03 +00006229cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006230/* confdefs.h. */
6231_ACEOF
6232cat confdefs.h >>conftest.$ac_ext
6233cat >>conftest.$ac_ext <<_ACEOF
6234/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006235$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006236int
6237main ()
6238{
6239static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
6240test_array [0] = 0
6241
6242 ;
6243 return 0;
6244}
6245_ACEOF
6246rm -f conftest.$ac_objext
6247if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006248 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006249 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006250 grep -v '^ *+' conftest.er1 >conftest.err
6251 rm -f conftest.er1
6252 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6254 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006255 { ac_try='test -z "$ac_c_werror_flag"
6256 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6258 (eval $ac_try) 2>&5
6259 ac_status=$?
6260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6261 (exit $ac_status); }; } &&
6262 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6264 (eval $ac_try) 2>&5
6265 ac_status=$?
6266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6267 (exit $ac_status); }; }; then
6268 ac_hi=-1 ac_mid=-1
6269 while :; do
6270 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006271/* confdefs.h. */
6272_ACEOF
6273cat confdefs.h >>conftest.$ac_ext
6274cat >>conftest.$ac_ext <<_ACEOF
6275/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006276$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006277int
6278main ()
6279{
6280static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
6281test_array [0] = 0
6282
6283 ;
6284 return 0;
6285}
6286_ACEOF
6287rm -f conftest.$ac_objext
6288if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006289 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006291 grep -v '^ *+' conftest.er1 >conftest.err
6292 rm -f conftest.er1
6293 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6295 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006296 { ac_try='test -z "$ac_c_werror_flag"
6297 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006298 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6299 (eval $ac_try) 2>&5
6300 ac_status=$?
6301 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6302 (exit $ac_status); }; } &&
6303 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006304 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6305 (eval $ac_try) 2>&5
6306 ac_status=$?
6307 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6308 (exit $ac_status); }; }; then
6309 ac_lo=$ac_mid; break
6310else
6311 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006312sed 's/^/| /' conftest.$ac_ext >&5
6313
Martin v. Löwis11437992002-04-12 09:54:03 +00006314ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006315 if test $ac_mid -le $ac_hi; then
6316 ac_lo= ac_hi=
6317 break
6318 fi
6319 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006320fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006321rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006322 done
6323else
6324 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006325sed 's/^/| /' conftest.$ac_ext >&5
6326
Martin v. Löwis11437992002-04-12 09:54:03 +00006327ac_lo= ac_hi=
6328fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006329rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006330fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006331rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006332# Binary search between lo and hi bounds.
6333while test "x$ac_lo" != "x$ac_hi"; do
6334 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6335 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006336/* confdefs.h. */
6337_ACEOF
6338cat confdefs.h >>conftest.$ac_ext
6339cat >>conftest.$ac_ext <<_ACEOF
6340/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006341$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006342int
6343main ()
6344{
6345static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6346test_array [0] = 0
6347
6348 ;
6349 return 0;
6350}
6351_ACEOF
6352rm -f conftest.$ac_objext
6353if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006354 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006355 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006356 grep -v '^ *+' conftest.er1 >conftest.err
6357 rm -f conftest.er1
6358 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6360 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006361 { ac_try='test -z "$ac_c_werror_flag"
6362 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6364 (eval $ac_try) 2>&5
6365 ac_status=$?
6366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6367 (exit $ac_status); }; } &&
6368 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6370 (eval $ac_try) 2>&5
6371 ac_status=$?
6372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6373 (exit $ac_status); }; }; then
6374 ac_hi=$ac_mid
6375else
6376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006377sed 's/^/| /' conftest.$ac_ext >&5
6378
Martin v. Löwis11437992002-04-12 09:54:03 +00006379ac_lo=`expr '(' $ac_mid ')' + 1`
6380fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006381rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006382done
6383case $ac_lo in
6384?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006385'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6386See \`config.log' for more details." >&5
6387echo "$as_me: error: cannot compute sizeof (int), 77
6388See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006389 { (exit 1); exit 1; }; } ;;
6390esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006391else
6392 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00006393 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6394See \`config.log' for more details." >&5
6395echo "$as_me: error: cannot run test program while cross compiling
6396See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006397 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006398else
Martin v. Löwis11437992002-04-12 09:54:03 +00006399 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006400/* confdefs.h. */
6401_ACEOF
6402cat confdefs.h >>conftest.$ac_ext
6403cat >>conftest.$ac_ext <<_ACEOF
6404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006405$ac_includes_default
6406long longval () { return (long) (sizeof (int)); }
6407unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006408#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006409#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006410int
6411main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006412{
Martin v. Löwis11437992002-04-12 09:54:03 +00006413
6414 FILE *f = fopen ("conftest.val", "w");
6415 if (! f)
6416 exit (1);
6417 if (((long) (sizeof (int))) < 0)
6418 {
6419 long i = longval ();
6420 if (i != ((long) (sizeof (int))))
6421 exit (1);
6422 fprintf (f, "%ld\n", i);
6423 }
6424 else
6425 {
6426 unsigned long i = ulongval ();
6427 if (i != ((long) (sizeof (int))))
6428 exit (1);
6429 fprintf (f, "%lu\n", i);
6430 }
6431 exit (ferror (f) || fclose (f) != 0);
6432
6433 ;
6434 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006435}
Martin v. Löwis11437992002-04-12 09:54:03 +00006436_ACEOF
6437rm -f conftest$ac_exeext
6438if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6439 (eval $ac_link) 2>&5
6440 ac_status=$?
6441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6442 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6444 (eval $ac_try) 2>&5
6445 ac_status=$?
6446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6447 (exit $ac_status); }; }; then
6448 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006449else
Martin v. Löwis11437992002-04-12 09:54:03 +00006450 echo "$as_me: program exited with status $ac_status" >&5
6451echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006452sed 's/^/| /' conftest.$ac_ext >&5
6453
Martin v. Löwis11437992002-04-12 09:54:03 +00006454( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006455{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6456See \`config.log' for more details." >&5
6457echo "$as_me: error: cannot compute sizeof (int), 77
6458See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006459 { (exit 1); exit 1; }; }
6460fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006461rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006462fi
6463fi
6464rm -f conftest.val
6465else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006466 ac_cv_sizeof_int=0
6467fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006468fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006469echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6470echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6471cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006472#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006473_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006474
6475
Martin v. Löwis11437992002-04-12 09:54:03 +00006476echo "$as_me:$LINENO: checking for long" >&5
6477echo $ECHO_N "checking for long... $ECHO_C" >&6
6478if test "${ac_cv_type_long+set}" = set; then
6479 echo $ECHO_N "(cached) $ECHO_C" >&6
6480else
6481 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006482/* confdefs.h. */
6483_ACEOF
6484cat confdefs.h >>conftest.$ac_ext
6485cat >>conftest.$ac_ext <<_ACEOF
6486/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006487$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006488int
6489main ()
6490{
6491if ((long *) 0)
6492 return 0;
6493if (sizeof (long))
6494 return 0;
6495 ;
6496 return 0;
6497}
6498_ACEOF
6499rm -f conftest.$ac_objext
6500if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006501 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006502 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006503 grep -v '^ *+' conftest.er1 >conftest.err
6504 rm -f conftest.er1
6505 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6507 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006508 { ac_try='test -z "$ac_c_werror_flag"
6509 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6511 (eval $ac_try) 2>&5
6512 ac_status=$?
6513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6514 (exit $ac_status); }; } &&
6515 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6517 (eval $ac_try) 2>&5
6518 ac_status=$?
6519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6520 (exit $ac_status); }; }; then
6521 ac_cv_type_long=yes
6522else
6523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006524sed 's/^/| /' conftest.$ac_ext >&5
6525
Martin v. Löwis11437992002-04-12 09:54:03 +00006526ac_cv_type_long=no
6527fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006528rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006529fi
6530echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6531echo "${ECHO_T}$ac_cv_type_long" >&6
6532
6533echo "$as_me:$LINENO: checking size of long" >&5
6534echo $ECHO_N "checking size of long... $ECHO_C" >&6
6535if test "${ac_cv_sizeof_long+set}" = set; then
6536 echo $ECHO_N "(cached) $ECHO_C" >&6
6537else
6538 if test "$ac_cv_type_long" = yes; then
6539 # The cast to unsigned long works around a bug in the HP C Compiler
6540 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6541 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6542 # This bug is HP SR number 8606223364.
6543 if test "$cross_compiling" = yes; then
6544 # Depending upon the size, compute the lo and hi bounds.
6545cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006546/* confdefs.h. */
6547_ACEOF
6548cat confdefs.h >>conftest.$ac_ext
6549cat >>conftest.$ac_ext <<_ACEOF
6550/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006551$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006552int
6553main ()
6554{
6555static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6556test_array [0] = 0
6557
6558 ;
6559 return 0;
6560}
6561_ACEOF
6562rm -f conftest.$ac_objext
6563if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006564 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006566 grep -v '^ *+' conftest.er1 >conftest.err
6567 rm -f conftest.er1
6568 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6570 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006571 { ac_try='test -z "$ac_c_werror_flag"
6572 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6574 (eval $ac_try) 2>&5
6575 ac_status=$?
6576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6577 (exit $ac_status); }; } &&
6578 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6580 (eval $ac_try) 2>&5
6581 ac_status=$?
6582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6583 (exit $ac_status); }; }; then
6584 ac_lo=0 ac_mid=0
6585 while :; do
6586 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006587/* confdefs.h. */
6588_ACEOF
6589cat confdefs.h >>conftest.$ac_ext
6590cat >>conftest.$ac_ext <<_ACEOF
6591/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006592$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006593int
6594main ()
6595{
6596static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6597test_array [0] = 0
6598
6599 ;
6600 return 0;
6601}
6602_ACEOF
6603rm -f conftest.$ac_objext
6604if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006605 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006606 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006607 grep -v '^ *+' conftest.er1 >conftest.err
6608 rm -f conftest.er1
6609 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6611 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006612 { ac_try='test -z "$ac_c_werror_flag"
6613 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006614 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6615 (eval $ac_try) 2>&5
6616 ac_status=$?
6617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6618 (exit $ac_status); }; } &&
6619 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006620 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6621 (eval $ac_try) 2>&5
6622 ac_status=$?
6623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6624 (exit $ac_status); }; }; then
6625 ac_hi=$ac_mid; break
6626else
6627 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006628sed 's/^/| /' conftest.$ac_ext >&5
6629
Martin v. Löwis11437992002-04-12 09:54:03 +00006630ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006631 if test $ac_lo -le $ac_mid; then
6632 ac_lo= ac_hi=
6633 break
6634 fi
6635 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006636fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006637rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006638 done
6639else
6640 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006641sed 's/^/| /' conftest.$ac_ext >&5
6642
Martin v. Löwis11437992002-04-12 09:54:03 +00006643cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006644/* confdefs.h. */
6645_ACEOF
6646cat confdefs.h >>conftest.$ac_ext
6647cat >>conftest.$ac_ext <<_ACEOF
6648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006649$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006650int
6651main ()
6652{
6653static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6654test_array [0] = 0
6655
6656 ;
6657 return 0;
6658}
6659_ACEOF
6660rm -f conftest.$ac_objext
6661if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006662 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006663 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006664 grep -v '^ *+' conftest.er1 >conftest.err
6665 rm -f conftest.er1
6666 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6668 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006669 { ac_try='test -z "$ac_c_werror_flag"
6670 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6672 (eval $ac_try) 2>&5
6673 ac_status=$?
6674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6675 (exit $ac_status); }; } &&
6676 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6678 (eval $ac_try) 2>&5
6679 ac_status=$?
6680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6681 (exit $ac_status); }; }; then
6682 ac_hi=-1 ac_mid=-1
6683 while :; do
6684 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006685/* confdefs.h. */
6686_ACEOF
6687cat confdefs.h >>conftest.$ac_ext
6688cat >>conftest.$ac_ext <<_ACEOF
6689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006690$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006691int
6692main ()
6693{
6694static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6695test_array [0] = 0
6696
6697 ;
6698 return 0;
6699}
6700_ACEOF
6701rm -f conftest.$ac_objext
6702if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006703 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006705 grep -v '^ *+' conftest.er1 >conftest.err
6706 rm -f conftest.er1
6707 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006708 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6709 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006710 { ac_try='test -z "$ac_c_werror_flag"
6711 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6713 (eval $ac_try) 2>&5
6714 ac_status=$?
6715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6716 (exit $ac_status); }; } &&
6717 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006718 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6719 (eval $ac_try) 2>&5
6720 ac_status=$?
6721 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6722 (exit $ac_status); }; }; then
6723 ac_lo=$ac_mid; break
6724else
6725 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006726sed 's/^/| /' conftest.$ac_ext >&5
6727
Martin v. Löwis11437992002-04-12 09:54:03 +00006728ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006729 if test $ac_mid -le $ac_hi; then
6730 ac_lo= ac_hi=
6731 break
6732 fi
6733 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006734fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006735rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006736 done
6737else
6738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006739sed 's/^/| /' conftest.$ac_ext >&5
6740
Martin v. Löwis11437992002-04-12 09:54:03 +00006741ac_lo= ac_hi=
6742fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006743rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006744fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006745rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006746# Binary search between lo and hi bounds.
6747while test "x$ac_lo" != "x$ac_hi"; do
6748 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6749 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006750/* confdefs.h. */
6751_ACEOF
6752cat confdefs.h >>conftest.$ac_ext
6753cat >>conftest.$ac_ext <<_ACEOF
6754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006755$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006756int
6757main ()
6758{
6759static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6760test_array [0] = 0
6761
6762 ;
6763 return 0;
6764}
6765_ACEOF
6766rm -f conftest.$ac_objext
6767if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006768 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006769 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006770 grep -v '^ *+' conftest.er1 >conftest.err
6771 rm -f conftest.er1
6772 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6774 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006775 { ac_try='test -z "$ac_c_werror_flag"
6776 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6778 (eval $ac_try) 2>&5
6779 ac_status=$?
6780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6781 (exit $ac_status); }; } &&
6782 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006783 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6784 (eval $ac_try) 2>&5
6785 ac_status=$?
6786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6787 (exit $ac_status); }; }; then
6788 ac_hi=$ac_mid
6789else
6790 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006791sed 's/^/| /' conftest.$ac_ext >&5
6792
Martin v. Löwis11437992002-04-12 09:54:03 +00006793ac_lo=`expr '(' $ac_mid ')' + 1`
6794fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006795rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006796done
6797case $ac_lo in
6798?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006799'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6800See \`config.log' for more details." >&5
6801echo "$as_me: error: cannot compute sizeof (long), 77
6802See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006803 { (exit 1); exit 1; }; } ;;
6804esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006805else
6806 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00006807 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6808See \`config.log' for more details." >&5
6809echo "$as_me: error: cannot run test program while cross compiling
6810See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006811 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006812else
Martin v. Löwis11437992002-04-12 09:54:03 +00006813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006814/* confdefs.h. */
6815_ACEOF
6816cat confdefs.h >>conftest.$ac_ext
6817cat >>conftest.$ac_ext <<_ACEOF
6818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006819$ac_includes_default
6820long longval () { return (long) (sizeof (long)); }
6821unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006822#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006823#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006824int
6825main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006826{
Martin v. Löwis11437992002-04-12 09:54:03 +00006827
6828 FILE *f = fopen ("conftest.val", "w");
6829 if (! f)
6830 exit (1);
6831 if (((long) (sizeof (long))) < 0)
6832 {
6833 long i = longval ();
6834 if (i != ((long) (sizeof (long))))
6835 exit (1);
6836 fprintf (f, "%ld\n", i);
6837 }
6838 else
6839 {
6840 unsigned long i = ulongval ();
6841 if (i != ((long) (sizeof (long))))
6842 exit (1);
6843 fprintf (f, "%lu\n", i);
6844 }
6845 exit (ferror (f) || fclose (f) != 0);
6846
6847 ;
6848 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006849}
Martin v. Löwis11437992002-04-12 09:54:03 +00006850_ACEOF
6851rm -f conftest$ac_exeext
6852if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6853 (eval $ac_link) 2>&5
6854 ac_status=$?
6855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6856 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6857 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6858 (eval $ac_try) 2>&5
6859 ac_status=$?
6860 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6861 (exit $ac_status); }; }; then
6862 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006863else
Martin v. Löwis11437992002-04-12 09:54:03 +00006864 echo "$as_me: program exited with status $ac_status" >&5
6865echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006866sed 's/^/| /' conftest.$ac_ext >&5
6867
Martin v. Löwis11437992002-04-12 09:54:03 +00006868( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006869{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6870See \`config.log' for more details." >&5
6871echo "$as_me: error: cannot compute sizeof (long), 77
6872See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006873 { (exit 1); exit 1; }; }
6874fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006875rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006876fi
6877fi
6878rm -f conftest.val
6879else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006880 ac_cv_sizeof_long=0
6881fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006882fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006883echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6884echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6885cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006886#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006887_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006888
6889
Martin v. Löwis11437992002-04-12 09:54:03 +00006890echo "$as_me:$LINENO: checking for void *" >&5
6891echo $ECHO_N "checking for void *... $ECHO_C" >&6
6892if test "${ac_cv_type_void_p+set}" = set; then
6893 echo $ECHO_N "(cached) $ECHO_C" >&6
6894else
6895 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006896/* confdefs.h. */
6897_ACEOF
6898cat confdefs.h >>conftest.$ac_ext
6899cat >>conftest.$ac_ext <<_ACEOF
6900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006901$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006902int
6903main ()
6904{
6905if ((void * *) 0)
6906 return 0;
6907if (sizeof (void *))
6908 return 0;
6909 ;
6910 return 0;
6911}
6912_ACEOF
6913rm -f conftest.$ac_objext
6914if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006915 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006916 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006917 grep -v '^ *+' conftest.er1 >conftest.err
6918 rm -f conftest.er1
6919 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6921 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006922 { ac_try='test -z "$ac_c_werror_flag"
6923 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006924 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6925 (eval $ac_try) 2>&5
6926 ac_status=$?
6927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6928 (exit $ac_status); }; } &&
6929 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6931 (eval $ac_try) 2>&5
6932 ac_status=$?
6933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6934 (exit $ac_status); }; }; then
6935 ac_cv_type_void_p=yes
6936else
6937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006938sed 's/^/| /' conftest.$ac_ext >&5
6939
Martin v. Löwis11437992002-04-12 09:54:03 +00006940ac_cv_type_void_p=no
6941fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006942rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006943fi
6944echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6945echo "${ECHO_T}$ac_cv_type_void_p" >&6
6946
6947echo "$as_me:$LINENO: checking size of void *" >&5
6948echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6949if test "${ac_cv_sizeof_void_p+set}" = set; then
6950 echo $ECHO_N "(cached) $ECHO_C" >&6
6951else
6952 if test "$ac_cv_type_void_p" = yes; then
6953 # The cast to unsigned long works around a bug in the HP C Compiler
6954 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6955 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6956 # This bug is HP SR number 8606223364.
6957 if test "$cross_compiling" = yes; then
6958 # Depending upon the size, compute the lo and hi bounds.
6959cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006960/* confdefs.h. */
6961_ACEOF
6962cat confdefs.h >>conftest.$ac_ext
6963cat >>conftest.$ac_ext <<_ACEOF
6964/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006965$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006966int
6967main ()
6968{
6969static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6970test_array [0] = 0
6971
6972 ;
6973 return 0;
6974}
6975_ACEOF
6976rm -f conftest.$ac_objext
6977if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006978 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006980 grep -v '^ *+' conftest.er1 >conftest.err
6981 rm -f conftest.er1
6982 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6984 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00006985 { ac_try='test -z "$ac_c_werror_flag"
6986 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6988 (eval $ac_try) 2>&5
6989 ac_status=$?
6990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6991 (exit $ac_status); }; } &&
6992 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006993 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6994 (eval $ac_try) 2>&5
6995 ac_status=$?
6996 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6997 (exit $ac_status); }; }; then
6998 ac_lo=0 ac_mid=0
6999 while :; do
7000 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007001/* confdefs.h. */
7002_ACEOF
7003cat confdefs.h >>conftest.$ac_ext
7004cat >>conftest.$ac_ext <<_ACEOF
7005/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007006$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007007int
7008main ()
7009{
7010static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7011test_array [0] = 0
7012
7013 ;
7014 return 0;
7015}
7016_ACEOF
7017rm -f conftest.$ac_objext
7018if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007019 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007021 grep -v '^ *+' conftest.er1 >conftest.err
7022 rm -f conftest.er1
7023 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7025 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007026 { ac_try='test -z "$ac_c_werror_flag"
7027 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7029 (eval $ac_try) 2>&5
7030 ac_status=$?
7031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7032 (exit $ac_status); }; } &&
7033 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007034 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7035 (eval $ac_try) 2>&5
7036 ac_status=$?
7037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7038 (exit $ac_status); }; }; then
7039 ac_hi=$ac_mid; break
7040else
7041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007042sed 's/^/| /' conftest.$ac_ext >&5
7043
Martin v. Löwis11437992002-04-12 09:54:03 +00007044ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007045 if test $ac_lo -le $ac_mid; then
7046 ac_lo= ac_hi=
7047 break
7048 fi
7049 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007050fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007051rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007052 done
7053else
7054 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007055sed 's/^/| /' conftest.$ac_ext >&5
7056
Martin v. Löwis11437992002-04-12 09:54:03 +00007057cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007058/* confdefs.h. */
7059_ACEOF
7060cat confdefs.h >>conftest.$ac_ext
7061cat >>conftest.$ac_ext <<_ACEOF
7062/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007063$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007064int
7065main ()
7066{
7067static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
7068test_array [0] = 0
7069
7070 ;
7071 return 0;
7072}
7073_ACEOF
7074rm -f conftest.$ac_objext
7075if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007076 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007077 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007078 grep -v '^ *+' conftest.er1 >conftest.err
7079 rm -f conftest.er1
7080 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7082 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007083 { ac_try='test -z "$ac_c_werror_flag"
7084 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7086 (eval $ac_try) 2>&5
7087 ac_status=$?
7088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7089 (exit $ac_status); }; } &&
7090 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7092 (eval $ac_try) 2>&5
7093 ac_status=$?
7094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7095 (exit $ac_status); }; }; then
7096 ac_hi=-1 ac_mid=-1
7097 while :; do
7098 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007099/* confdefs.h. */
7100_ACEOF
7101cat confdefs.h >>conftest.$ac_ext
7102cat >>conftest.$ac_ext <<_ACEOF
7103/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007104$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007105int
7106main ()
7107{
7108static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
7109test_array [0] = 0
7110
7111 ;
7112 return 0;
7113}
7114_ACEOF
7115rm -f conftest.$ac_objext
7116if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007117 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007119 grep -v '^ *+' conftest.er1 >conftest.err
7120 rm -f conftest.er1
7121 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7123 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007124 { ac_try='test -z "$ac_c_werror_flag"
7125 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007126 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7127 (eval $ac_try) 2>&5
7128 ac_status=$?
7129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7130 (exit $ac_status); }; } &&
7131 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007132 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7133 (eval $ac_try) 2>&5
7134 ac_status=$?
7135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7136 (exit $ac_status); }; }; then
7137 ac_lo=$ac_mid; break
7138else
7139 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007140sed 's/^/| /' conftest.$ac_ext >&5
7141
Martin v. Löwis11437992002-04-12 09:54:03 +00007142ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007143 if test $ac_mid -le $ac_hi; then
7144 ac_lo= ac_hi=
7145 break
7146 fi
7147 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007148fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007149rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007150 done
7151else
7152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007153sed 's/^/| /' conftest.$ac_ext >&5
7154
Martin v. Löwis11437992002-04-12 09:54:03 +00007155ac_lo= ac_hi=
7156fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007157rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007158fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007159rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007160# Binary search between lo and hi bounds.
7161while test "x$ac_lo" != "x$ac_hi"; do
7162 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7163 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007164/* confdefs.h. */
7165_ACEOF
7166cat confdefs.h >>conftest.$ac_ext
7167cat >>conftest.$ac_ext <<_ACEOF
7168/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007169$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007170int
7171main ()
7172{
7173static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7174test_array [0] = 0
7175
7176 ;
7177 return 0;
7178}
7179_ACEOF
7180rm -f conftest.$ac_objext
7181if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007182 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007183 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007184 grep -v '^ *+' conftest.er1 >conftest.err
7185 rm -f conftest.er1
7186 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7188 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007189 { ac_try='test -z "$ac_c_werror_flag"
7190 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007191 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7192 (eval $ac_try) 2>&5
7193 ac_status=$?
7194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7195 (exit $ac_status); }; } &&
7196 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007197 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7198 (eval $ac_try) 2>&5
7199 ac_status=$?
7200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7201 (exit $ac_status); }; }; then
7202 ac_hi=$ac_mid
7203else
7204 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007205sed 's/^/| /' conftest.$ac_ext >&5
7206
Martin v. Löwis11437992002-04-12 09:54:03 +00007207ac_lo=`expr '(' $ac_mid ')' + 1`
7208fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007209rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007210done
7211case $ac_lo in
7212?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007213'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7214See \`config.log' for more details." >&5
7215echo "$as_me: error: cannot compute sizeof (void *), 77
7216See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007217 { (exit 1); exit 1; }; } ;;
7218esac
Guido van Rossumad678af1998-10-02 14:42:15 +00007219else
7220 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007221 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7222See \`config.log' for more details." >&5
7223echo "$as_me: error: cannot run test program while cross compiling
7224See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007225 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00007226else
Martin v. Löwis11437992002-04-12 09:54:03 +00007227 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007228/* confdefs.h. */
7229_ACEOF
7230cat confdefs.h >>conftest.$ac_ext
7231cat >>conftest.$ac_ext <<_ACEOF
7232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007233$ac_includes_default
7234long longval () { return (long) (sizeof (void *)); }
7235unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007236#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007237#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007238int
7239main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00007240{
Martin v. Löwis11437992002-04-12 09:54:03 +00007241
7242 FILE *f = fopen ("conftest.val", "w");
7243 if (! f)
7244 exit (1);
7245 if (((long) (sizeof (void *))) < 0)
7246 {
7247 long i = longval ();
7248 if (i != ((long) (sizeof (void *))))
7249 exit (1);
7250 fprintf (f, "%ld\n", i);
7251 }
7252 else
7253 {
7254 unsigned long i = ulongval ();
7255 if (i != ((long) (sizeof (void *))))
7256 exit (1);
7257 fprintf (f, "%lu\n", i);
7258 }
7259 exit (ferror (f) || fclose (f) != 0);
7260
7261 ;
7262 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00007263}
Martin v. Löwis11437992002-04-12 09:54:03 +00007264_ACEOF
7265rm -f conftest$ac_exeext
7266if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7267 (eval $ac_link) 2>&5
7268 ac_status=$?
7269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7270 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7272 (eval $ac_try) 2>&5
7273 ac_status=$?
7274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7275 (exit $ac_status); }; }; then
7276 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00007277else
Martin v. Löwis11437992002-04-12 09:54:03 +00007278 echo "$as_me: program exited with status $ac_status" >&5
7279echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007280sed 's/^/| /' conftest.$ac_ext >&5
7281
Martin v. Löwis11437992002-04-12 09:54:03 +00007282( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007283{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7284See \`config.log' for more details." >&5
7285echo "$as_me: error: cannot compute sizeof (void *), 77
7286See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007287 { (exit 1); exit 1; }; }
7288fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007289rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007290fi
7291fi
7292rm -f conftest.val
7293else
Guido van Rossumad678af1998-10-02 14:42:15 +00007294 ac_cv_sizeof_void_p=0
7295fi
Guido van Rossumad678af1998-10-02 14:42:15 +00007296fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007297echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
7298echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
7299cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007300#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007301_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007302
7303
Martin v. Löwis11437992002-04-12 09:54:03 +00007304echo "$as_me:$LINENO: checking for short" >&5
7305echo $ECHO_N "checking for short... $ECHO_C" >&6
7306if test "${ac_cv_type_short+set}" = set; then
7307 echo $ECHO_N "(cached) $ECHO_C" >&6
7308else
7309 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007310/* confdefs.h. */
7311_ACEOF
7312cat confdefs.h >>conftest.$ac_ext
7313cat >>conftest.$ac_ext <<_ACEOF
7314/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007315$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007316int
7317main ()
7318{
7319if ((short *) 0)
7320 return 0;
7321if (sizeof (short))
7322 return 0;
7323 ;
7324 return 0;
7325}
7326_ACEOF
7327rm -f conftest.$ac_objext
7328if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007329 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007330 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007331 grep -v '^ *+' conftest.er1 >conftest.err
7332 rm -f conftest.er1
7333 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7335 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007336 { ac_try='test -z "$ac_c_werror_flag"
7337 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7339 (eval $ac_try) 2>&5
7340 ac_status=$?
7341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7342 (exit $ac_status); }; } &&
7343 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7345 (eval $ac_try) 2>&5
7346 ac_status=$?
7347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7348 (exit $ac_status); }; }; then
7349 ac_cv_type_short=yes
7350else
7351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007352sed 's/^/| /' conftest.$ac_ext >&5
7353
Martin v. Löwis11437992002-04-12 09:54:03 +00007354ac_cv_type_short=no
7355fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007356rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007357fi
7358echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7359echo "${ECHO_T}$ac_cv_type_short" >&6
7360
7361echo "$as_me:$LINENO: checking size of short" >&5
7362echo $ECHO_N "checking size of short... $ECHO_C" >&6
7363if test "${ac_cv_sizeof_short+set}" = set; then
7364 echo $ECHO_N "(cached) $ECHO_C" >&6
7365else
7366 if test "$ac_cv_type_short" = yes; then
7367 # The cast to unsigned long works around a bug in the HP C Compiler
7368 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7369 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7370 # This bug is HP SR number 8606223364.
7371 if test "$cross_compiling" = yes; then
7372 # Depending upon the size, compute the lo and hi bounds.
7373cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007374/* confdefs.h. */
7375_ACEOF
7376cat confdefs.h >>conftest.$ac_ext
7377cat >>conftest.$ac_ext <<_ACEOF
7378/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007379$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007380int
7381main ()
7382{
7383static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
7384test_array [0] = 0
7385
7386 ;
7387 return 0;
7388}
7389_ACEOF
7390rm -f conftest.$ac_objext
7391if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007392 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007393 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007394 grep -v '^ *+' conftest.er1 >conftest.err
7395 rm -f conftest.er1
7396 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7398 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007399 { ac_try='test -z "$ac_c_werror_flag"
7400 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7402 (eval $ac_try) 2>&5
7403 ac_status=$?
7404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7405 (exit $ac_status); }; } &&
7406 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7408 (eval $ac_try) 2>&5
7409 ac_status=$?
7410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7411 (exit $ac_status); }; }; then
7412 ac_lo=0 ac_mid=0
7413 while :; do
7414 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007415/* confdefs.h. */
7416_ACEOF
7417cat confdefs.h >>conftest.$ac_ext
7418cat >>conftest.$ac_ext <<_ACEOF
7419/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007420$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007421int
7422main ()
7423{
7424static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7425test_array [0] = 0
7426
7427 ;
7428 return 0;
7429}
7430_ACEOF
7431rm -f conftest.$ac_objext
7432if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007433 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007434 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007435 grep -v '^ *+' conftest.er1 >conftest.err
7436 rm -f conftest.er1
7437 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7439 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007440 { ac_try='test -z "$ac_c_werror_flag"
7441 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7443 (eval $ac_try) 2>&5
7444 ac_status=$?
7445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7446 (exit $ac_status); }; } &&
7447 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007448 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7449 (eval $ac_try) 2>&5
7450 ac_status=$?
7451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7452 (exit $ac_status); }; }; then
7453 ac_hi=$ac_mid; break
7454else
7455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007456sed 's/^/| /' conftest.$ac_ext >&5
7457
Martin v. Löwis11437992002-04-12 09:54:03 +00007458ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007459 if test $ac_lo -le $ac_mid; then
7460 ac_lo= ac_hi=
7461 break
7462 fi
7463 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007464fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007465rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007466 done
7467else
7468 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007469sed 's/^/| /' conftest.$ac_ext >&5
7470
Martin v. Löwis11437992002-04-12 09:54:03 +00007471cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007472/* confdefs.h. */
7473_ACEOF
7474cat confdefs.h >>conftest.$ac_ext
7475cat >>conftest.$ac_ext <<_ACEOF
7476/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007477$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007478int
7479main ()
7480{
7481static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7482test_array [0] = 0
7483
7484 ;
7485 return 0;
7486}
7487_ACEOF
7488rm -f conftest.$ac_objext
7489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007490 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007491 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007492 grep -v '^ *+' conftest.er1 >conftest.err
7493 rm -f conftest.er1
7494 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7496 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007497 { ac_try='test -z "$ac_c_werror_flag"
7498 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7500 (eval $ac_try) 2>&5
7501 ac_status=$?
7502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7503 (exit $ac_status); }; } &&
7504 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7506 (eval $ac_try) 2>&5
7507 ac_status=$?
7508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7509 (exit $ac_status); }; }; then
7510 ac_hi=-1 ac_mid=-1
7511 while :; do
7512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007513/* confdefs.h. */
7514_ACEOF
7515cat confdefs.h >>conftest.$ac_ext
7516cat >>conftest.$ac_ext <<_ACEOF
7517/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007518$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007519int
7520main ()
7521{
7522static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7523test_array [0] = 0
7524
7525 ;
7526 return 0;
7527}
7528_ACEOF
7529rm -f conftest.$ac_objext
7530if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007531 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007532 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007533 grep -v '^ *+' conftest.er1 >conftest.err
7534 rm -f conftest.er1
7535 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7537 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007538 { ac_try='test -z "$ac_c_werror_flag"
7539 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7541 (eval $ac_try) 2>&5
7542 ac_status=$?
7543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7544 (exit $ac_status); }; } &&
7545 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007546 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7547 (eval $ac_try) 2>&5
7548 ac_status=$?
7549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7550 (exit $ac_status); }; }; then
7551 ac_lo=$ac_mid; break
7552else
7553 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007554sed 's/^/| /' conftest.$ac_ext >&5
7555
Martin v. Löwis11437992002-04-12 09:54:03 +00007556ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007557 if test $ac_mid -le $ac_hi; then
7558 ac_lo= ac_hi=
7559 break
7560 fi
7561 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007562fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007563rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007564 done
7565else
7566 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007567sed 's/^/| /' conftest.$ac_ext >&5
7568
Martin v. Löwis11437992002-04-12 09:54:03 +00007569ac_lo= ac_hi=
7570fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007571rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007572fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007573rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007574# Binary search between lo and hi bounds.
7575while test "x$ac_lo" != "x$ac_hi"; do
7576 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7577 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007578/* confdefs.h. */
7579_ACEOF
7580cat confdefs.h >>conftest.$ac_ext
7581cat >>conftest.$ac_ext <<_ACEOF
7582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007583$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007584int
7585main ()
7586{
7587static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7588test_array [0] = 0
7589
7590 ;
7591 return 0;
7592}
7593_ACEOF
7594rm -f conftest.$ac_objext
7595if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007596 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007597 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007598 grep -v '^ *+' conftest.er1 >conftest.err
7599 rm -f conftest.er1
7600 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7602 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007603 { ac_try='test -z "$ac_c_werror_flag"
7604 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007605 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7606 (eval $ac_try) 2>&5
7607 ac_status=$?
7608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7609 (exit $ac_status); }; } &&
7610 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7612 (eval $ac_try) 2>&5
7613 ac_status=$?
7614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7615 (exit $ac_status); }; }; then
7616 ac_hi=$ac_mid
7617else
7618 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007619sed 's/^/| /' conftest.$ac_ext >&5
7620
Martin v. Löwis11437992002-04-12 09:54:03 +00007621ac_lo=`expr '(' $ac_mid ')' + 1`
7622fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007623rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007624done
7625case $ac_lo in
7626?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007627'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7628See \`config.log' for more details." >&5
7629echo "$as_me: error: cannot compute sizeof (short), 77
7630See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007631 { (exit 1); exit 1; }; } ;;
7632esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007633else
7634 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00007635 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7636See \`config.log' for more details." >&5
7637echo "$as_me: error: cannot run test program while cross compiling
7638See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007639 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007640else
Martin v. Löwis11437992002-04-12 09:54:03 +00007641 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007642/* confdefs.h. */
7643_ACEOF
7644cat confdefs.h >>conftest.$ac_ext
7645cat >>conftest.$ac_ext <<_ACEOF
7646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007647$ac_includes_default
7648long longval () { return (long) (sizeof (short)); }
7649unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007650#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007651#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007652int
7653main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007654{
Martin v. Löwis11437992002-04-12 09:54:03 +00007655
7656 FILE *f = fopen ("conftest.val", "w");
7657 if (! f)
7658 exit (1);
7659 if (((long) (sizeof (short))) < 0)
7660 {
7661 long i = longval ();
7662 if (i != ((long) (sizeof (short))))
7663 exit (1);
7664 fprintf (f, "%ld\n", i);
7665 }
7666 else
7667 {
7668 unsigned long i = ulongval ();
7669 if (i != ((long) (sizeof (short))))
7670 exit (1);
7671 fprintf (f, "%lu\n", i);
7672 }
7673 exit (ferror (f) || fclose (f) != 0);
7674
7675 ;
7676 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007677}
Martin v. Löwis11437992002-04-12 09:54:03 +00007678_ACEOF
7679rm -f conftest$ac_exeext
7680if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7681 (eval $ac_link) 2>&5
7682 ac_status=$?
7683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7684 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7685 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7686 (eval $ac_try) 2>&5
7687 ac_status=$?
7688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7689 (exit $ac_status); }; }; then
7690 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007691else
Martin v. Löwis11437992002-04-12 09:54:03 +00007692 echo "$as_me: program exited with status $ac_status" >&5
7693echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007694sed 's/^/| /' conftest.$ac_ext >&5
7695
Martin v. Löwis11437992002-04-12 09:54:03 +00007696( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007697{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7698See \`config.log' for more details." >&5
7699echo "$as_me: error: cannot compute sizeof (short), 77
7700See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007701 { (exit 1); exit 1; }; }
7702fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007703rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007704fi
7705fi
7706rm -f conftest.val
7707else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007708 ac_cv_sizeof_short=0
7709fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007710fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007711echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7712echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7713cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007714#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007715_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007716
7717
Martin v. Löwis11437992002-04-12 09:54:03 +00007718echo "$as_me:$LINENO: checking for float" >&5
7719echo $ECHO_N "checking for float... $ECHO_C" >&6
7720if test "${ac_cv_type_float+set}" = set; then
7721 echo $ECHO_N "(cached) $ECHO_C" >&6
7722else
7723 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007724/* confdefs.h. */
7725_ACEOF
7726cat confdefs.h >>conftest.$ac_ext
7727cat >>conftest.$ac_ext <<_ACEOF
7728/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007729$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007730int
7731main ()
7732{
7733if ((float *) 0)
7734 return 0;
7735if (sizeof (float))
7736 return 0;
7737 ;
7738 return 0;
7739}
7740_ACEOF
7741rm -f conftest.$ac_objext
7742if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007743 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007745 grep -v '^ *+' conftest.er1 >conftest.err
7746 rm -f conftest.er1
7747 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7749 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007750 { ac_try='test -z "$ac_c_werror_flag"
7751 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007752 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7753 (eval $ac_try) 2>&5
7754 ac_status=$?
7755 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7756 (exit $ac_status); }; } &&
7757 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007758 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7759 (eval $ac_try) 2>&5
7760 ac_status=$?
7761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7762 (exit $ac_status); }; }; then
7763 ac_cv_type_float=yes
7764else
7765 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007766sed 's/^/| /' conftest.$ac_ext >&5
7767
Martin v. Löwis11437992002-04-12 09:54:03 +00007768ac_cv_type_float=no
7769fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007770rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007771fi
7772echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7773echo "${ECHO_T}$ac_cv_type_float" >&6
7774
7775echo "$as_me:$LINENO: checking size of float" >&5
7776echo $ECHO_N "checking size of float... $ECHO_C" >&6
7777if test "${ac_cv_sizeof_float+set}" = set; then
7778 echo $ECHO_N "(cached) $ECHO_C" >&6
7779else
7780 if test "$ac_cv_type_float" = yes; then
7781 # The cast to unsigned long works around a bug in the HP C Compiler
7782 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7783 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7784 # This bug is HP SR number 8606223364.
7785 if test "$cross_compiling" = yes; then
7786 # Depending upon the size, compute the lo and hi bounds.
7787cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007788/* confdefs.h. */
7789_ACEOF
7790cat confdefs.h >>conftest.$ac_ext
7791cat >>conftest.$ac_ext <<_ACEOF
7792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007793$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007794int
7795main ()
7796{
7797static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7798test_array [0] = 0
7799
7800 ;
7801 return 0;
7802}
7803_ACEOF
7804rm -f conftest.$ac_objext
7805if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007806 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007808 grep -v '^ *+' conftest.er1 >conftest.err
7809 rm -f conftest.er1
7810 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7812 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007813 { ac_try='test -z "$ac_c_werror_flag"
7814 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7816 (eval $ac_try) 2>&5
7817 ac_status=$?
7818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7819 (exit $ac_status); }; } &&
7820 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7822 (eval $ac_try) 2>&5
7823 ac_status=$?
7824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7825 (exit $ac_status); }; }; then
7826 ac_lo=0 ac_mid=0
7827 while :; do
7828 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007829/* confdefs.h. */
7830_ACEOF
7831cat confdefs.h >>conftest.$ac_ext
7832cat >>conftest.$ac_ext <<_ACEOF
7833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007834$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007835int
7836main ()
7837{
7838static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7839test_array [0] = 0
7840
7841 ;
7842 return 0;
7843}
7844_ACEOF
7845rm -f conftest.$ac_objext
7846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007847 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007848 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007849 grep -v '^ *+' conftest.er1 >conftest.err
7850 rm -f conftest.er1
7851 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7853 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007854 { ac_try='test -z "$ac_c_werror_flag"
7855 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7857 (eval $ac_try) 2>&5
7858 ac_status=$?
7859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7860 (exit $ac_status); }; } &&
7861 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7863 (eval $ac_try) 2>&5
7864 ac_status=$?
7865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7866 (exit $ac_status); }; }; then
7867 ac_hi=$ac_mid; break
7868else
7869 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007870sed 's/^/| /' conftest.$ac_ext >&5
7871
Martin v. Löwis11437992002-04-12 09:54:03 +00007872ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007873 if test $ac_lo -le $ac_mid; then
7874 ac_lo= ac_hi=
7875 break
7876 fi
7877 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007878fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007879rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007880 done
7881else
7882 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007883sed 's/^/| /' conftest.$ac_ext >&5
7884
Martin v. Löwis11437992002-04-12 09:54:03 +00007885cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007886/* confdefs.h. */
7887_ACEOF
7888cat confdefs.h >>conftest.$ac_ext
7889cat >>conftest.$ac_ext <<_ACEOF
7890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007891$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007892int
7893main ()
7894{
7895static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7896test_array [0] = 0
7897
7898 ;
7899 return 0;
7900}
7901_ACEOF
7902rm -f conftest.$ac_objext
7903if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007904 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007905 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007906 grep -v '^ *+' conftest.er1 >conftest.err
7907 rm -f conftest.er1
7908 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7910 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007911 { ac_try='test -z "$ac_c_werror_flag"
7912 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7914 (eval $ac_try) 2>&5
7915 ac_status=$?
7916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7917 (exit $ac_status); }; } &&
7918 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007919 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7920 (eval $ac_try) 2>&5
7921 ac_status=$?
7922 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7923 (exit $ac_status); }; }; then
7924 ac_hi=-1 ac_mid=-1
7925 while :; do
7926 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007927/* confdefs.h. */
7928_ACEOF
7929cat confdefs.h >>conftest.$ac_ext
7930cat >>conftest.$ac_ext <<_ACEOF
7931/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007932$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007933int
7934main ()
7935{
7936static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7937test_array [0] = 0
7938
7939 ;
7940 return 0;
7941}
7942_ACEOF
7943rm -f conftest.$ac_objext
7944if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007945 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007947 grep -v '^ *+' conftest.er1 >conftest.err
7948 rm -f conftest.er1
7949 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7951 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00007952 { ac_try='test -z "$ac_c_werror_flag"
7953 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007954 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7955 (eval $ac_try) 2>&5
7956 ac_status=$?
7957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7958 (exit $ac_status); }; } &&
7959 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7961 (eval $ac_try) 2>&5
7962 ac_status=$?
7963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7964 (exit $ac_status); }; }; then
7965 ac_lo=$ac_mid; break
7966else
7967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007968sed 's/^/| /' conftest.$ac_ext >&5
7969
Martin v. Löwis11437992002-04-12 09:54:03 +00007970ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007971 if test $ac_mid -le $ac_hi; then
7972 ac_lo= ac_hi=
7973 break
7974 fi
7975 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007976fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007977rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007978 done
7979else
7980 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007981sed 's/^/| /' conftest.$ac_ext >&5
7982
Martin v. Löwis11437992002-04-12 09:54:03 +00007983ac_lo= ac_hi=
7984fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007985rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007986fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007987rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007988# Binary search between lo and hi bounds.
7989while test "x$ac_lo" != "x$ac_hi"; do
7990 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7991 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007992/* confdefs.h. */
7993_ACEOF
7994cat confdefs.h >>conftest.$ac_ext
7995cat >>conftest.$ac_ext <<_ACEOF
7996/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007997$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007998int
7999main ()
8000{
8001static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
8002test_array [0] = 0
8003
8004 ;
8005 return 0;
8006}
8007_ACEOF
8008rm -f conftest.$ac_objext
8009if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008010 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008012 grep -v '^ *+' conftest.er1 >conftest.err
8013 rm -f conftest.er1
8014 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8016 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008017 { ac_try='test -z "$ac_c_werror_flag"
8018 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8020 (eval $ac_try) 2>&5
8021 ac_status=$?
8022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8023 (exit $ac_status); }; } &&
8024 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008025 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8026 (eval $ac_try) 2>&5
8027 ac_status=$?
8028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8029 (exit $ac_status); }; }; then
8030 ac_hi=$ac_mid
8031else
8032 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008033sed 's/^/| /' conftest.$ac_ext >&5
8034
Martin v. Löwis11437992002-04-12 09:54:03 +00008035ac_lo=`expr '(' $ac_mid ')' + 1`
8036fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008037rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008038done
8039case $ac_lo in
8040?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008041'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8042See \`config.log' for more details." >&5
8043echo "$as_me: error: cannot compute sizeof (float), 77
8044See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008045 { (exit 1); exit 1; }; } ;;
8046esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008047else
8048 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008049 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8050See \`config.log' for more details." >&5
8051echo "$as_me: error: cannot run test program while cross compiling
8052See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008053 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008054else
Martin v. Löwis11437992002-04-12 09:54:03 +00008055 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008056/* confdefs.h. */
8057_ACEOF
8058cat confdefs.h >>conftest.$ac_ext
8059cat >>conftest.$ac_ext <<_ACEOF
8060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008061$ac_includes_default
8062long longval () { return (long) (sizeof (float)); }
8063unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008064#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008065#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008066int
8067main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008068{
Martin v. Löwis11437992002-04-12 09:54:03 +00008069
8070 FILE *f = fopen ("conftest.val", "w");
8071 if (! f)
8072 exit (1);
8073 if (((long) (sizeof (float))) < 0)
8074 {
8075 long i = longval ();
8076 if (i != ((long) (sizeof (float))))
8077 exit (1);
8078 fprintf (f, "%ld\n", i);
8079 }
8080 else
8081 {
8082 unsigned long i = ulongval ();
8083 if (i != ((long) (sizeof (float))))
8084 exit (1);
8085 fprintf (f, "%lu\n", i);
8086 }
8087 exit (ferror (f) || fclose (f) != 0);
8088
8089 ;
8090 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008091}
Martin v. Löwis11437992002-04-12 09:54:03 +00008092_ACEOF
8093rm -f conftest$ac_exeext
8094if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8095 (eval $ac_link) 2>&5
8096 ac_status=$?
8097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8098 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8099 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8100 (eval $ac_try) 2>&5
8101 ac_status=$?
8102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8103 (exit $ac_status); }; }; then
8104 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008105else
Martin v. Löwis11437992002-04-12 09:54:03 +00008106 echo "$as_me: program exited with status $ac_status" >&5
8107echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008108sed 's/^/| /' conftest.$ac_ext >&5
8109
Martin v. Löwis11437992002-04-12 09:54:03 +00008110( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008111{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8112See \`config.log' for more details." >&5
8113echo "$as_me: error: cannot compute sizeof (float), 77
8114See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008115 { (exit 1); exit 1; }; }
8116fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008117rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008118fi
8119fi
8120rm -f conftest.val
8121else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008122 ac_cv_sizeof_float=0
8123fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008124fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008125echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8126echo "${ECHO_T}$ac_cv_sizeof_float" >&6
8127cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008128#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008129_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008130
8131
Martin v. Löwis11437992002-04-12 09:54:03 +00008132echo "$as_me:$LINENO: checking for double" >&5
8133echo $ECHO_N "checking for double... $ECHO_C" >&6
8134if test "${ac_cv_type_double+set}" = set; then
8135 echo $ECHO_N "(cached) $ECHO_C" >&6
8136else
8137 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008138/* confdefs.h. */
8139_ACEOF
8140cat confdefs.h >>conftest.$ac_ext
8141cat >>conftest.$ac_ext <<_ACEOF
8142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008143$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008144int
8145main ()
8146{
8147if ((double *) 0)
8148 return 0;
8149if (sizeof (double))
8150 return 0;
8151 ;
8152 return 0;
8153}
8154_ACEOF
8155rm -f conftest.$ac_objext
8156if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008157 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008159 grep -v '^ *+' conftest.er1 >conftest.err
8160 rm -f conftest.er1
8161 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8163 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008164 { ac_try='test -z "$ac_c_werror_flag"
8165 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008166 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8167 (eval $ac_try) 2>&5
8168 ac_status=$?
8169 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8170 (exit $ac_status); }; } &&
8171 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008172 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8173 (eval $ac_try) 2>&5
8174 ac_status=$?
8175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8176 (exit $ac_status); }; }; then
8177 ac_cv_type_double=yes
8178else
8179 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008180sed 's/^/| /' conftest.$ac_ext >&5
8181
Martin v. Löwis11437992002-04-12 09:54:03 +00008182ac_cv_type_double=no
8183fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008184rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008185fi
8186echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8187echo "${ECHO_T}$ac_cv_type_double" >&6
8188
8189echo "$as_me:$LINENO: checking size of double" >&5
8190echo $ECHO_N "checking size of double... $ECHO_C" >&6
8191if test "${ac_cv_sizeof_double+set}" = set; then
8192 echo $ECHO_N "(cached) $ECHO_C" >&6
8193else
8194 if test "$ac_cv_type_double" = yes; then
8195 # The cast to unsigned long works around a bug in the HP C Compiler
8196 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8197 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8198 # This bug is HP SR number 8606223364.
8199 if test "$cross_compiling" = yes; then
8200 # Depending upon the size, compute the lo and hi bounds.
8201cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008202/* confdefs.h. */
8203_ACEOF
8204cat confdefs.h >>conftest.$ac_ext
8205cat >>conftest.$ac_ext <<_ACEOF
8206/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008207$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008208int
8209main ()
8210{
8211static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
8212test_array [0] = 0
8213
8214 ;
8215 return 0;
8216}
8217_ACEOF
8218rm -f conftest.$ac_objext
8219if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008220 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008221 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008222 grep -v '^ *+' conftest.er1 >conftest.err
8223 rm -f conftest.er1
8224 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8226 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008227 { ac_try='test -z "$ac_c_werror_flag"
8228 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8230 (eval $ac_try) 2>&5
8231 ac_status=$?
8232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8233 (exit $ac_status); }; } &&
8234 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8236 (eval $ac_try) 2>&5
8237 ac_status=$?
8238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8239 (exit $ac_status); }; }; then
8240 ac_lo=0 ac_mid=0
8241 while :; do
8242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008243/* confdefs.h. */
8244_ACEOF
8245cat confdefs.h >>conftest.$ac_ext
8246cat >>conftest.$ac_ext <<_ACEOF
8247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008248$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008249int
8250main ()
8251{
8252static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8253test_array [0] = 0
8254
8255 ;
8256 return 0;
8257}
8258_ACEOF
8259rm -f conftest.$ac_objext
8260if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008261 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008262 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008263 grep -v '^ *+' conftest.er1 >conftest.err
8264 rm -f conftest.er1
8265 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8267 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008268 { ac_try='test -z "$ac_c_werror_flag"
8269 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8271 (eval $ac_try) 2>&5
8272 ac_status=$?
8273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8274 (exit $ac_status); }; } &&
8275 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8277 (eval $ac_try) 2>&5
8278 ac_status=$?
8279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8280 (exit $ac_status); }; }; then
8281 ac_hi=$ac_mid; break
8282else
8283 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008284sed 's/^/| /' conftest.$ac_ext >&5
8285
Martin v. Löwis11437992002-04-12 09:54:03 +00008286ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008287 if test $ac_lo -le $ac_mid; then
8288 ac_lo= ac_hi=
8289 break
8290 fi
8291 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008292fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008293rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008294 done
8295else
8296 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008297sed 's/^/| /' conftest.$ac_ext >&5
8298
Martin v. Löwis11437992002-04-12 09:54:03 +00008299cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008300/* confdefs.h. */
8301_ACEOF
8302cat confdefs.h >>conftest.$ac_ext
8303cat >>conftest.$ac_ext <<_ACEOF
8304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008305$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008306int
8307main ()
8308{
8309static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
8310test_array [0] = 0
8311
8312 ;
8313 return 0;
8314}
8315_ACEOF
8316rm -f conftest.$ac_objext
8317if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008318 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008319 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008320 grep -v '^ *+' conftest.er1 >conftest.err
8321 rm -f conftest.er1
8322 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8324 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008325 { ac_try='test -z "$ac_c_werror_flag"
8326 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8328 (eval $ac_try) 2>&5
8329 ac_status=$?
8330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8331 (exit $ac_status); }; } &&
8332 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8334 (eval $ac_try) 2>&5
8335 ac_status=$?
8336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8337 (exit $ac_status); }; }; then
8338 ac_hi=-1 ac_mid=-1
8339 while :; do
8340 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008341/* confdefs.h. */
8342_ACEOF
8343cat confdefs.h >>conftest.$ac_ext
8344cat >>conftest.$ac_ext <<_ACEOF
8345/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008346$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008347int
8348main ()
8349{
8350static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
8351test_array [0] = 0
8352
8353 ;
8354 return 0;
8355}
8356_ACEOF
8357rm -f conftest.$ac_objext
8358if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008359 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008360 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008361 grep -v '^ *+' conftest.er1 >conftest.err
8362 rm -f conftest.er1
8363 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8365 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008366 { ac_try='test -z "$ac_c_werror_flag"
8367 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8369 (eval $ac_try) 2>&5
8370 ac_status=$?
8371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8372 (exit $ac_status); }; } &&
8373 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008374 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8375 (eval $ac_try) 2>&5
8376 ac_status=$?
8377 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8378 (exit $ac_status); }; }; then
8379 ac_lo=$ac_mid; break
8380else
8381 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008382sed 's/^/| /' conftest.$ac_ext >&5
8383
Martin v. Löwis11437992002-04-12 09:54:03 +00008384ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008385 if test $ac_mid -le $ac_hi; then
8386 ac_lo= ac_hi=
8387 break
8388 fi
8389 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008390fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008391rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008392 done
8393else
8394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008395sed 's/^/| /' conftest.$ac_ext >&5
8396
Martin v. Löwis11437992002-04-12 09:54:03 +00008397ac_lo= ac_hi=
8398fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008399rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008400fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008401rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008402# Binary search between lo and hi bounds.
8403while test "x$ac_lo" != "x$ac_hi"; do
8404 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8405 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008406/* confdefs.h. */
8407_ACEOF
8408cat confdefs.h >>conftest.$ac_ext
8409cat >>conftest.$ac_ext <<_ACEOF
8410/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008411$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008412int
8413main ()
8414{
8415static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8416test_array [0] = 0
8417
8418 ;
8419 return 0;
8420}
8421_ACEOF
8422rm -f conftest.$ac_objext
8423if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008424 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008425 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008426 grep -v '^ *+' conftest.er1 >conftest.err
8427 rm -f conftest.er1
8428 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8430 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008431 { ac_try='test -z "$ac_c_werror_flag"
8432 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8434 (eval $ac_try) 2>&5
8435 ac_status=$?
8436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8437 (exit $ac_status); }; } &&
8438 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008439 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8440 (eval $ac_try) 2>&5
8441 ac_status=$?
8442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8443 (exit $ac_status); }; }; then
8444 ac_hi=$ac_mid
8445else
8446 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008447sed 's/^/| /' conftest.$ac_ext >&5
8448
Martin v. Löwis11437992002-04-12 09:54:03 +00008449ac_lo=`expr '(' $ac_mid ')' + 1`
8450fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008451rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008452done
8453case $ac_lo in
8454?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008455'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8456See \`config.log' for more details." >&5
8457echo "$as_me: error: cannot compute sizeof (double), 77
8458See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008459 { (exit 1); exit 1; }; } ;;
8460esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008461else
8462 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008463 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8464See \`config.log' for more details." >&5
8465echo "$as_me: error: cannot run test program while cross compiling
8466See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008467 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008468else
Martin v. Löwis11437992002-04-12 09:54:03 +00008469 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008470/* confdefs.h. */
8471_ACEOF
8472cat confdefs.h >>conftest.$ac_ext
8473cat >>conftest.$ac_ext <<_ACEOF
8474/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008475$ac_includes_default
8476long longval () { return (long) (sizeof (double)); }
8477unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008478#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008479#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008480int
8481main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008482{
Martin v. Löwis11437992002-04-12 09:54:03 +00008483
8484 FILE *f = fopen ("conftest.val", "w");
8485 if (! f)
8486 exit (1);
8487 if (((long) (sizeof (double))) < 0)
8488 {
8489 long i = longval ();
8490 if (i != ((long) (sizeof (double))))
8491 exit (1);
8492 fprintf (f, "%ld\n", i);
8493 }
8494 else
8495 {
8496 unsigned long i = ulongval ();
8497 if (i != ((long) (sizeof (double))))
8498 exit (1);
8499 fprintf (f, "%lu\n", i);
8500 }
8501 exit (ferror (f) || fclose (f) != 0);
8502
8503 ;
8504 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008505}
Martin v. Löwis11437992002-04-12 09:54:03 +00008506_ACEOF
8507rm -f conftest$ac_exeext
8508if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8509 (eval $ac_link) 2>&5
8510 ac_status=$?
8511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8512 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8514 (eval $ac_try) 2>&5
8515 ac_status=$?
8516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8517 (exit $ac_status); }; }; then
8518 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008519else
Martin v. Löwis11437992002-04-12 09:54:03 +00008520 echo "$as_me: program exited with status $ac_status" >&5
8521echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008522sed 's/^/| /' conftest.$ac_ext >&5
8523
Martin v. Löwis11437992002-04-12 09:54:03 +00008524( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008525{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8526See \`config.log' for more details." >&5
8527echo "$as_me: error: cannot compute sizeof (double), 77
8528See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008529 { (exit 1); exit 1; }; }
8530fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008531rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008532fi
8533fi
8534rm -f conftest.val
8535else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008536 ac_cv_sizeof_double=0
8537fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008538fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008539echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8540echo "${ECHO_T}$ac_cv_sizeof_double" >&6
8541cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008542#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008543_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008544
8545
Martin v. Löwis11437992002-04-12 09:54:03 +00008546echo "$as_me:$LINENO: checking for fpos_t" >&5
8547echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
8548if test "${ac_cv_type_fpos_t+set}" = set; then
8549 echo $ECHO_N "(cached) $ECHO_C" >&6
8550else
8551 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008552/* confdefs.h. */
8553_ACEOF
8554cat confdefs.h >>conftest.$ac_ext
8555cat >>conftest.$ac_ext <<_ACEOF
8556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008557$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008558int
8559main ()
8560{
8561if ((fpos_t *) 0)
8562 return 0;
8563if (sizeof (fpos_t))
8564 return 0;
8565 ;
8566 return 0;
8567}
8568_ACEOF
8569rm -f conftest.$ac_objext
8570if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008571 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008572 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008573 grep -v '^ *+' conftest.er1 >conftest.err
8574 rm -f conftest.er1
8575 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8577 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008578 { ac_try='test -z "$ac_c_werror_flag"
8579 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008580 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8581 (eval $ac_try) 2>&5
8582 ac_status=$?
8583 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8584 (exit $ac_status); }; } &&
8585 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008586 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8587 (eval $ac_try) 2>&5
8588 ac_status=$?
8589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8590 (exit $ac_status); }; }; then
8591 ac_cv_type_fpos_t=yes
8592else
8593 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008594sed 's/^/| /' conftest.$ac_ext >&5
8595
Martin v. Löwis11437992002-04-12 09:54:03 +00008596ac_cv_type_fpos_t=no
8597fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008598rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008599fi
8600echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8601echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8602
8603echo "$as_me:$LINENO: checking size of fpos_t" >&5
8604echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8605if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8606 echo $ECHO_N "(cached) $ECHO_C" >&6
8607else
8608 if test "$ac_cv_type_fpos_t" = yes; then
8609 # The cast to unsigned long works around a bug in the HP C Compiler
8610 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8611 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8612 # This bug is HP SR number 8606223364.
8613 if test "$cross_compiling" = yes; then
8614 # Depending upon the size, compute the lo and hi bounds.
8615cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008616/* confdefs.h. */
8617_ACEOF
8618cat confdefs.h >>conftest.$ac_ext
8619cat >>conftest.$ac_ext <<_ACEOF
8620/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008621$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008622int
8623main ()
8624{
8625static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8626test_array [0] = 0
8627
8628 ;
8629 return 0;
8630}
8631_ACEOF
8632rm -f conftest.$ac_objext
8633if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008634 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008635 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008636 grep -v '^ *+' conftest.er1 >conftest.err
8637 rm -f conftest.er1
8638 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8640 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008641 { ac_try='test -z "$ac_c_werror_flag"
8642 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8644 (eval $ac_try) 2>&5
8645 ac_status=$?
8646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8647 (exit $ac_status); }; } &&
8648 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008649 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8650 (eval $ac_try) 2>&5
8651 ac_status=$?
8652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8653 (exit $ac_status); }; }; then
8654 ac_lo=0 ac_mid=0
8655 while :; do
8656 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008657/* confdefs.h. */
8658_ACEOF
8659cat confdefs.h >>conftest.$ac_ext
8660cat >>conftest.$ac_ext <<_ACEOF
8661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008662$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008663int
8664main ()
8665{
8666static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8667test_array [0] = 0
8668
8669 ;
8670 return 0;
8671}
8672_ACEOF
8673rm -f conftest.$ac_objext
8674if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008675 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008676 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008677 grep -v '^ *+' conftest.er1 >conftest.err
8678 rm -f conftest.er1
8679 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8681 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008682 { ac_try='test -z "$ac_c_werror_flag"
8683 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8685 (eval $ac_try) 2>&5
8686 ac_status=$?
8687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8688 (exit $ac_status); }; } &&
8689 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8691 (eval $ac_try) 2>&5
8692 ac_status=$?
8693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8694 (exit $ac_status); }; }; then
8695 ac_hi=$ac_mid; break
8696else
8697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008698sed 's/^/| /' conftest.$ac_ext >&5
8699
Martin v. Löwis11437992002-04-12 09:54:03 +00008700ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008701 if test $ac_lo -le $ac_mid; then
8702 ac_lo= ac_hi=
8703 break
8704 fi
8705 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008706fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008707rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008708 done
8709else
8710 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008711sed 's/^/| /' conftest.$ac_ext >&5
8712
Martin v. Löwis11437992002-04-12 09:54:03 +00008713cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008714/* confdefs.h. */
8715_ACEOF
8716cat confdefs.h >>conftest.$ac_ext
8717cat >>conftest.$ac_ext <<_ACEOF
8718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008719$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008720int
8721main ()
8722{
8723static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8724test_array [0] = 0
8725
8726 ;
8727 return 0;
8728}
8729_ACEOF
8730rm -f conftest.$ac_objext
8731if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008732 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008734 grep -v '^ *+' conftest.er1 >conftest.err
8735 rm -f conftest.er1
8736 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8738 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008739 { ac_try='test -z "$ac_c_werror_flag"
8740 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8742 (eval $ac_try) 2>&5
8743 ac_status=$?
8744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8745 (exit $ac_status); }; } &&
8746 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8748 (eval $ac_try) 2>&5
8749 ac_status=$?
8750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8751 (exit $ac_status); }; }; then
8752 ac_hi=-1 ac_mid=-1
8753 while :; do
8754 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008755/* confdefs.h. */
8756_ACEOF
8757cat confdefs.h >>conftest.$ac_ext
8758cat >>conftest.$ac_ext <<_ACEOF
8759/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008760$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008761int
8762main ()
8763{
8764static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8765test_array [0] = 0
8766
8767 ;
8768 return 0;
8769}
8770_ACEOF
8771rm -f conftest.$ac_objext
8772if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008773 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008774 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008775 grep -v '^ *+' conftest.er1 >conftest.err
8776 rm -f conftest.er1
8777 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8779 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008780 { ac_try='test -z "$ac_c_werror_flag"
8781 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8783 (eval $ac_try) 2>&5
8784 ac_status=$?
8785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8786 (exit $ac_status); }; } &&
8787 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8789 (eval $ac_try) 2>&5
8790 ac_status=$?
8791 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8792 (exit $ac_status); }; }; then
8793 ac_lo=$ac_mid; break
8794else
8795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008796sed 's/^/| /' conftest.$ac_ext >&5
8797
Martin v. Löwis11437992002-04-12 09:54:03 +00008798ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008799 if test $ac_mid -le $ac_hi; then
8800 ac_lo= ac_hi=
8801 break
8802 fi
8803 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008804fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008805rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008806 done
8807else
8808 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008809sed 's/^/| /' conftest.$ac_ext >&5
8810
Martin v. Löwis11437992002-04-12 09:54:03 +00008811ac_lo= ac_hi=
8812fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008813rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008814fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008815rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008816# Binary search between lo and hi bounds.
8817while test "x$ac_lo" != "x$ac_hi"; do
8818 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8819 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008820/* confdefs.h. */
8821_ACEOF
8822cat confdefs.h >>conftest.$ac_ext
8823cat >>conftest.$ac_ext <<_ACEOF
8824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008825$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008826int
8827main ()
8828{
8829static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8830test_array [0] = 0
8831
8832 ;
8833 return 0;
8834}
8835_ACEOF
8836rm -f conftest.$ac_objext
8837if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008838 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008840 grep -v '^ *+' conftest.er1 >conftest.err
8841 rm -f conftest.er1
8842 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8844 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008845 { ac_try='test -z "$ac_c_werror_flag"
8846 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8848 (eval $ac_try) 2>&5
8849 ac_status=$?
8850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8851 (exit $ac_status); }; } &&
8852 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8854 (eval $ac_try) 2>&5
8855 ac_status=$?
8856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8857 (exit $ac_status); }; }; then
8858 ac_hi=$ac_mid
8859else
8860 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008861sed 's/^/| /' conftest.$ac_ext >&5
8862
Martin v. Löwis11437992002-04-12 09:54:03 +00008863ac_lo=`expr '(' $ac_mid ')' + 1`
8864fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008865rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008866done
8867case $ac_lo in
8868?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008869'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8870See \`config.log' for more details." >&5
8871echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8872See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008873 { (exit 1); exit 1; }; } ;;
8874esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008875else
8876 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00008877 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8878See \`config.log' for more details." >&5
8879echo "$as_me: error: cannot run test program while cross compiling
8880See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008881 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008882else
Martin v. Löwis11437992002-04-12 09:54:03 +00008883 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008884/* confdefs.h. */
8885_ACEOF
8886cat confdefs.h >>conftest.$ac_ext
8887cat >>conftest.$ac_ext <<_ACEOF
8888/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008889$ac_includes_default
8890long longval () { return (long) (sizeof (fpos_t)); }
8891unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008892#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008893#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008894int
8895main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008896{
Martin v. Löwis11437992002-04-12 09:54:03 +00008897
8898 FILE *f = fopen ("conftest.val", "w");
8899 if (! f)
8900 exit (1);
8901 if (((long) (sizeof (fpos_t))) < 0)
8902 {
8903 long i = longval ();
8904 if (i != ((long) (sizeof (fpos_t))))
8905 exit (1);
8906 fprintf (f, "%ld\n", i);
8907 }
8908 else
8909 {
8910 unsigned long i = ulongval ();
8911 if (i != ((long) (sizeof (fpos_t))))
8912 exit (1);
8913 fprintf (f, "%lu\n", i);
8914 }
8915 exit (ferror (f) || fclose (f) != 0);
8916
8917 ;
8918 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008919}
Martin v. Löwis11437992002-04-12 09:54:03 +00008920_ACEOF
8921rm -f conftest$ac_exeext
8922if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8923 (eval $ac_link) 2>&5
8924 ac_status=$?
8925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8926 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8927 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8928 (eval $ac_try) 2>&5
8929 ac_status=$?
8930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8931 (exit $ac_status); }; }; then
8932 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008933else
Martin v. Löwis11437992002-04-12 09:54:03 +00008934 echo "$as_me: program exited with status $ac_status" >&5
8935echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008936sed 's/^/| /' conftest.$ac_ext >&5
8937
Martin v. Löwis11437992002-04-12 09:54:03 +00008938( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008939{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8940See \`config.log' for more details." >&5
8941echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8942See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008943 { (exit 1); exit 1; }; }
8944fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008945rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008946fi
8947fi
8948rm -f conftest.val
8949else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008950 ac_cv_sizeof_fpos_t=0
8951fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008952fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008953echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8954echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8955cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008956#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008957_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008958
Michael W. Hudson54241132001-12-07 15:38:26 +00008959
8960
Martin v. Löwis11437992002-04-12 09:54:03 +00008961echo "$as_me:$LINENO: checking for long long support" >&5
8962echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008963have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008964cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008965/* confdefs.h. */
8966_ACEOF
8967cat confdefs.h >>conftest.$ac_ext
8968cat >>conftest.$ac_ext <<_ACEOF
8969/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008970
Martin v. Löwis11437992002-04-12 09:54:03 +00008971int
8972main ()
8973{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008974long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008975 ;
8976 return 0;
8977}
8978_ACEOF
8979rm -f conftest.$ac_objext
8980if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008981 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008983 grep -v '^ *+' conftest.er1 >conftest.err
8984 rm -f conftest.er1
8985 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8987 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00008988 { ac_try='test -z "$ac_c_werror_flag"
8989 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8991 (eval $ac_try) 2>&5
8992 ac_status=$?
8993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8994 (exit $ac_status); }; } &&
8995 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8997 (eval $ac_try) 2>&5
8998 ac_status=$?
8999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9000 (exit $ac_status); }; }; then
9001
9002
9003cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009004#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009005_ACEOF
9006
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009007 have_long_long=yes
9008
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009009else
Martin v. Löwis11437992002-04-12 09:54:03 +00009010 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009011sed 's/^/| /' conftest.$ac_ext >&5
9012
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009013fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009014rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009015echo "$as_me:$LINENO: result: $have_long_long" >&5
9016echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009017if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009018echo "$as_me:$LINENO: checking for long long" >&5
9019echo $ECHO_N "checking for long long... $ECHO_C" >&6
9020if test "${ac_cv_type_long_long+set}" = set; then
9021 echo $ECHO_N "(cached) $ECHO_C" >&6
9022else
9023 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009024/* confdefs.h. */
9025_ACEOF
9026cat confdefs.h >>conftest.$ac_ext
9027cat >>conftest.$ac_ext <<_ACEOF
9028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009029$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009030int
9031main ()
9032{
9033if ((long long *) 0)
9034 return 0;
9035if (sizeof (long long))
9036 return 0;
9037 ;
9038 return 0;
9039}
9040_ACEOF
9041rm -f conftest.$ac_objext
9042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009043 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009045 grep -v '^ *+' conftest.er1 >conftest.err
9046 rm -f conftest.er1
9047 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9049 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009050 { ac_try='test -z "$ac_c_werror_flag"
9051 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9053 (eval $ac_try) 2>&5
9054 ac_status=$?
9055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9056 (exit $ac_status); }; } &&
9057 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9059 (eval $ac_try) 2>&5
9060 ac_status=$?
9061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9062 (exit $ac_status); }; }; then
9063 ac_cv_type_long_long=yes
9064else
9065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009066sed 's/^/| /' conftest.$ac_ext >&5
9067
Martin v. Löwis11437992002-04-12 09:54:03 +00009068ac_cv_type_long_long=no
9069fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009070rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009071fi
9072echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
9073echo "${ECHO_T}$ac_cv_type_long_long" >&6
9074
9075echo "$as_me:$LINENO: checking size of long long" >&5
9076echo $ECHO_N "checking size of long long... $ECHO_C" >&6
9077if test "${ac_cv_sizeof_long_long+set}" = set; then
9078 echo $ECHO_N "(cached) $ECHO_C" >&6
9079else
9080 if test "$ac_cv_type_long_long" = yes; then
9081 # The cast to unsigned long works around a bug in the HP C Compiler
9082 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9083 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9084 # This bug is HP SR number 8606223364.
9085 if test "$cross_compiling" = yes; then
9086 # Depending upon the size, compute the lo and hi bounds.
9087cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009088/* confdefs.h. */
9089_ACEOF
9090cat confdefs.h >>conftest.$ac_ext
9091cat >>conftest.$ac_ext <<_ACEOF
9092/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009093$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009094int
9095main ()
9096{
9097static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
9098test_array [0] = 0
9099
9100 ;
9101 return 0;
9102}
9103_ACEOF
9104rm -f conftest.$ac_objext
9105if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009106 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009107 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009108 grep -v '^ *+' conftest.er1 >conftest.err
9109 rm -f conftest.er1
9110 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9112 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009113 { ac_try='test -z "$ac_c_werror_flag"
9114 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9116 (eval $ac_try) 2>&5
9117 ac_status=$?
9118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9119 (exit $ac_status); }; } &&
9120 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009121 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9122 (eval $ac_try) 2>&5
9123 ac_status=$?
9124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9125 (exit $ac_status); }; }; then
9126 ac_lo=0 ac_mid=0
9127 while :; do
9128 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009129/* confdefs.h. */
9130_ACEOF
9131cat confdefs.h >>conftest.$ac_ext
9132cat >>conftest.$ac_ext <<_ACEOF
9133/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009134$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009135int
9136main ()
9137{
9138static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9139test_array [0] = 0
9140
9141 ;
9142 return 0;
9143}
9144_ACEOF
9145rm -f conftest.$ac_objext
9146if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009147 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009149 grep -v '^ *+' conftest.er1 >conftest.err
9150 rm -f conftest.er1
9151 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9153 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009154 { ac_try='test -z "$ac_c_werror_flag"
9155 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9157 (eval $ac_try) 2>&5
9158 ac_status=$?
9159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9160 (exit $ac_status); }; } &&
9161 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9163 (eval $ac_try) 2>&5
9164 ac_status=$?
9165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9166 (exit $ac_status); }; }; then
9167 ac_hi=$ac_mid; break
9168else
9169 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009170sed 's/^/| /' conftest.$ac_ext >&5
9171
Martin v. Löwis11437992002-04-12 09:54:03 +00009172ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009173 if test $ac_lo -le $ac_mid; then
9174 ac_lo= ac_hi=
9175 break
9176 fi
9177 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009178fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009179rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009180 done
9181else
9182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009183sed 's/^/| /' conftest.$ac_ext >&5
9184
Martin v. Löwis11437992002-04-12 09:54:03 +00009185cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009186/* confdefs.h. */
9187_ACEOF
9188cat confdefs.h >>conftest.$ac_ext
9189cat >>conftest.$ac_ext <<_ACEOF
9190/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009191$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009192int
9193main ()
9194{
9195static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
9196test_array [0] = 0
9197
9198 ;
9199 return 0;
9200}
9201_ACEOF
9202rm -f conftest.$ac_objext
9203if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009204 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009205 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009206 grep -v '^ *+' conftest.er1 >conftest.err
9207 rm -f conftest.er1
9208 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9210 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009211 { ac_try='test -z "$ac_c_werror_flag"
9212 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9214 (eval $ac_try) 2>&5
9215 ac_status=$?
9216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9217 (exit $ac_status); }; } &&
9218 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009219 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9220 (eval $ac_try) 2>&5
9221 ac_status=$?
9222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9223 (exit $ac_status); }; }; then
9224 ac_hi=-1 ac_mid=-1
9225 while :; do
9226 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009227/* confdefs.h. */
9228_ACEOF
9229cat confdefs.h >>conftest.$ac_ext
9230cat >>conftest.$ac_ext <<_ACEOF
9231/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009232$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009233int
9234main ()
9235{
9236static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
9237test_array [0] = 0
9238
9239 ;
9240 return 0;
9241}
9242_ACEOF
9243rm -f conftest.$ac_objext
9244if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009245 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009246 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009247 grep -v '^ *+' conftest.er1 >conftest.err
9248 rm -f conftest.er1
9249 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9251 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009252 { ac_try='test -z "$ac_c_werror_flag"
9253 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9255 (eval $ac_try) 2>&5
9256 ac_status=$?
9257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9258 (exit $ac_status); }; } &&
9259 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9261 (eval $ac_try) 2>&5
9262 ac_status=$?
9263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9264 (exit $ac_status); }; }; then
9265 ac_lo=$ac_mid; break
9266else
9267 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009268sed 's/^/| /' conftest.$ac_ext >&5
9269
Martin v. Löwis11437992002-04-12 09:54:03 +00009270ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009271 if test $ac_mid -le $ac_hi; then
9272 ac_lo= ac_hi=
9273 break
9274 fi
9275 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009276fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009277rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009278 done
9279else
9280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009281sed 's/^/| /' conftest.$ac_ext >&5
9282
Martin v. Löwis11437992002-04-12 09:54:03 +00009283ac_lo= ac_hi=
9284fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009285rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009286fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009287rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009288# Binary search between lo and hi bounds.
9289while test "x$ac_lo" != "x$ac_hi"; do
9290 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9291 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009292/* confdefs.h. */
9293_ACEOF
9294cat confdefs.h >>conftest.$ac_ext
9295cat >>conftest.$ac_ext <<_ACEOF
9296/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009297$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009298int
9299main ()
9300{
9301static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9302test_array [0] = 0
9303
9304 ;
9305 return 0;
9306}
9307_ACEOF
9308rm -f conftest.$ac_objext
9309if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009310 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009311 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009312 grep -v '^ *+' conftest.er1 >conftest.err
9313 rm -f conftest.er1
9314 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9316 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009317 { ac_try='test -z "$ac_c_werror_flag"
9318 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9320 (eval $ac_try) 2>&5
9321 ac_status=$?
9322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9323 (exit $ac_status); }; } &&
9324 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009325 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9326 (eval $ac_try) 2>&5
9327 ac_status=$?
9328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9329 (exit $ac_status); }; }; then
9330 ac_hi=$ac_mid
9331else
9332 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009333sed 's/^/| /' conftest.$ac_ext >&5
9334
Martin v. Löwis11437992002-04-12 09:54:03 +00009335ac_lo=`expr '(' $ac_mid ')' + 1`
9336fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009337rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009338done
9339case $ac_lo in
9340?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009341'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9342See \`config.log' for more details." >&5
9343echo "$as_me: error: cannot compute sizeof (long long), 77
9344See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009345 { (exit 1); exit 1; }; } ;;
9346esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009347else
9348 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009349 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9350See \`config.log' for more details." >&5
9351echo "$as_me: error: cannot run test program while cross compiling
9352See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009353 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009354else
Martin v. Löwis11437992002-04-12 09:54:03 +00009355 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009356/* confdefs.h. */
9357_ACEOF
9358cat confdefs.h >>conftest.$ac_ext
9359cat >>conftest.$ac_ext <<_ACEOF
9360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009361$ac_includes_default
9362long longval () { return (long) (sizeof (long long)); }
9363unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009364#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009365#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009366int
9367main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009368{
Martin v. Löwis11437992002-04-12 09:54:03 +00009369
9370 FILE *f = fopen ("conftest.val", "w");
9371 if (! f)
9372 exit (1);
9373 if (((long) (sizeof (long long))) < 0)
9374 {
9375 long i = longval ();
9376 if (i != ((long) (sizeof (long long))))
9377 exit (1);
9378 fprintf (f, "%ld\n", i);
9379 }
9380 else
9381 {
9382 unsigned long i = ulongval ();
9383 if (i != ((long) (sizeof (long long))))
9384 exit (1);
9385 fprintf (f, "%lu\n", i);
9386 }
9387 exit (ferror (f) || fclose (f) != 0);
9388
9389 ;
9390 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009391}
Martin v. Löwis11437992002-04-12 09:54:03 +00009392_ACEOF
9393rm -f conftest$ac_exeext
9394if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9395 (eval $ac_link) 2>&5
9396 ac_status=$?
9397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9398 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9400 (eval $ac_try) 2>&5
9401 ac_status=$?
9402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9403 (exit $ac_status); }; }; then
9404 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009405else
Martin v. Löwis11437992002-04-12 09:54:03 +00009406 echo "$as_me: program exited with status $ac_status" >&5
9407echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009408sed 's/^/| /' conftest.$ac_ext >&5
9409
Martin v. Löwis11437992002-04-12 09:54:03 +00009410( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009411{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9412See \`config.log' for more details." >&5
9413echo "$as_me: error: cannot compute sizeof (long long), 77
9414See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009415 { (exit 1); exit 1; }; }
9416fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009417rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009418fi
9419fi
9420rm -f conftest.val
9421else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009422 ac_cv_sizeof_long_long=0
9423fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009424fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009425echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
9426echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
9427cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009428#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00009429_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009430
Michael W. Hudson54241132001-12-07 15:38:26 +00009431
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009432fi
9433
Martin v. Löwis11437992002-04-12 09:54:03 +00009434echo "$as_me:$LINENO: checking for uintptr_t support" >&5
9435echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009436have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009437cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009438/* confdefs.h. */
9439_ACEOF
9440cat confdefs.h >>conftest.$ac_ext
9441cat >>conftest.$ac_ext <<_ACEOF
9442/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009443
Martin v. Löwis11437992002-04-12 09:54:03 +00009444int
9445main ()
9446{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009447uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009448 ;
9449 return 0;
9450}
9451_ACEOF
9452rm -f conftest.$ac_objext
9453if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009454 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009456 grep -v '^ *+' conftest.er1 >conftest.err
9457 rm -f conftest.er1
9458 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9460 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009461 { ac_try='test -z "$ac_c_werror_flag"
9462 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9464 (eval $ac_try) 2>&5
9465 ac_status=$?
9466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9467 (exit $ac_status); }; } &&
9468 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9470 (eval $ac_try) 2>&5
9471 ac_status=$?
9472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9473 (exit $ac_status); }; }; then
9474
9475
9476cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009477#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009478_ACEOF
9479
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009480 have_uintptr_t=yes
9481
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009482else
Martin v. Löwis11437992002-04-12 09:54:03 +00009483 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009484sed 's/^/| /' conftest.$ac_ext >&5
9485
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009486fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009487rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009488echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
9489echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009490if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009491echo "$as_me:$LINENO: checking for uintptr_t" >&5
9492echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
9493if test "${ac_cv_type_uintptr_t+set}" = set; then
9494 echo $ECHO_N "(cached) $ECHO_C" >&6
9495else
9496 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009497/* confdefs.h. */
9498_ACEOF
9499cat confdefs.h >>conftest.$ac_ext
9500cat >>conftest.$ac_ext <<_ACEOF
9501/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009502$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009503int
9504main ()
9505{
9506if ((uintptr_t *) 0)
9507 return 0;
9508if (sizeof (uintptr_t))
9509 return 0;
9510 ;
9511 return 0;
9512}
9513_ACEOF
9514rm -f conftest.$ac_objext
9515if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009516 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009517 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009518 grep -v '^ *+' conftest.er1 >conftest.err
9519 rm -f conftest.er1
9520 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9522 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009523 { ac_try='test -z "$ac_c_werror_flag"
9524 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9526 (eval $ac_try) 2>&5
9527 ac_status=$?
9528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9529 (exit $ac_status); }; } &&
9530 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009531 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9532 (eval $ac_try) 2>&5
9533 ac_status=$?
9534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9535 (exit $ac_status); }; }; then
9536 ac_cv_type_uintptr_t=yes
9537else
9538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009539sed 's/^/| /' conftest.$ac_ext >&5
9540
Martin v. Löwis11437992002-04-12 09:54:03 +00009541ac_cv_type_uintptr_t=no
9542fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009543rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009544fi
9545echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
9546echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
9547
9548echo "$as_me:$LINENO: checking size of uintptr_t" >&5
9549echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
9550if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
9551 echo $ECHO_N "(cached) $ECHO_C" >&6
9552else
9553 if test "$ac_cv_type_uintptr_t" = yes; then
9554 # The cast to unsigned long works around a bug in the HP C Compiler
9555 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9556 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9557 # This bug is HP SR number 8606223364.
9558 if test "$cross_compiling" = yes; then
9559 # Depending upon the size, compute the lo and hi bounds.
9560cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009561/* confdefs.h. */
9562_ACEOF
9563cat confdefs.h >>conftest.$ac_ext
9564cat >>conftest.$ac_ext <<_ACEOF
9565/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009566$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009567int
9568main ()
9569{
9570static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
9571test_array [0] = 0
9572
9573 ;
9574 return 0;
9575}
9576_ACEOF
9577rm -f conftest.$ac_objext
9578if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009579 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009581 grep -v '^ *+' conftest.er1 >conftest.err
9582 rm -f conftest.er1
9583 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9585 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009586 { ac_try='test -z "$ac_c_werror_flag"
9587 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9589 (eval $ac_try) 2>&5
9590 ac_status=$?
9591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9592 (exit $ac_status); }; } &&
9593 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9595 (eval $ac_try) 2>&5
9596 ac_status=$?
9597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9598 (exit $ac_status); }; }; then
9599 ac_lo=0 ac_mid=0
9600 while :; do
9601 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009602/* confdefs.h. */
9603_ACEOF
9604cat confdefs.h >>conftest.$ac_ext
9605cat >>conftest.$ac_ext <<_ACEOF
9606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009607$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009608int
9609main ()
9610{
9611static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9612test_array [0] = 0
9613
9614 ;
9615 return 0;
9616}
9617_ACEOF
9618rm -f conftest.$ac_objext
9619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009620 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009622 grep -v '^ *+' conftest.er1 >conftest.err
9623 rm -f conftest.er1
9624 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9626 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009627 { ac_try='test -z "$ac_c_werror_flag"
9628 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9630 (eval $ac_try) 2>&5
9631 ac_status=$?
9632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9633 (exit $ac_status); }; } &&
9634 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009635 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9636 (eval $ac_try) 2>&5
9637 ac_status=$?
9638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9639 (exit $ac_status); }; }; then
9640 ac_hi=$ac_mid; break
9641else
9642 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009643sed 's/^/| /' conftest.$ac_ext >&5
9644
Martin v. Löwis11437992002-04-12 09:54:03 +00009645ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009646 if test $ac_lo -le $ac_mid; then
9647 ac_lo= ac_hi=
9648 break
9649 fi
9650 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009651fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009652rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009653 done
9654else
9655 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009656sed 's/^/| /' conftest.$ac_ext >&5
9657
Martin v. Löwis11437992002-04-12 09:54:03 +00009658cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009659/* confdefs.h. */
9660_ACEOF
9661cat confdefs.h >>conftest.$ac_ext
9662cat >>conftest.$ac_ext <<_ACEOF
9663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009664$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009665int
9666main ()
9667{
9668static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
9669test_array [0] = 0
9670
9671 ;
9672 return 0;
9673}
9674_ACEOF
9675rm -f conftest.$ac_objext
9676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009677 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009678 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009679 grep -v '^ *+' conftest.er1 >conftest.err
9680 rm -f conftest.er1
9681 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9683 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009684 { ac_try='test -z "$ac_c_werror_flag"
9685 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009686 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9687 (eval $ac_try) 2>&5
9688 ac_status=$?
9689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9690 (exit $ac_status); }; } &&
9691 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9693 (eval $ac_try) 2>&5
9694 ac_status=$?
9695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9696 (exit $ac_status); }; }; then
9697 ac_hi=-1 ac_mid=-1
9698 while :; do
9699 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009700/* confdefs.h. */
9701_ACEOF
9702cat confdefs.h >>conftest.$ac_ext
9703cat >>conftest.$ac_ext <<_ACEOF
9704/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009705$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009706int
9707main ()
9708{
9709static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
9710test_array [0] = 0
9711
9712 ;
9713 return 0;
9714}
9715_ACEOF
9716rm -f conftest.$ac_objext
9717if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009718 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009720 grep -v '^ *+' conftest.er1 >conftest.err
9721 rm -f conftest.er1
9722 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9724 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009725 { ac_try='test -z "$ac_c_werror_flag"
9726 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9728 (eval $ac_try) 2>&5
9729 ac_status=$?
9730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9731 (exit $ac_status); }; } &&
9732 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9734 (eval $ac_try) 2>&5
9735 ac_status=$?
9736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9737 (exit $ac_status); }; }; then
9738 ac_lo=$ac_mid; break
9739else
9740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009741sed 's/^/| /' conftest.$ac_ext >&5
9742
Martin v. Löwis11437992002-04-12 09:54:03 +00009743ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009744 if test $ac_mid -le $ac_hi; then
9745 ac_lo= ac_hi=
9746 break
9747 fi
9748 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009749fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009750rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009751 done
9752else
9753 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009754sed 's/^/| /' conftest.$ac_ext >&5
9755
Martin v. Löwis11437992002-04-12 09:54:03 +00009756ac_lo= ac_hi=
9757fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009758rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009759fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009760rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009761# Binary search between lo and hi bounds.
9762while test "x$ac_lo" != "x$ac_hi"; do
9763 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9764 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009765/* confdefs.h. */
9766_ACEOF
9767cat confdefs.h >>conftest.$ac_ext
9768cat >>conftest.$ac_ext <<_ACEOF
9769/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009770$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009771int
9772main ()
9773{
9774static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9775test_array [0] = 0
9776
9777 ;
9778 return 0;
9779}
9780_ACEOF
9781rm -f conftest.$ac_objext
9782if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009783 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009785 grep -v '^ *+' conftest.er1 >conftest.err
9786 rm -f conftest.er1
9787 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9789 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +00009790 { ac_try='test -z "$ac_c_werror_flag"
9791 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9793 (eval $ac_try) 2>&5
9794 ac_status=$?
9795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9796 (exit $ac_status); }; } &&
9797 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9799 (eval $ac_try) 2>&5
9800 ac_status=$?
9801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9802 (exit $ac_status); }; }; then
9803 ac_hi=$ac_mid
9804else
9805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009806sed 's/^/| /' conftest.$ac_ext >&5
9807
Martin v. Löwis11437992002-04-12 09:54:03 +00009808ac_lo=`expr '(' $ac_mid ')' + 1`
9809fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009810rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009811done
9812case $ac_lo in
9813?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009814'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9815See \`config.log' for more details." >&5
9816echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9817See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009818 { (exit 1); exit 1; }; } ;;
9819esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009820else
9821 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +00009822 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9823See \`config.log' for more details." >&5
9824echo "$as_me: error: cannot run test program while cross compiling
9825See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009827else
Martin v. Löwis11437992002-04-12 09:54:03 +00009828 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009829/* confdefs.h. */
9830_ACEOF
9831cat confdefs.h >>conftest.$ac_ext
9832cat >>conftest.$ac_ext <<_ACEOF
9833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009834$ac_includes_default
9835long longval () { return (long) (sizeof (uintptr_t)); }
9836unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009837#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009838#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009839int
9840main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009841{
Martin v. Löwis11437992002-04-12 09:54:03 +00009842
9843 FILE *f = fopen ("conftest.val", "w");
9844 if (! f)
9845 exit (1);
9846 if (((long) (sizeof (uintptr_t))) < 0)
9847 {
9848 long i = longval ();
9849 if (i != ((long) (sizeof (uintptr_t))))
9850 exit (1);
9851 fprintf (f, "%ld\n", i);
9852 }
9853 else
9854 {
9855 unsigned long i = ulongval ();
9856 if (i != ((long) (sizeof (uintptr_t))))
9857 exit (1);
9858 fprintf (f, "%lu\n", i);
9859 }
9860 exit (ferror (f) || fclose (f) != 0);
9861
9862 ;
9863 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009864}
Martin v. Löwis11437992002-04-12 09:54:03 +00009865_ACEOF
9866rm -f conftest$ac_exeext
9867if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9868 (eval $ac_link) 2>&5
9869 ac_status=$?
9870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9871 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9873 (eval $ac_try) 2>&5
9874 ac_status=$?
9875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9876 (exit $ac_status); }; }; then
9877 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009878else
Martin v. Löwis11437992002-04-12 09:54:03 +00009879 echo "$as_me: program exited with status $ac_status" >&5
9880echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009881sed 's/^/| /' conftest.$ac_ext >&5
9882
Martin v. Löwis11437992002-04-12 09:54:03 +00009883( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009884{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9885See \`config.log' for more details." >&5
9886echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9887See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009888 { (exit 1); exit 1; }; }
9889fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009890rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009891fi
9892fi
9893rm -f conftest.val
9894else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009895 ac_cv_sizeof_uintptr_t=0
9896fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009897fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009898echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9899echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9900cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009901#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009902_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009903
Michael W. Hudson54241132001-12-07 15:38:26 +00009904
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009905fi
9906
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009907# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009908echo "$as_me:$LINENO: checking size of off_t" >&5
9909echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9910if test "${ac_cv_sizeof_off_t+set}" = set; then
9911 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009912else
9913 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009914 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009915else
Martin v. Löwis11437992002-04-12 09:54:03 +00009916 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009917/* confdefs.h. */
9918_ACEOF
9919cat confdefs.h >>conftest.$ac_ext
9920cat >>conftest.$ac_ext <<_ACEOF
9921/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009922#include <stdio.h>
9923#include <sys/types.h>
9924main()
9925{
9926 FILE *f=fopen("conftestval", "w");
9927 if (!f) exit(1);
9928 fprintf(f, "%d\n", sizeof(off_t));
9929 exit(0);
9930}
Martin v. Löwis11437992002-04-12 09:54:03 +00009931_ACEOF
9932rm -f conftest$ac_exeext
9933if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9934 (eval $ac_link) 2>&5
9935 ac_status=$?
9936 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9937 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9939 (eval $ac_try) 2>&5
9940 ac_status=$?
9941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9942 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009943 ac_cv_sizeof_off_t=`cat conftestval`
9944else
Martin v. Löwis11437992002-04-12 09:54:03 +00009945 echo "$as_me: program exited with status $ac_status" >&5
9946echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009947sed 's/^/| /' conftest.$ac_ext >&5
9948
Martin v. Löwis11437992002-04-12 09:54:03 +00009949( exit $ac_status )
9950ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009951fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009952rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009953fi
9954
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009955fi
9956
Martin v. Löwis11437992002-04-12 09:54:03 +00009957echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9958echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9959
9960cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009961#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009962_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009963
Michael W. Hudson54241132001-12-07 15:38:26 +00009964
Martin v. Löwis11437992002-04-12 09:54:03 +00009965echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9966echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009967if test "$have_long_long" = yes -a \
9968 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9969 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009970
Martin v. Löwis11437992002-04-12 09:54:03 +00009971cat >>confdefs.h <<\_ACEOF
9972#define HAVE_LARGEFILE_SUPPORT 1
9973_ACEOF
9974
9975 echo "$as_me:$LINENO: result: yes" >&5
9976echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009977else
Martin v. Löwis11437992002-04-12 09:54:03 +00009978 echo "$as_me:$LINENO: result: no" >&5
9979echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009980fi
9981
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009982# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009983echo "$as_me:$LINENO: checking size of time_t" >&5
9984echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9985if test "${ac_cv_sizeof_time_t+set}" = set; then
9986 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009987else
9988 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009989 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009990else
Martin v. Löwis11437992002-04-12 09:54:03 +00009991 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009992/* confdefs.h. */
9993_ACEOF
9994cat confdefs.h >>conftest.$ac_ext
9995cat >>conftest.$ac_ext <<_ACEOF
9996/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009997#include <stdio.h>
9998#include <time.h>
9999main()
10000{
10001 FILE *f=fopen("conftestval", "w");
10002 if (!f) exit(1);
10003 fprintf(f, "%d\n", sizeof(time_t));
10004 exit(0);
10005}
Martin v. Löwis11437992002-04-12 09:54:03 +000010006_ACEOF
10007rm -f conftest$ac_exeext
10008if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10009 (eval $ac_link) 2>&5
10010 ac_status=$?
10011 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10012 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10014 (eval $ac_try) 2>&5
10015 ac_status=$?
10016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10017 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010018 ac_cv_sizeof_time_t=`cat conftestval`
10019else
Martin v. Löwis11437992002-04-12 09:54:03 +000010020 echo "$as_me: program exited with status $ac_status" >&5
10021echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010022sed 's/^/| /' conftest.$ac_ext >&5
10023
Martin v. Löwis11437992002-04-12 09:54:03 +000010024( exit $ac_status )
10025ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010026fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010027rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010028fi
10029
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010030fi
10031
Martin v. Löwis11437992002-04-12 09:54:03 +000010032echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
10033echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
10034
10035cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010036#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010037_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010038
Michael W. Hudson54241132001-12-07 15:38:26 +000010039
10040
Trent Mick635f6fb2000-08-23 21:33:05 +000010041# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010042ac_save_cc="$CC"
10043if test "$ac_cv_kpthread" = "yes"
10044then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010045elif test "$ac_cv_kthread" = "yes"
10046then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010047elif test "$ac_cv_pthread" = "yes"
10048then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010049fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010050echo "$as_me:$LINENO: checking for pthread_t" >&5
10051echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010052have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010053cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010054/* confdefs.h. */
10055_ACEOF
10056cat confdefs.h >>conftest.$ac_ext
10057cat >>conftest.$ac_ext <<_ACEOF
10058/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010059#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010060int
10061main ()
10062{
Guido van Rossum12580492000-09-24 16:47:19 +000010063pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010064 ;
10065 return 0;
10066}
10067_ACEOF
10068rm -f conftest.$ac_objext
10069if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010070 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010071 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010072 grep -v '^ *+' conftest.er1 >conftest.err
10073 rm -f conftest.er1
10074 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10076 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010077 { ac_try='test -z "$ac_c_werror_flag"
10078 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010079 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10080 (eval $ac_try) 2>&5
10081 ac_status=$?
10082 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10083 (exit $ac_status); }; } &&
10084 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010085 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10086 (eval $ac_try) 2>&5
10087 ac_status=$?
10088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10089 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010090 have_pthread_t=yes
10091else
Martin v. Löwis11437992002-04-12 09:54:03 +000010092 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010093sed 's/^/| /' conftest.$ac_ext >&5
10094
Trent Mick635f6fb2000-08-23 21:33:05 +000010095fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010096rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010097echo "$as_me:$LINENO: result: $have_pthread_t" >&5
10098echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010099if test "$have_pthread_t" = yes ; then
10100 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010101 echo "$as_me:$LINENO: checking size of pthread_t" >&5
10102echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
10103 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
10104 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010105else
10106 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010107 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000010108else
Martin v. Löwis11437992002-04-12 09:54:03 +000010109 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010110/* confdefs.h. */
10111_ACEOF
10112cat confdefs.h >>conftest.$ac_ext
10113cat >>conftest.$ac_ext <<_ACEOF
10114/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010115#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010116#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000010117 main()
10118 {
10119 FILE *f=fopen("conftestval", "w");
10120 if (!f) exit(1);
10121 fprintf(f, "%d\n", sizeof(pthread_t));
10122 exit(0);
10123 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010124_ACEOF
10125rm -f conftest$ac_exeext
10126if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10127 (eval $ac_link) 2>&5
10128 ac_status=$?
10129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10130 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10132 (eval $ac_try) 2>&5
10133 ac_status=$?
10134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10135 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010136 ac_cv_sizeof_pthread_t=`cat conftestval`
10137else
Martin v. Löwis11437992002-04-12 09:54:03 +000010138 echo "$as_me: program exited with status $ac_status" >&5
10139echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010140sed 's/^/| /' conftest.$ac_ext >&5
10141
Martin v. Löwis11437992002-04-12 09:54:03 +000010142( exit $ac_status )
10143ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000010144fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010145rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +000010146fi
10147
Trent Mick635f6fb2000-08-23 21:33:05 +000010148fi
10149
Martin v. Löwis11437992002-04-12 09:54:03 +000010150 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
10151echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
10152
10153cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010154#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010155_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010156
10157fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010158CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000010159
Martin v. Löwis11437992002-04-12 09:54:03 +000010160echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
10161echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010162# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
10163if test "${enable_toolbox_glue+set}" = set; then
10164 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +000010165
Martin v. Löwis11437992002-04-12 09:54:03 +000010166fi;
Jack Jansene578a632001-08-15 01:27:14 +000010167
10168if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000010169then
Jack Jansene578a632001-08-15 01:27:14 +000010170 case $ac_sys_system/$ac_sys_release in
10171 Darwin/*)
10172 enable_toolbox_glue="yes";;
10173 *)
10174 enable_toolbox_glue="no";;
10175 esac
10176fi
10177case "$enable_toolbox_glue" in
10178yes)
Jack Jansene578a632001-08-15 01:27:14 +000010179 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010180 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000010181
10182cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010183#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010184_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010185
10186 ;;
10187*)
Jack Jansene578a632001-08-15 01:27:14 +000010188 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000010189 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000010190 ;;
10191esac
Martin v. Löwis11437992002-04-12 09:54:03 +000010192echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
10193echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000010194
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010195
10196case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +000010197 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +000010198 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansenb36687a2004-07-16 08:43:47 +000010199 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010200 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000010201 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +000010202 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010203 LIBTOOL_CRUFT="$LIBTOOL_CRUFT"
Jack Jansenb36687a2004-07-16 08:43:47 +000010204 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010205 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010206esac
10207
Martin v. Löwis11437992002-04-12 09:54:03 +000010208echo "$as_me:$LINENO: checking for --enable-framework" >&5
10209echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010210if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010211then
Skip Montanarodecc6a42003-01-01 20:07:49 +000010212 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000010213 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000010214 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010215
Martin v. Löwis11437992002-04-12 09:54:03 +000010216cat >>confdefs.h <<\_ACEOF
10217#define WITH_NEXT_FRAMEWORK 1
10218_ACEOF
10219
10220 echo "$as_me:$LINENO: result: yes" >&5
10221echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010222else
Martin v. Löwis11437992002-04-12 09:54:03 +000010223 echo "$as_me:$LINENO: result: no" >&5
10224echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010225fi
10226
Martin v. Löwis11437992002-04-12 09:54:03 +000010227echo "$as_me:$LINENO: checking for dyld" >&5
10228echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010229case $ac_sys_system/$ac_sys_release in
10230 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010231
Martin v. Löwis11437992002-04-12 09:54:03 +000010232cat >>confdefs.h <<\_ACEOF
10233#define WITH_DYLD 1
10234_ACEOF
10235
10236 echo "$as_me:$LINENO: result: always on for Darwin" >&5
10237echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010238 ;;
10239 *)
Martin v. Löwis11437992002-04-12 09:54:03 +000010240 echo "$as_me:$LINENO: result: no" >&5
10241echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010242 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010243esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010244
Guido van Rossum0a516c91994-09-12 10:58:40 +000010245# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010246
Michael W. Hudson54241132001-12-07 15:38:26 +000010247
10248
10249
10250
Guido van Rossum0a516c91994-09-12 10:58:40 +000010251# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000010252# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +000010253echo "$as_me:$LINENO: checking SO" >&5
10254echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010255if test -z "$SO"
10256then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010257 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +000010258 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010259 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000010260 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010261 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000010262else
10263 # this might also be a termcap variable, see #610332
10264 echo
10265 echo '====================================================================='
10266 echo '+ +'
10267 echo '+ WARNING: You have set SO in your environment. +'
10268 echo '+ Do you really mean to change the extension for shared libraries? +'
10269 echo '+ Continuing in 10 seconds to let you to ponder. +'
10270 echo '+ +'
10271 echo '====================================================================='
10272 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000010273fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010274echo "$as_me:$LINENO: result: $SO" >&5
10275echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010276# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000010277# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010278# (Shared libraries in this instance are shared modules to be loaded into
10279# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +000010280echo "$as_me:$LINENO: checking LDSHARED" >&5
10281echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010282if test -z "$LDSHARED"
10283then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010284 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010285 AIX*)
10286 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000010287 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010288 ;;
10289 BeOS*)
10290 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000010291 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010292 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000010293 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000010294 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010295 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000010296 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000010297 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000010298 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000010299 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010300 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000010301 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000010302 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000010303 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10304 if test "$enable_framework" ; then
10305 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010306 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10307 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010308 else
10309 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010310 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010311 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010312 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000010313 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10314 if test "$enable_framework" ; then
10315 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010316 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10317 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010318 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010319 # No framework, use the Python app as bundle-loader
10320 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010321 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010322 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010323 Darwin/*)
10324 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
10325 # This allows an extension to be used in any Python
Jack Jansenbe954622004-12-26 23:07:48 +000010326 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
Jack Jansenc110f862005-01-07 10:49:32 +000010327 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
Jack Jansenbe954622004-12-26 23:07:48 +000010328 if test ${MACOSX_DEPLOYMENT_TARGET-${cur_target}} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000010329 then
10330 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
10331 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000010332 else
10333 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10334 if test "$enable_framework" ; then
10335 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000010336 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
10337 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000010338 else
10339 # No framework, use the Python app as bundle-loader
10340 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
10341 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
10342 fi
10343 fi
10344 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000010345 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000010346 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010347 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010348 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010349 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000010350 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000010351 else
10352 LDSHARED="ld -Bshareable ${LDFLAGS}"
10353 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010354 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010355 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010356 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010357 then LDSHARED='$(CC) -shared'
10358 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000010359 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010360 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000010361 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010362 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010363 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010364 *) LDSHARED="ld";;
10365 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010366fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010367echo "$as_me:$LINENO: result: $LDSHARED" >&5
10368echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010369BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000010370# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010371# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010372echo "$as_me:$LINENO: checking CCSHARED" >&5
10373echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010374if test -z "$CCSHARED"
10375then
Guido van Rossum07397971997-04-29 21:49:50 +000010376 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010377 SunOS*) if test "$GCC" = yes;
10378 then CCSHARED="-fPIC";
10379 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000010380 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000010381 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000010382 else CCSHARED="+z";
10383 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010384 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010385 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +000010386 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010387 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010388 if test "$GCC" = "yes"
10389 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010390 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000010391 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010392 SCO_SV*)
10393 if test "$GCC" = "yes"
10394 then CCSHARED="-fPIC"
10395 else CCSHARED="-Kpic -belf"
10396 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000010397 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010398 IRIX*/6*) case $CC in
10399 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000010400 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010401 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010402 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010403 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010404fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010405echo "$as_me:$LINENO: result: $CCSHARED" >&5
10406echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010407# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010408# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010409echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
10410echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010411if test -z "$LINKFORSHARED"
10412then
Guido van Rossum07397971997-04-29 21:49:50 +000010413 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010414 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000010415 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000010416 LINKFORSHARED="-Wl,-E -Wl,+s";;
10417# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010418 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010419 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010420 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000010421 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010422 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
10423 # which is
Jack Jansene578a632001-08-15 01:27:14 +000010424 # not used by the core itself but which needs to be in the core so
10425 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000010426 # -prebind is no longer used, because it actually seems to give a
10427 # slowdown in stead of a speedup, maybe due to the large number of
10428 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010429
10430 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000010431 if test "$enable_framework"
10432 then
Jack Jansenda49e192005-01-07 13:08:22 +000010433 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010434 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000010435 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010436 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010437 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000010438 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010439 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +000010440 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10441 then
10442 LINKFORSHARED="-Wl,--export-dynamic"
10443 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010444 SunOS/5*) case $CC in
10445 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000010446 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000010447 then
10448 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010449 fi;;
10450 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000010451 CYGWIN*)
10452 if test $enable_shared = "no"
10453 then
10454 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
10455 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010456 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010457fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010458echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
10459echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010460
Michael W. Hudson54241132001-12-07 15:38:26 +000010461
Martin v. Löwis11437992002-04-12 09:54:03 +000010462echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
10463echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010464if test ! "$LIBRARY" = "$LDLIBRARY"
10465then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000010466 case $ac_sys_system in
10467 CYGWIN*)
10468 # Cygwin needs CCSHARED when building extension DLLs
10469 # but not when building the interpreter DLL.
10470 CFLAGSFORSHARED='';;
10471 *)
10472 CFLAGSFORSHARED='$(CCSHARED)'
10473 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010474fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010475echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
10476echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010477
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010478# SHLIBS are libraries (except -lc and -lm) to link to the python shared
10479# library (with --enable-shared).
10480# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010481# symbols, this must be set to $(LIBS) (expanded by make). We do this even
10482# if it is not required, since it creates a dependency of the shared library
10483# to LIBS. This, in turn, means that applications linking the shared libpython
10484# don't need to link LIBS explicitly. The default should be only changed
10485# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010486
10487echo "$as_me:$LINENO: checking SHLIBS" >&5
10488echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
10489case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010490 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010491 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010492esac
10493echo "$as_me:$LINENO: result: $SHLIBS" >&5
10494echo "${ECHO_T}$SHLIBS" >&6
10495
10496
Guido van Rossum627b2d71993-12-24 10:39:16 +000010497# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000010498
10499echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10500echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10501if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10502 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010503else
Martin v. Löwis11437992002-04-12 09:54:03 +000010504 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010505LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010506cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010507/* confdefs.h. */
10508_ACEOF
10509cat confdefs.h >>conftest.$ac_ext
10510cat >>conftest.$ac_ext <<_ACEOF
10511/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010512
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010513/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010514#ifdef __cplusplus
10515extern "C"
10516#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010517/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010518 builtin and then its argument prototype would still apply. */
10519char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010520int
10521main ()
10522{
10523dlopen ();
10524 ;
10525 return 0;
10526}
10527_ACEOF
10528rm -f conftest.$ac_objext conftest$ac_exeext
10529if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010530 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010532 grep -v '^ *+' conftest.er1 >conftest.err
10533 rm -f conftest.er1
10534 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10536 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010537 { ac_try='test -z "$ac_c_werror_flag"
10538 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10540 (eval $ac_try) 2>&5
10541 ac_status=$?
10542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10543 (exit $ac_status); }; } &&
10544 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10546 (eval $ac_try) 2>&5
10547 ac_status=$?
10548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10549 (exit $ac_status); }; }; then
10550 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010551else
Martin v. Löwis11437992002-04-12 09:54:03 +000010552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010553sed 's/^/| /' conftest.$ac_ext >&5
10554
Martin v. Löwis11437992002-04-12 09:54:03 +000010555ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010556fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010557rm -f conftest.err conftest.$ac_objext \
10558 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010559LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010560fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010561echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10562echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10563if test $ac_cv_lib_dl_dlopen = yes; then
10564 cat >>confdefs.h <<_ACEOF
10565#define HAVE_LIBDL 1
10566_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010567
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010568 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000010569
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010570fi
10571 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000010572
10573echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
10574echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
10575if test "${ac_cv_lib_dld_shl_load+set}" = set; then
10576 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010577else
Martin v. Löwis11437992002-04-12 09:54:03 +000010578 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010579LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010580cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010581/* confdefs.h. */
10582_ACEOF
10583cat confdefs.h >>conftest.$ac_ext
10584cat >>conftest.$ac_ext <<_ACEOF
10585/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010586
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010587/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010588#ifdef __cplusplus
10589extern "C"
10590#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010591/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010592 builtin and then its argument prototype would still apply. */
10593char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010594int
10595main ()
10596{
10597shl_load ();
10598 ;
10599 return 0;
10600}
10601_ACEOF
10602rm -f conftest.$ac_objext conftest$ac_exeext
10603if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010604 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010605 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010606 grep -v '^ *+' conftest.er1 >conftest.err
10607 rm -f conftest.er1
10608 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10610 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010611 { ac_try='test -z "$ac_c_werror_flag"
10612 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10614 (eval $ac_try) 2>&5
10615 ac_status=$?
10616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10617 (exit $ac_status); }; } &&
10618 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10620 (eval $ac_try) 2>&5
10621 ac_status=$?
10622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10623 (exit $ac_status); }; }; then
10624 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010625else
Martin v. Löwis11437992002-04-12 09:54:03 +000010626 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010627sed 's/^/| /' conftest.$ac_ext >&5
10628
Martin v. Löwis11437992002-04-12 09:54:03 +000010629ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010630fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010631rm -f conftest.err conftest.$ac_objext \
10632 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010633LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010634fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010635echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
10636echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
10637if test $ac_cv_lib_dld_shl_load = yes; then
10638 cat >>confdefs.h <<_ACEOF
10639#define HAVE_LIBDLD 1
10640_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010641
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010642 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010643
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010644fi
10645 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000010646
10647# only check for sem_ini if thread support is requested
10648if test "$with_threads" = "yes" -o -z "$with_threads"; then
10649 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010650echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
10651if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010652 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010653else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010654 ac_func_search_save_LIBS=$LIBS
10655ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010656cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010657/* confdefs.h. */
10658_ACEOF
10659cat confdefs.h >>conftest.$ac_ext
10660cat >>conftest.$ac_ext <<_ACEOF
10661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010662
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010663/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010664#ifdef __cplusplus
10665extern "C"
10666#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010667/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010668 builtin and then its argument prototype would still apply. */
10669char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010670int
10671main ()
10672{
10673sem_init ();
10674 ;
10675 return 0;
10676}
10677_ACEOF
10678rm -f conftest.$ac_objext conftest$ac_exeext
10679if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010680 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010682 grep -v '^ *+' conftest.er1 >conftest.err
10683 rm -f conftest.er1
10684 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10686 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010687 { ac_try='test -z "$ac_c_werror_flag"
10688 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10690 (eval $ac_try) 2>&5
10691 ac_status=$?
10692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10693 (exit $ac_status); }; } &&
10694 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010695 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10696 (eval $ac_try) 2>&5
10697 ac_status=$?
10698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10699 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010700 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010701else
Martin v. Löwis11437992002-04-12 09:54:03 +000010702 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010703sed 's/^/| /' conftest.$ac_ext >&5
10704
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010705fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010706rm -f conftest.err conftest.$ac_objext \
10707 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010708if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010709 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010710 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10711 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010712/* confdefs.h. */
10713_ACEOF
10714cat confdefs.h >>conftest.$ac_ext
10715cat >>conftest.$ac_ext <<_ACEOF
10716/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010717
10718/* Override any gcc2 internal prototype to avoid an error. */
10719#ifdef __cplusplus
10720extern "C"
10721#endif
10722/* We use char because int might match the return type of a gcc2
10723 builtin and then its argument prototype would still apply. */
10724char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010725int
10726main ()
10727{
10728sem_init ();
10729 ;
10730 return 0;
10731}
Martin v. Löwis11437992002-04-12 09:54:03 +000010732_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010733rm -f conftest.$ac_objext conftest$ac_exeext
10734if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010735 (eval $ac_link) 2>conftest.er1
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010737 grep -v '^ *+' conftest.er1 >conftest.err
10738 rm -f conftest.er1
10739 cat conftest.err >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10741 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010742 { ac_try='test -z "$ac_c_werror_flag"
10743 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10745 (eval $ac_try) 2>&5
10746 ac_status=$?
10747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10748 (exit $ac_status); }; } &&
10749 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010750 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10751 (eval $ac_try) 2>&5
10752 ac_status=$?
10753 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10754 (exit $ac_status); }; }; then
10755 ac_cv_search_sem_init="-l$ac_lib"
10756break
10757else
10758 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010759sed 's/^/| /' conftest.$ac_ext >&5
10760
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010761fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010762rm -f conftest.err conftest.$ac_objext \
10763 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010764 done
10765fi
10766LIBS=$ac_func_search_save_LIBS
10767fi
10768echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
10769echo "${ECHO_T}$ac_cv_search_sem_init" >&6
10770if test "$ac_cv_search_sem_init" != no; then
10771 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010772
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010773fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010774 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000010775 # posix4 on Solaris 2.6
10776 # pthread (first!) on Linux
10777fi
10778
Martin v. Löwis19d17342003-06-14 21:03:05 +000010779# check if we need libintl for locale functions
10780echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
10781echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
10782if test "${ac_cv_lib_intl_textdomain+set}" = set; then
10783 echo $ECHO_N "(cached) $ECHO_C" >&6
10784else
10785 ac_check_lib_save_LIBS=$LIBS
10786LIBS="-lintl $LIBS"
10787cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010788/* confdefs.h. */
10789_ACEOF
10790cat confdefs.h >>conftest.$ac_ext
10791cat >>conftest.$ac_ext <<_ACEOF
10792/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010793
10794/* Override any gcc2 internal prototype to avoid an error. */
10795#ifdef __cplusplus
10796extern "C"
10797#endif
10798/* We use char because int might match the return type of a gcc2
10799 builtin and then its argument prototype would still apply. */
10800char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010801int
10802main ()
10803{
10804textdomain ();
10805 ;
10806 return 0;
10807}
10808_ACEOF
10809rm -f conftest.$ac_objext conftest$ac_exeext
10810if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010811 (eval $ac_link) 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000010812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010813 grep -v '^ *+' conftest.er1 >conftest.err
10814 rm -f conftest.er1
10815 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000010816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10817 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010818 { ac_try='test -z "$ac_c_werror_flag"
10819 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10821 (eval $ac_try) 2>&5
10822 ac_status=$?
10823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10824 (exit $ac_status); }; } &&
10825 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis19d17342003-06-14 21:03:05 +000010826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10827 (eval $ac_try) 2>&5
10828 ac_status=$?
10829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10830 (exit $ac_status); }; }; then
10831 ac_cv_lib_intl_textdomain=yes
10832else
10833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010834sed 's/^/| /' conftest.$ac_ext >&5
10835
Martin v. Löwis19d17342003-06-14 21:03:05 +000010836ac_cv_lib_intl_textdomain=no
10837fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010838rm -f conftest.err conftest.$ac_objext \
10839 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010840LIBS=$ac_check_lib_save_LIBS
10841fi
10842echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
10843echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
10844if test $ac_cv_lib_intl_textdomain = yes; then
10845
10846cat >>confdefs.h <<\_ACEOF
10847#define WITH_LIBINTL 1
10848_ACEOF
10849
10850fi
10851
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010852
10853# checks for system dependent C++ extensions support
10854case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000010855 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
10856echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
10857 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010858/* confdefs.h. */
10859_ACEOF
10860cat confdefs.h >>conftest.$ac_ext
10861cat >>conftest.$ac_ext <<_ACEOF
10862/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010863#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010864int
10865main ()
10866{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010867loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010868 ;
10869 return 0;
10870}
10871_ACEOF
10872rm -f conftest.$ac_objext conftest$ac_exeext
10873if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010874 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010876 grep -v '^ *+' conftest.er1 >conftest.err
10877 rm -f conftest.er1
10878 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010879 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10880 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010881 { ac_try='test -z "$ac_c_werror_flag"
10882 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10884 (eval $ac_try) 2>&5
10885 ac_status=$?
10886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10887 (exit $ac_status); }; } &&
10888 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10890 (eval $ac_try) 2>&5
10891 ac_status=$?
10892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10893 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010894
Martin v. Löwis11437992002-04-12 09:54:03 +000010895cat >>confdefs.h <<\_ACEOF
10896#define AIX_GENUINE_CPLUSPLUS 1
10897_ACEOF
10898
10899 echo "$as_me:$LINENO: result: yes" >&5
10900echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010901else
Martin v. Löwis11437992002-04-12 09:54:03 +000010902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010903sed 's/^/| /' conftest.$ac_ext >&5
10904
Martin v. Löwis11437992002-04-12 09:54:03 +000010905echo "$as_me:$LINENO: result: no" >&5
10906echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010907fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010908rm -f conftest.err conftest.$ac_objext \
10909 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010910 *) ;;
10911esac
10912
Guido van Rossum70c7f481998-03-26 18:44:10 +000010913# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010914# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +000010915echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
10916echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
10917if test "${ac_cv_lib_nsl_t_open+set}" = set; then
10918 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010919else
Martin v. Löwis11437992002-04-12 09:54:03 +000010920 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010921LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010922cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010923/* confdefs.h. */
10924_ACEOF
10925cat confdefs.h >>conftest.$ac_ext
10926cat >>conftest.$ac_ext <<_ACEOF
10927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010928
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010929/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010930#ifdef __cplusplus
10931extern "C"
10932#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010933/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010934 builtin and then its argument prototype would still apply. */
10935char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010936int
10937main ()
10938{
10939t_open ();
10940 ;
10941 return 0;
10942}
10943_ACEOF
10944rm -f conftest.$ac_objext conftest$ac_exeext
10945if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010946 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010947 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010948 grep -v '^ *+' conftest.er1 >conftest.err
10949 rm -f conftest.er1
10950 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10952 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000010953 { ac_try='test -z "$ac_c_werror_flag"
10954 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10956 (eval $ac_try) 2>&5
10957 ac_status=$?
10958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10959 (exit $ac_status); }; } &&
10960 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010961 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10962 (eval $ac_try) 2>&5
10963 ac_status=$?
10964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10965 (exit $ac_status); }; }; then
10966 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010967else
Martin v. Löwis11437992002-04-12 09:54:03 +000010968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010969sed 's/^/| /' conftest.$ac_ext >&5
10970
Martin v. Löwis11437992002-04-12 09:54:03 +000010971ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010972fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010973rm -f conftest.err conftest.$ac_objext \
10974 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010975LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010976fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010977echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
10978echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
10979if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010980 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010981fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010982 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000010983echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10984echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10985if test "${ac_cv_lib_socket_socket+set}" = set; then
10986 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010987else
Martin v. Löwis11437992002-04-12 09:54:03 +000010988 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010989LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010990cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010991/* confdefs.h. */
10992_ACEOF
10993cat confdefs.h >>conftest.$ac_ext
10994cat >>conftest.$ac_ext <<_ACEOF
10995/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010996
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010997/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010998#ifdef __cplusplus
10999extern "C"
11000#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011001/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 builtin and then its argument prototype would still apply. */
11003char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011004int
11005main ()
11006{
11007socket ();
11008 ;
11009 return 0;
11010}
11011_ACEOF
11012rm -f conftest.$ac_objext conftest$ac_exeext
11013if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011014 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011016 grep -v '^ *+' conftest.er1 >conftest.err
11017 rm -f conftest.er1
11018 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11020 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011021 { ac_try='test -z "$ac_c_werror_flag"
11022 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11024 (eval $ac_try) 2>&5
11025 ac_status=$?
11026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11027 (exit $ac_status); }; } &&
11028 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011029 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11030 (eval $ac_try) 2>&5
11031 ac_status=$?
11032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11033 (exit $ac_status); }; }; then
11034 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011035else
Martin v. Löwis11437992002-04-12 09:54:03 +000011036 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011037sed 's/^/| /' conftest.$ac_ext >&5
11038
Martin v. Löwis11437992002-04-12 09:54:03 +000011039ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011040fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011041rm -f conftest.err conftest.$ac_objext \
11042 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011043LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011044fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011045echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
11046echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
11047if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000011048 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000011049fi
11050 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000011051
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000011052case "$ac_sys_system" in
11053BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000011054echo "$as_me:$LINENO: checking for socket in -lnet" >&5
11055echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
11056if test "${ac_cv_lib_net_socket+set}" = set; then
11057 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011058else
Martin v. Löwis11437992002-04-12 09:54:03 +000011059 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011060LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011061cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011062/* confdefs.h. */
11063_ACEOF
11064cat confdefs.h >>conftest.$ac_ext
11065cat >>conftest.$ac_ext <<_ACEOF
11066/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011067
Guido van Rossumad678af1998-10-02 14:42:15 +000011068/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011069#ifdef __cplusplus
11070extern "C"
11071#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011072/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011073 builtin and then its argument prototype would still apply. */
11074char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011075int
11076main ()
11077{
11078socket ();
11079 ;
11080 return 0;
11081}
11082_ACEOF
11083rm -f conftest.$ac_objext conftest$ac_exeext
11084if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011085 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011087 grep -v '^ *+' conftest.er1 >conftest.err
11088 rm -f conftest.er1
11089 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11091 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011092 { ac_try='test -z "$ac_c_werror_flag"
11093 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11095 (eval $ac_try) 2>&5
11096 ac_status=$?
11097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11098 (exit $ac_status); }; } &&
11099 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011100 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11101 (eval $ac_try) 2>&5
11102 ac_status=$?
11103 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11104 (exit $ac_status); }; }; then
11105 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011106else
Martin v. Löwis11437992002-04-12 09:54:03 +000011107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011108sed 's/^/| /' conftest.$ac_ext >&5
11109
Martin v. Löwis11437992002-04-12 09:54:03 +000011110ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011111fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011112rm -f conftest.err conftest.$ac_objext \
11113 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011114LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000011115fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011116echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
11117echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
11118if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011119 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011120fi
11121 # BeOS
11122;;
11123esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000011124
Martin v. Löwis11437992002-04-12 09:54:03 +000011125echo "$as_me:$LINENO: checking for --with-libs" >&5
11126echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
11127
Guido van Rossuma68acba1996-07-31 17:36:39 +000011128# Check whether --with-libs or --without-libs was given.
11129if test "${with_libs+set}" = set; then
11130 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000011131
11132echo "$as_me:$LINENO: result: $withval" >&5
11133echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000011134LIBS="$withval $LIBS"
11135
11136else
Martin v. Löwis11437992002-04-12 09:54:03 +000011137 echo "$as_me:$LINENO: result: no" >&5
11138echo "${ECHO_T}no" >&6
11139fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011140
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011141# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011142
11143
Martin v. Löwis11437992002-04-12 09:54:03 +000011144echo "$as_me:$LINENO: checking for --with-signal-module" >&5
11145echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
11146
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011147# Check whether --with-signal-module or --without-signal-module was given.
11148if test "${with_signal_module+set}" = set; then
11149 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011150
Martin v. Löwis11437992002-04-12 09:54:03 +000011151fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011152
11153if test -z "$with_signal_module"
11154then with_signal_module="yes"
11155fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011156echo "$as_me:$LINENO: result: $with_signal_module" >&5
11157echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011158
11159if test "${with_signal_module}" = "yes"; then
11160 USE_SIGNAL_MODULE=""
11161 SIGNAL_OBJS=""
11162else
11163 USE_SIGNAL_MODULE="#"
11164 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
11165fi
11166
Guido van Rossum3d15bd82001-01-10 18:53:48 +000011167# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000011168
Barry Warsawc0d24d82000-06-29 16:12:00 +000011169USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000011170
Martin v. Löwis11437992002-04-12 09:54:03 +000011171echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
11172echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
11173
Guido van Rossumec2f0731997-01-22 20:54:01 +000011174
11175# Check whether --with-dec-threads or --without-dec-threads was given.
11176if test "${with_dec_threads+set}" = set; then
11177 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000011178
11179echo "$as_me:$LINENO: result: $withval" >&5
11180echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000011181LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000011182if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000011183 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000011184fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000011185else
Martin v. Löwis11437992002-04-12 09:54:03 +000011186 echo "$as_me:$LINENO: result: no" >&5
11187echo "${ECHO_T}no" >&6
11188fi;
11189
11190# Templates for things AC_DEFINEd more than once.
11191# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000011192
11193
Martin v. Löwis11437992002-04-12 09:54:03 +000011194
11195
11196
11197
11198
11199echo "$as_me:$LINENO: checking for --with-threads" >&5
11200echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
11201
Guido van Rossumec2f0731997-01-22 20:54:01 +000011202# Check whether --with-threads or --without-threads was given.
11203if test "${with_threads+set}" = set; then
11204 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000011205
Martin v. Löwis11437992002-04-12 09:54:03 +000011206fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000011207
Barry Warsawc0d24d82000-06-29 16:12:00 +000011208# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000011209
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011210# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011211if test "${with_thread+set}" = set; then
11212 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011213 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000011214fi;
Barry Warsawc0d24d82000-06-29 16:12:00 +000011215
11216if test -z "$with_threads"
11217then with_threads="yes"
11218fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011219echo "$as_me:$LINENO: result: $with_threads" >&5
11220echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d82000-06-29 16:12:00 +000011221
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011222
Barry Warsawc0d24d82000-06-29 16:12:00 +000011223if test "$with_threads" = "no"
11224then
11225 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011226elif test "$ac_cv_pthread_is_default" = yes
11227then
Martin v. Löwis11437992002-04-12 09:54:03 +000011228 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011229#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011230_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011231
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011232 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000011233 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011234#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011235_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011236
11237 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000011238 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011239elif test "$ac_cv_kpthread" = "yes"
11240then
11241 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011242 if test "$ac_cv_cxx_thread" = "yes"; then
11243 CXX="$CXX -Kpthread"
11244 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011245 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011246#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011247_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011248
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011249 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011250 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011251elif test "$ac_cv_kthread" = "yes"
11252then
11253 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011254 if test "$ac_cv_cxx_thread" = "yes"; then
11255 CXX="$CXX -Kthread"
11256 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011257 cat >>confdefs.h <<\_ACEOF
11258#define WITH_THREAD 1
11259_ACEOF
11260
11261 posix_threads=yes
11262 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011263elif test "$ac_cv_pthread" = "yes"
11264then
11265 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011266 if test "$ac_cv_cxx_thread" = "yes"; then
11267 CXX="$CXX -pthread"
11268 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011269 cat >>confdefs.h <<\_ACEOF
11270#define WITH_THREAD 1
11271_ACEOF
11272
11273 posix_threads=yes
11274 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011275else
11276 if test ! -z "$with_threads" -a -d "$with_threads"
11277 then LDFLAGS="$LDFLAGS -L$with_threads"
11278 fi
11279 if test ! -z "$withval" -a -d "$withval"
11280 then LDFLAGS="$LDFLAGS -L$withval"
11281 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011282
11283 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000011284 # define _POSIX_THREADS in unistd.h. Some apparently don't
11285 # (e.g. gnu pth with pthread emulation)
Martin v. Löwis11437992002-04-12 09:54:03 +000011286 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
11287echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
11288 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011289/* confdefs.h. */
11290_ACEOF
11291cat confdefs.h >>conftest.$ac_ext
11292cat >>conftest.$ac_ext <<_ACEOF
11293/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011294
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011295#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011296#ifdef _POSIX_THREADS
11297yes
11298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011299
11300_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011301if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011302 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011303 unistd_defines_pthreads=yes
11304else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011305 unistd_defines_pthreads=no
11306fi
11307rm -f conftest*
11308
Martin v. Löwis11437992002-04-12 09:54:03 +000011309 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
11310echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011311
Martin v. Löwis11437992002-04-12 09:54:03 +000011312 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011313#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011314_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011315
Martin v. Löwis11437992002-04-12 09:54:03 +000011316 if test "${ac_cv_header_cthreads_h+set}" = set; then
11317 echo "$as_me:$LINENO: checking for cthreads.h" >&5
11318echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11319if test "${ac_cv_header_cthreads_h+set}" = set; then
11320 echo $ECHO_N "(cached) $ECHO_C" >&6
11321fi
11322echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11323echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011324else
Martin v. Löwis11437992002-04-12 09:54:03 +000011325 # Is the header compilable?
11326echo "$as_me:$LINENO: checking cthreads.h usability" >&5
11327echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
11328cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011329/* confdefs.h. */
11330_ACEOF
11331cat confdefs.h >>conftest.$ac_ext
11332cat >>conftest.$ac_ext <<_ACEOF
11333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011334$ac_includes_default
11335#include <cthreads.h>
11336_ACEOF
11337rm -f conftest.$ac_objext
11338if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011339 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011341 grep -v '^ *+' conftest.er1 >conftest.err
11342 rm -f conftest.er1
11343 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11345 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011346 { ac_try='test -z "$ac_c_werror_flag"
11347 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011348 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11349 (eval $ac_try) 2>&5
11350 ac_status=$?
11351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11352 (exit $ac_status); }; } &&
11353 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011354 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11355 (eval $ac_try) 2>&5
11356 ac_status=$?
11357 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11358 (exit $ac_status); }; }; then
11359 ac_header_compiler=yes
11360else
11361 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011362sed 's/^/| /' conftest.$ac_ext >&5
11363
Martin v. Löwis11437992002-04-12 09:54:03 +000011364ac_header_compiler=no
11365fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011366rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011367echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11368echo "${ECHO_T}$ac_header_compiler" >&6
11369
11370# Is the header present?
11371echo "$as_me:$LINENO: checking cthreads.h presence" >&5
11372echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
11373cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011374/* confdefs.h. */
11375_ACEOF
11376cat confdefs.h >>conftest.$ac_ext
11377cat >>conftest.$ac_ext <<_ACEOF
11378/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011379#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011380_ACEOF
11381if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11382 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11383 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011384 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011385 rm -f conftest.er1
11386 cat conftest.err >&5
11387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11388 (exit $ac_status); } >/dev/null; then
11389 if test -s conftest.err; then
11390 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011391 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000011392 else
11393 ac_cpp_err=
11394 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011395else
Martin v. Löwis11437992002-04-12 09:54:03 +000011396 ac_cpp_err=yes
11397fi
11398if test -z "$ac_cpp_err"; then
11399 ac_header_preproc=yes
11400else
11401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011402sed 's/^/| /' conftest.$ac_ext >&5
11403
Martin v. Löwis11437992002-04-12 09:54:03 +000011404 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011405fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011406rm -f conftest.err conftest.$ac_ext
11407echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11408echo "${ECHO_T}$ac_header_preproc" >&6
11409
11410# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011411case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11412 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000011413 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11414echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011415 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
11416echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
11417 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011418 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011419 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011420 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
11421echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011422 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
11423echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
11424 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
11425echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
11426 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
11427echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011428 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
11429echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011430 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
11431echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011432 (
11433 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +000011434## --------------------------------- ##
11435## Report this to the python lists. ##
11436## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011437_ASBOX
11438 ) |
11439 sed "s/^/$as_me: WARNING: /" >&2
11440 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011441esac
11442echo "$as_me:$LINENO: checking for cthreads.h" >&5
11443echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11444if test "${ac_cv_header_cthreads_h+set}" = set; then
11445 echo $ECHO_N "(cached) $ECHO_C" >&6
11446else
11447 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011448fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011449echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11450echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
11451
11452fi
11453if test $ac_cv_header_cthreads_h = yes; then
11454 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011455#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011456_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011457
Martin v. Löwis11437992002-04-12 09:54:03 +000011458 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011459#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011460_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011461
Martin v. Löwis11437992002-04-12 09:54:03 +000011462
11463cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011464#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011465_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011466
11467 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011468 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011469else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011470
Martin v. Löwis11437992002-04-12 09:54:03 +000011471 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11472 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11473echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11474if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11475 echo $ECHO_N "(cached) $ECHO_C" >&6
11476fi
11477echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11478echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011479else
Martin v. Löwis11437992002-04-12 09:54:03 +000011480 # Is the header compilable?
11481echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
11482echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
11483cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011484/* confdefs.h. */
11485_ACEOF
11486cat confdefs.h >>conftest.$ac_ext
11487cat >>conftest.$ac_ext <<_ACEOF
11488/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011489$ac_includes_default
11490#include <mach/cthreads.h>
11491_ACEOF
11492rm -f conftest.$ac_objext
11493if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011494 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011495 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011496 grep -v '^ *+' conftest.er1 >conftest.err
11497 rm -f conftest.er1
11498 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11500 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011501 { ac_try='test -z "$ac_c_werror_flag"
11502 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011503 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11504 (eval $ac_try) 2>&5
11505 ac_status=$?
11506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11507 (exit $ac_status); }; } &&
11508 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011509 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11510 (eval $ac_try) 2>&5
11511 ac_status=$?
11512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11513 (exit $ac_status); }; }; then
11514 ac_header_compiler=yes
11515else
11516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011517sed 's/^/| /' conftest.$ac_ext >&5
11518
Martin v. Löwis11437992002-04-12 09:54:03 +000011519ac_header_compiler=no
11520fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011521rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011522echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11523echo "${ECHO_T}$ac_header_compiler" >&6
11524
11525# Is the header present?
11526echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
11527echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
11528cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011529/* confdefs.h. */
11530_ACEOF
11531cat confdefs.h >>conftest.$ac_ext
11532cat >>conftest.$ac_ext <<_ACEOF
11533/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011534#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011535_ACEOF
11536if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11537 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11538 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011539 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011540 rm -f conftest.er1
11541 cat conftest.err >&5
11542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11543 (exit $ac_status); } >/dev/null; then
11544 if test -s conftest.err; then
11545 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011546 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000011547 else
11548 ac_cpp_err=
11549 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011550else
Martin v. Löwis11437992002-04-12 09:54:03 +000011551 ac_cpp_err=yes
11552fi
11553if test -z "$ac_cpp_err"; then
11554 ac_header_preproc=yes
11555else
11556 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011557sed 's/^/| /' conftest.$ac_ext >&5
11558
Martin v. Löwis11437992002-04-12 09:54:03 +000011559 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011560fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011561rm -f conftest.err conftest.$ac_ext
11562echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11563echo "${ECHO_T}$ac_header_preproc" >&6
11564
11565# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011566case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11567 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000011568 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11569echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011570 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
11571echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
11572 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011573 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011574 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011575 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
11576echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011577 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
11578echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
11579 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
11580echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
11581 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
11582echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011583 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
11584echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011585 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
11586echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011587 (
11588 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +000011589## --------------------------------- ##
11590## Report this to the python lists. ##
11591## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011592_ASBOX
11593 ) |
11594 sed "s/^/$as_me: WARNING: /" >&2
11595 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011596esac
11597echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11598echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11599if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11600 echo $ECHO_N "(cached) $ECHO_C" >&6
11601else
11602 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011603fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011604echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11605echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
11606
11607fi
11608if test $ac_cv_header_mach_cthreads_h = yes; then
11609 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011610#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011611_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011612
Martin v. Löwis11437992002-04-12 09:54:03 +000011613 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011614#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011615_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011616
Martin v. Löwis11437992002-04-12 09:54:03 +000011617
11618cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011619#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011620_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011621
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011622 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011623else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011624
Martin v. Löwis11437992002-04-12 09:54:03 +000011625 echo "$as_me:$LINENO: checking for --with-pth" >&5
11626echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
11627
11628# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011629if test "${with_pth+set}" = set; then
11630 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011631 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011632echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011633 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000011634#define WITH_THREAD 1
11635_ACEOF
11636
11637
11638cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011639#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011640_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011641
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011642 LIBS="-lpth $LIBS"
11643 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011644else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011645 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011646echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011647
11648 # Just looking for pthread_create in libpthread is not enough:
11649 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
11650 # So we really have to include pthread.h, and then link.
11651 _libs=$LIBS
11652 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000011653 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
11654echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
11655 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011656/* confdefs.h. */
11657_ACEOF
11658cat confdefs.h >>conftest.$ac_ext
11659cat >>conftest.$ac_ext <<_ACEOF
11660/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011661#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000011662
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011663void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000011664int
11665main ()
11666{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011667
11668pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000011669 ;
11670 return 0;
11671}
11672_ACEOF
11673rm -f conftest.$ac_objext conftest$ac_exeext
11674if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011675 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011676 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011677 grep -v '^ *+' conftest.er1 >conftest.err
11678 rm -f conftest.er1
11679 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11681 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011682 { ac_try='test -z "$ac_c_werror_flag"
11683 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11685 (eval $ac_try) 2>&5
11686 ac_status=$?
11687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11688 (exit $ac_status); }; } &&
11689 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11691 (eval $ac_try) 2>&5
11692 ac_status=$?
11693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11694 (exit $ac_status); }; }; then
11695
11696 echo "$as_me:$LINENO: result: yes" >&5
11697echo "${ECHO_T}yes" >&6
11698 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011699#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011700_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011701
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011702 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011703 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000011704else
Martin v. Löwis11437992002-04-12 09:54:03 +000011705 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011706sed 's/^/| /' conftest.$ac_ext >&5
11707
Martin v. Löwis11437992002-04-12 09:54:03 +000011708
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011709 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000011710 echo "$as_me:$LINENO: checking for pthread_detach" >&5
11711echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
11712if test "${ac_cv_func_pthread_detach+set}" = set; then
11713 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011714else
Martin v. Löwis11437992002-04-12 09:54:03 +000011715 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011716/* confdefs.h. */
11717_ACEOF
11718cat confdefs.h >>conftest.$ac_ext
11719cat >>conftest.$ac_ext <<_ACEOF
11720/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000011721/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011722 which can conflict with char pthread_detach (); below.
11723 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011724 <limits.h> exists even on freestanding compilers. Under hpux,
11725 including <limits.h> includes <sys/time.h> and causes problems
11726 checking for functions defined therein. */
11727#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011728# include <limits.h>
11729#else
11730# include <assert.h>
11731#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011732/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011733#ifdef __cplusplus
11734extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011735{
Martin v. Löwis11437992002-04-12 09:54:03 +000011736#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011737/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011738 builtin and then its argument prototype would still apply. */
11739char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000011740/* The GNU C library defines this for functions which it implements
11741 to always fail with ENOSYS. Some functions are actually named
11742 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000011743#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000011744choke me
11745#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011746char (*f) () = pthread_detach;
11747#endif
11748#ifdef __cplusplus
11749}
Guido van Rossumad678af1998-10-02 14:42:15 +000011750#endif
11751
Skip Montanaro6dead952003-09-25 14:50:04 +000011752int
11753main ()
11754{
11755return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000011756 ;
11757 return 0;
11758}
11759_ACEOF
11760rm -f conftest.$ac_objext conftest$ac_exeext
11761if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011762 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011764 grep -v '^ *+' conftest.er1 >conftest.err
11765 rm -f conftest.er1
11766 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11768 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011769 { ac_try='test -z "$ac_c_werror_flag"
11770 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011771 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11772 (eval $ac_try) 2>&5
11773 ac_status=$?
11774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11775 (exit $ac_status); }; } &&
11776 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011777 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11778 (eval $ac_try) 2>&5
11779 ac_status=$?
11780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11781 (exit $ac_status); }; }; then
11782 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011783else
Martin v. Löwis11437992002-04-12 09:54:03 +000011784 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011785sed 's/^/| /' conftest.$ac_ext >&5
11786
Martin v. Löwis11437992002-04-12 09:54:03 +000011787ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011788fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011789rm -f conftest.err conftest.$ac_objext \
11790 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000011791fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011792echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
11793echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
11794if test $ac_cv_func_pthread_detach = yes; then
11795 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011796#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011797_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011798
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011799 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011800 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000011801else
Guido van Rossumad678af1998-10-02 14:42:15 +000011802
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011803 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11804 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11805echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11806if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11807 echo $ECHO_N "(cached) $ECHO_C" >&6
11808fi
11809echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11810echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11811else
11812 # Is the header compilable?
11813echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
11814echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
11815cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011816/* confdefs.h. */
11817_ACEOF
11818cat confdefs.h >>conftest.$ac_ext
11819cat >>conftest.$ac_ext <<_ACEOF
11820/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011821$ac_includes_default
11822#include <atheos/threads.h>
11823_ACEOF
11824rm -f conftest.$ac_objext
11825if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011826 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011828 grep -v '^ *+' conftest.er1 >conftest.err
11829 rm -f conftest.er1
11830 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11832 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011833 { ac_try='test -z "$ac_c_werror_flag"
11834 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11836 (eval $ac_try) 2>&5
11837 ac_status=$?
11838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11839 (exit $ac_status); }; } &&
11840 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11842 (eval $ac_try) 2>&5
11843 ac_status=$?
11844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11845 (exit $ac_status); }; }; then
11846 ac_header_compiler=yes
11847else
11848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011849sed 's/^/| /' conftest.$ac_ext >&5
11850
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011851ac_header_compiler=no
11852fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011853rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011854echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11855echo "${ECHO_T}$ac_header_compiler" >&6
11856
11857# Is the header present?
11858echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
11859echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
11860cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011861/* confdefs.h. */
11862_ACEOF
11863cat confdefs.h >>conftest.$ac_ext
11864cat >>conftest.$ac_ext <<_ACEOF
11865/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011866#include <atheos/threads.h>
11867_ACEOF
11868if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11869 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11870 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011871 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011872 rm -f conftest.er1
11873 cat conftest.err >&5
11874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11875 (exit $ac_status); } >/dev/null; then
11876 if test -s conftest.err; then
11877 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011878 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011879 else
11880 ac_cpp_err=
11881 fi
11882else
11883 ac_cpp_err=yes
11884fi
11885if test -z "$ac_cpp_err"; then
11886 ac_header_preproc=yes
11887else
11888 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011889sed 's/^/| /' conftest.$ac_ext >&5
11890
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011891 ac_header_preproc=no
11892fi
11893rm -f conftest.err conftest.$ac_ext
11894echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11895echo "${ECHO_T}$ac_header_preproc" >&6
11896
11897# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011898case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11899 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011900 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11901echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011902 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
11903echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
11904 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011905 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011906 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011907 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
11908echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011909 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
11910echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
11911 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
11912echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
11913 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
11914echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011915 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
11916echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011917 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
11918echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011919 (
11920 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +000011921## --------------------------------- ##
11922## Report this to the python lists. ##
11923## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011924_ASBOX
11925 ) |
11926 sed "s/^/$as_me: WARNING: /" >&2
11927 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011928esac
11929echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11930echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11931if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11932 echo $ECHO_N "(cached) $ECHO_C" >&6
11933else
11934 ac_cv_header_atheos_threads_h=$ac_header_preproc
11935fi
11936echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11937echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11938
11939fi
11940if test $ac_cv_header_atheos_threads_h = yes; then
11941 cat >>confdefs.h <<\_ACEOF
11942#define WITH_THREAD 1
11943_ACEOF
11944
11945
11946cat >>confdefs.h <<\_ACEOF
11947#define ATHEOS_THREADS 1
11948_ACEOF
11949
11950 THREADOBJ="Python/thread.o"
11951else
11952
Martin v. Löwis11437992002-04-12 09:54:03 +000011953 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11954 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11955echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11956if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11957 echo $ECHO_N "(cached) $ECHO_C" >&6
11958fi
11959echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11960echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011961else
Martin v. Löwis11437992002-04-12 09:54:03 +000011962 # Is the header compilable?
11963echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
11964echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
11965cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011966/* confdefs.h. */
11967_ACEOF
11968cat confdefs.h >>conftest.$ac_ext
11969cat >>conftest.$ac_ext <<_ACEOF
11970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011971$ac_includes_default
11972#include <kernel/OS.h>
11973_ACEOF
11974rm -f conftest.$ac_objext
11975if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011976 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011977 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011978 grep -v '^ *+' conftest.er1 >conftest.err
11979 rm -f conftest.er1
11980 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11982 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000011983 { ac_try='test -z "$ac_c_werror_flag"
11984 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011985 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11986 (eval $ac_try) 2>&5
11987 ac_status=$?
11988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11989 (exit $ac_status); }; } &&
11990 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11992 (eval $ac_try) 2>&5
11993 ac_status=$?
11994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11995 (exit $ac_status); }; }; then
11996 ac_header_compiler=yes
11997else
11998 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011999sed 's/^/| /' conftest.$ac_ext >&5
12000
Martin v. Löwis11437992002-04-12 09:54:03 +000012001ac_header_compiler=no
12002fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012003rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012004echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12005echo "${ECHO_T}$ac_header_compiler" >&6
12006
12007# Is the header present?
12008echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
12009echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
12010cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012011/* confdefs.h. */
12012_ACEOF
12013cat confdefs.h >>conftest.$ac_ext
12014cat >>conftest.$ac_ext <<_ACEOF
12015/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012016#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012017_ACEOF
12018if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
12019 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12020 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000012021 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000012022 rm -f conftest.er1
12023 cat conftest.err >&5
12024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12025 (exit $ac_status); } >/dev/null; then
12026 if test -s conftest.err; then
12027 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000012028 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000012029 else
12030 ac_cpp_err=
12031 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012032else
Martin v. Löwis11437992002-04-12 09:54:03 +000012033 ac_cpp_err=yes
12034fi
12035if test -z "$ac_cpp_err"; then
12036 ac_header_preproc=yes
12037else
12038 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012039sed 's/^/| /' conftest.$ac_ext >&5
12040
Martin v. Löwis11437992002-04-12 09:54:03 +000012041 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012042fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012043rm -f conftest.err conftest.$ac_ext
12044echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12045echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012046
Martin v. Löwis11437992002-04-12 09:54:03 +000012047# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012048case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12049 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000012050 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
12051echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012052 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
12053echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
12054 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012055 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000012056 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012057 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
12058echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012059 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
12060echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
12061 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
12062echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
12063 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
12064echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012065 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
12066echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000012067 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
12068echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012069 (
12070 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +000012071## --------------------------------- ##
12072## Report this to the python lists. ##
12073## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012074_ASBOX
12075 ) |
12076 sed "s/^/$as_me: WARNING: /" >&2
12077 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012078esac
12079echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12080echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12081if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12082 echo $ECHO_N "(cached) $ECHO_C" >&6
12083else
12084 ac_cv_header_kernel_OS_h=$ac_header_preproc
12085fi
12086echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12087echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
12088
12089fi
12090if test $ac_cv_header_kernel_OS_h = yes; then
12091 cat >>confdefs.h <<\_ACEOF
12092#define WITH_THREAD 1
12093_ACEOF
12094
12095
12096cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012097#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012098_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012099
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012100 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012101else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012102
Martin v. Löwis11437992002-04-12 09:54:03 +000012103 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
12104echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
12105if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
12106 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012107else
Martin v. Löwis11437992002-04-12 09:54:03 +000012108 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012109LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012110cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012111/* confdefs.h. */
12112_ACEOF
12113cat confdefs.h >>conftest.$ac_ext
12114cat >>conftest.$ac_ext <<_ACEOF
12115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012116
Greg Steinadf63d62000-07-05 10:38:09 +000012117/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012118#ifdef __cplusplus
12119extern "C"
12120#endif
Greg Steinadf63d62000-07-05 10:38:09 +000012121/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012122 builtin and then its argument prototype would still apply. */
12123char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012124int
12125main ()
12126{
12127pthread_create ();
12128 ;
12129 return 0;
12130}
12131_ACEOF
12132rm -f conftest.$ac_objext conftest$ac_exeext
12133if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012134 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012135 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012136 grep -v '^ *+' conftest.er1 >conftest.err
12137 rm -f conftest.er1
12138 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12140 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012141 { ac_try='test -z "$ac_c_werror_flag"
12142 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012143 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12144 (eval $ac_try) 2>&5
12145 ac_status=$?
12146 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12147 (exit $ac_status); }; } &&
12148 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012149 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12150 (eval $ac_try) 2>&5
12151 ac_status=$?
12152 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12153 (exit $ac_status); }; }; then
12154 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000012155else
Martin v. Löwis11437992002-04-12 09:54:03 +000012156 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012157sed 's/^/| /' conftest.$ac_ext >&5
12158
Martin v. Löwis11437992002-04-12 09:54:03 +000012159ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000012160fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012161rm -f conftest.err conftest.$ac_objext \
12162 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012163LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012164fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012165echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
12166echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
12167if test $ac_cv_lib_pthreads_pthread_create = yes; then
12168 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012169#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012170_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012171
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012172 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012173 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012174 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000012175else
Greg Steinadf63d62000-07-05 10:38:09 +000012176
Martin v. Löwis11437992002-04-12 09:54:03 +000012177 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
12178echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
12179if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
12180 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000012181else
Martin v. Löwis11437992002-04-12 09:54:03 +000012182 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012183LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012184cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012185/* confdefs.h. */
12186_ACEOF
12187cat confdefs.h >>conftest.$ac_ext
12188cat >>conftest.$ac_ext <<_ACEOF
12189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012190
Guido van Rossum49545951997-12-02 19:28:29 +000012191/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012192#ifdef __cplusplus
12193extern "C"
12194#endif
Guido van Rossum49545951997-12-02 19:28:29 +000012195/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012196 builtin and then its argument prototype would still apply. */
12197char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012198int
12199main ()
12200{
12201pthread_create ();
12202 ;
12203 return 0;
12204}
12205_ACEOF
12206rm -f conftest.$ac_objext conftest$ac_exeext
12207if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012208 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012210 grep -v '^ *+' conftest.er1 >conftest.err
12211 rm -f conftest.er1
12212 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12214 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012215 { ac_try='test -z "$ac_c_werror_flag"
12216 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012217 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12218 (eval $ac_try) 2>&5
12219 ac_status=$?
12220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12221 (exit $ac_status); }; } &&
12222 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12224 (eval $ac_try) 2>&5
12225 ac_status=$?
12226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12227 (exit $ac_status); }; }; then
12228 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000012229else
Martin v. Löwis11437992002-04-12 09:54:03 +000012230 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012231sed 's/^/| /' conftest.$ac_ext >&5
12232
Martin v. Löwis11437992002-04-12 09:54:03 +000012233ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000012234fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012235rm -f conftest.err conftest.$ac_objext \
12236 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012237LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000012238fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012239echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
12240echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
12241if test $ac_cv_lib_c_r_pthread_create = yes; then
12242 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012243#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012244_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012245
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012246 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012247 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012248 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012249else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012250
Martin v. Löwis11437992002-04-12 09:54:03 +000012251 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
12252echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
12253if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
12254 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012255else
Martin v. Löwis11437992002-04-12 09:54:03 +000012256 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012257LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012258cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012259/* confdefs.h. */
12260_ACEOF
12261cat confdefs.h >>conftest.$ac_ext
12262cat >>conftest.$ac_ext <<_ACEOF
12263/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012264
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012265/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012266#ifdef __cplusplus
12267extern "C"
12268#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012269/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012270 builtin and then its argument prototype would still apply. */
12271char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012272int
12273main ()
12274{
12275__pthread_create_system ();
12276 ;
12277 return 0;
12278}
12279_ACEOF
12280rm -f conftest.$ac_objext conftest$ac_exeext
12281if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012282 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012283 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012284 grep -v '^ *+' conftest.er1 >conftest.err
12285 rm -f conftest.er1
12286 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12288 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012289 { ac_try='test -z "$ac_c_werror_flag"
12290 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12292 (eval $ac_try) 2>&5
12293 ac_status=$?
12294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12295 (exit $ac_status); }; } &&
12296 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012297 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12298 (eval $ac_try) 2>&5
12299 ac_status=$?
12300 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12301 (exit $ac_status); }; }; then
12302 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012303else
Martin v. Löwis11437992002-04-12 09:54:03 +000012304 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012305sed 's/^/| /' conftest.$ac_ext >&5
12306
Martin v. Löwis11437992002-04-12 09:54:03 +000012307ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012308fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012309rm -f conftest.err conftest.$ac_objext \
12310 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012311LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012312fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012313echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
12314echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
12315if test $ac_cv_lib_pthread___pthread_create_system = yes; then
12316 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012317#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012318_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012319
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012320 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012321 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012322 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012323else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012324
Martin v. Löwis11437992002-04-12 09:54:03 +000012325 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
12326echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
12327if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
12328 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000012329else
Martin v. Löwis11437992002-04-12 09:54:03 +000012330 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012331LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012332cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012333/* confdefs.h. */
12334_ACEOF
12335cat confdefs.h >>conftest.$ac_ext
12336cat >>conftest.$ac_ext <<_ACEOF
12337/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012338
Guido van Rossumb93a8621998-05-07 13:27:32 +000012339/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012340#ifdef __cplusplus
12341extern "C"
12342#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000012343/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012344 builtin and then its argument prototype would still apply. */
12345char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012346int
12347main ()
12348{
12349pthread_create ();
12350 ;
12351 return 0;
12352}
12353_ACEOF
12354rm -f conftest.$ac_objext conftest$ac_exeext
12355if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012356 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012358 grep -v '^ *+' conftest.er1 >conftest.err
12359 rm -f conftest.er1
12360 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12362 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012363 { ac_try='test -z "$ac_c_werror_flag"
12364 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12366 (eval $ac_try) 2>&5
12367 ac_status=$?
12368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12369 (exit $ac_status); }; } &&
12370 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012371 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12372 (eval $ac_try) 2>&5
12373 ac_status=$?
12374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12375 (exit $ac_status); }; }; then
12376 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000012377else
Martin v. Löwis11437992002-04-12 09:54:03 +000012378 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012379sed 's/^/| /' conftest.$ac_ext >&5
12380
Martin v. Löwis11437992002-04-12 09:54:03 +000012381ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000012382fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012383rm -f conftest.err conftest.$ac_objext \
12384 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012385LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012386fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012387echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
12388echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
12389if test $ac_cv_lib_cma_pthread_create = yes; then
12390 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012391#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012392_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012393
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012394 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012395 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012396 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000012397else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000012398
Martin v. Löwis130fb172001-07-19 11:00:41 +000012399 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000012400fi
12401
Guido van Rossum627b2d71993-12-24 10:39:16 +000012402
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012403fi
12404
Guido van Rossum0be3e491997-05-22 20:33:33 +000012405fi
12406
Guido van Rossum49545951997-12-02 19:28:29 +000012407fi
12408
Guido van Rossumb93a8621998-05-07 13:27:32 +000012409fi
12410
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012411
Michael W. Hudson54241132001-12-07 15:38:26 +000012412fi
12413
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012414
12415fi
12416
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012417fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012418rm -f conftest.err conftest.$ac_objext \
12419 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012420fi;
12421fi
12422
12423
12424fi
12425
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012426
Michael W. Hudson54241132001-12-07 15:38:26 +000012427
Martin v. Löwis11437992002-04-12 09:54:03 +000012428 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
12429echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
12430if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
12431 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012432else
Martin v. Löwis11437992002-04-12 09:54:03 +000012433 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012434LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012435cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012436/* confdefs.h. */
12437_ACEOF
12438cat confdefs.h >>conftest.$ac_ext
12439cat >>conftest.$ac_ext <<_ACEOF
12440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012441
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012442/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012443#ifdef __cplusplus
12444extern "C"
12445#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012446/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012447 builtin and then its argument prototype would still apply. */
12448char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012449int
12450main ()
12451{
12452usconfig ();
12453 ;
12454 return 0;
12455}
12456_ACEOF
12457rm -f conftest.$ac_objext conftest$ac_exeext
12458if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012459 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012460 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012461 grep -v '^ *+' conftest.er1 >conftest.err
12462 rm -f conftest.er1
12463 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12465 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012466 { ac_try='test -z "$ac_c_werror_flag"
12467 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12469 (eval $ac_try) 2>&5
12470 ac_status=$?
12471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12472 (exit $ac_status); }; } &&
12473 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12475 (eval $ac_try) 2>&5
12476 ac_status=$?
12477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12478 (exit $ac_status); }; }; then
12479 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012480else
Martin v. Löwis11437992002-04-12 09:54:03 +000012481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012482sed 's/^/| /' conftest.$ac_ext >&5
12483
Martin v. Löwis11437992002-04-12 09:54:03 +000012484ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012485fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012486rm -f conftest.err conftest.$ac_objext \
12487 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012488LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012489fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012490echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
12491echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
12492if test $ac_cv_lib_mpc_usconfig = yes; then
12493 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012494#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012495_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012496
Martin v. Löwis130fb172001-07-19 11:00:41 +000012497 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012498 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012499 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012500fi
12501
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012502
Neal Norwitza978ab02002-11-02 16:58:05 +000012503 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012504 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
12505echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
12506if test "${ac_cv_lib_thread_thr_create+set}" = set; then
12507 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012508else
Martin v. Löwis11437992002-04-12 09:54:03 +000012509 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012510LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012511cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012512/* confdefs.h. */
12513_ACEOF
12514cat confdefs.h >>conftest.$ac_ext
12515cat >>conftest.$ac_ext <<_ACEOF
12516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012517
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012518/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012519#ifdef __cplusplus
12520extern "C"
12521#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012522/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012523 builtin and then its argument prototype would still apply. */
12524char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012525int
12526main ()
12527{
12528thr_create ();
12529 ;
12530 return 0;
12531}
12532_ACEOF
12533rm -f conftest.$ac_objext conftest$ac_exeext
12534if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012535 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012537 grep -v '^ *+' conftest.er1 >conftest.err
12538 rm -f conftest.er1
12539 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12541 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012542 { ac_try='test -z "$ac_c_werror_flag"
12543 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12545 (eval $ac_try) 2>&5
12546 ac_status=$?
12547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12548 (exit $ac_status); }; } &&
12549 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012550 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12551 (eval $ac_try) 2>&5
12552 ac_status=$?
12553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12554 (exit $ac_status); }; }; then
12555 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012556else
Martin v. Löwis11437992002-04-12 09:54:03 +000012557 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012558sed 's/^/| /' conftest.$ac_ext >&5
12559
Martin v. Löwis11437992002-04-12 09:54:03 +000012560ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012561fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012562rm -f conftest.err conftest.$ac_objext \
12563 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012564LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012565fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012566echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
12567echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
12568if test $ac_cv_lib_thread_thr_create = yes; then
12569 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012570#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012571_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012572
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012573 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012574 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012575 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012576fi
12577
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012578 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000012579
Martin v. Löwis130fb172001-07-19 11:00:41 +000012580 if test "$USE_THREAD_MODULE" != "#"
12581 then
12582 # If the above checks didn't disable threads, (at least) OSF1
12583 # needs this '-threads' argument during linking.
12584 case $ac_sys_system in
12585 OSF1) LDLAST=-threads;;
12586 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000012587 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012588fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012589
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012590if test "$posix_threads" = "yes"; then
12591 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012592
12593cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012594#define _POSIX_THREADS 1
12595_ACEOF
12596
12597 fi
12598
12599 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
12600 case $ac_sys_system/$ac_sys_release in
12601 SunOS/5.6)
12602cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012603#define HAVE_PTHREAD_DESTRUCTOR 1
12604_ACEOF
12605
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012606 ;;
12607 SunOS/5.8)
12608cat >>confdefs.h <<\_ACEOF
12609#define HAVE_BROKEN_POSIX_SEMAPHORES 1
12610_ACEOF
12611
12612 ;;
12613 esac
12614
12615 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
12616echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
12617 if test "${ac_cv_pthread_system_supported+set}" = set; then
12618 echo $ECHO_N "(cached) $ECHO_C" >&6
12619else
12620 if test "$cross_compiling" = yes; then
12621 ac_cv_pthread_system_supported=no
12622else
12623 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012624/* confdefs.h. */
12625_ACEOF
12626cat confdefs.h >>conftest.$ac_ext
12627cat >>conftest.$ac_ext <<_ACEOF
12628/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012629#include <pthread.h>
12630 void *foo(void *parm) {
12631 return NULL;
12632 }
12633 main() {
12634 pthread_attr_t attr;
12635 pthread_t id;
12636 if (pthread_attr_init(&attr)) exit(-1);
12637 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
12638 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
12639 exit(0);
12640 }
12641_ACEOF
12642rm -f conftest$ac_exeext
12643if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12644 (eval $ac_link) 2>&5
12645 ac_status=$?
12646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12647 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12648 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12649 (eval $ac_try) 2>&5
12650 ac_status=$?
12651 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12652 (exit $ac_status); }; }; then
12653 ac_cv_pthread_system_supported=yes
12654else
12655 echo "$as_me: program exited with status $ac_status" >&5
12656echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012657sed 's/^/| /' conftest.$ac_ext >&5
12658
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012659( exit $ac_status )
12660ac_cv_pthread_system_supported=no
12661fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012662rm -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 +000012663fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012664
Guido van Rossum627b2d71993-12-24 10:39:16 +000012665fi
12666
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012667 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
12668echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
12669 if test "$ac_cv_pthread_system_supported" = "yes"; then
12670
12671cat >>confdefs.h <<\_ACEOF
12672#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
12673_ACEOF
12674
12675 fi
12676
12677for ac_func in pthread_sigmask
12678do
12679as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12680echo "$as_me:$LINENO: checking for $ac_func" >&5
12681echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12682if eval "test \"\${$as_ac_var+set}\" = set"; then
12683 echo $ECHO_N "(cached) $ECHO_C" >&6
12684else
12685 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012686/* confdefs.h. */
12687_ACEOF
12688cat confdefs.h >>conftest.$ac_ext
12689cat >>conftest.$ac_ext <<_ACEOF
12690/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012691/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012692 which can conflict with char $ac_func (); below.
12693 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012694 <limits.h> exists even on freestanding compilers. Under hpux,
12695 including <limits.h> includes <sys/time.h> and causes problems
12696 checking for functions defined therein. */
12697#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012698# include <limits.h>
12699#else
12700# include <assert.h>
12701#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012702/* Override any gcc2 internal prototype to avoid an error. */
12703#ifdef __cplusplus
12704extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012705{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012706#endif
12707/* We use char because int might match the return type of a gcc2
12708 builtin and then its argument prototype would still apply. */
12709char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012710/* The GNU C library defines this for functions which it implements
12711 to always fail with ENOSYS. Some functions are actually named
12712 something starting with __ and the normal name is an alias. */
12713#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12714choke me
12715#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012716char (*f) () = $ac_func;
12717#endif
12718#ifdef __cplusplus
12719}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012720#endif
12721
Skip Montanaro6dead952003-09-25 14:50:04 +000012722int
12723main ()
12724{
12725return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012726 ;
12727 return 0;
12728}
12729_ACEOF
12730rm -f conftest.$ac_objext conftest$ac_exeext
12731if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012732 (eval $ac_link) 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012734 grep -v '^ *+' conftest.er1 >conftest.err
12735 rm -f conftest.er1
12736 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12738 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012739 { ac_try='test -z "$ac_c_werror_flag"
12740 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12742 (eval $ac_try) 2>&5
12743 ac_status=$?
12744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12745 (exit $ac_status); }; } &&
12746 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12748 (eval $ac_try) 2>&5
12749 ac_status=$?
12750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12751 (exit $ac_status); }; }; then
12752 eval "$as_ac_var=yes"
12753else
12754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012755sed 's/^/| /' conftest.$ac_ext >&5
12756
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012757eval "$as_ac_var=no"
12758fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012759rm -f conftest.err conftest.$ac_objext \
12760 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012761fi
12762echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12763echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12764if test `eval echo '${'$as_ac_var'}'` = yes; then
12765 cat >>confdefs.h <<_ACEOF
12766#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12767_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000012768 case $ac_sys_system in
12769 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012770
Jason Tishlerfac083d2003-07-22 15:20:49 +000012771cat >>confdefs.h <<\_ACEOF
12772#define HAVE_BROKEN_PTHREAD_SIGMASK 1
12773_ACEOF
12774
12775 ;;
12776 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012777fi
12778done
12779
12780fi
12781
12782
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012783# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000012784
12785
12786echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
12787echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012788# Check whether --enable-ipv6 or --disable-ipv6 was given.
12789if test "${enable_ipv6+set}" = set; then
12790 enableval="$enable_ipv6"
12791 case "$enableval" in
12792 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000012793 echo "$as_me:$LINENO: result: no" >&5
12794echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012795 ipv6=no
12796 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012797 *) echo "$as_me:$LINENO: result: yes" >&5
12798echo "${ECHO_T}yes" >&6
12799 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012800#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012801_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012802
12803 ipv6=yes
12804 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012805 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012806else
Martin v. Löwis11437992002-04-12 09:54:03 +000012807
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012808 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012809 echo "$as_me:$LINENO: result: no" >&5
12810echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012811 ipv6=no
12812
12813else
Martin v. Löwis11437992002-04-12 09:54:03 +000012814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012815/* confdefs.h. */
12816_ACEOF
12817cat confdefs.h >>conftest.$ac_ext
12818cat >>conftest.$ac_ext <<_ACEOF
12819/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012820 /* AF_INET6 available check */
12821#include <sys/types.h>
12822#include <sys/socket.h>
12823main()
12824{
12825 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
12826 exit(1);
12827 else
12828 exit(0);
12829}
12830
Martin v. Löwis11437992002-04-12 09:54:03 +000012831_ACEOF
12832rm -f conftest$ac_exeext
12833if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12834 (eval $ac_link) 2>&5
12835 ac_status=$?
12836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12837 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12839 (eval $ac_try) 2>&5
12840 ac_status=$?
12841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12842 (exit $ac_status); }; }; then
12843 echo "$as_me:$LINENO: result: yes" >&5
12844echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012845 ipv6=yes
12846else
Martin v. Löwis11437992002-04-12 09:54:03 +000012847 echo "$as_me: program exited with status $ac_status" >&5
12848echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012849sed 's/^/| /' conftest.$ac_ext >&5
12850
Martin v. Löwis11437992002-04-12 09:54:03 +000012851( exit $ac_status )
12852echo "$as_me:$LINENO: result: no" >&5
12853echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012854 ipv6=no
12855fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012856rm -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 +000012857fi
12858
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012859if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012860 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
12861echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
12862 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012863/* confdefs.h. */
12864_ACEOF
12865cat confdefs.h >>conftest.$ac_ext
12866cat >>conftest.$ac_ext <<_ACEOF
12867/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012868#include <sys/types.h>
12869#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012870int
12871main ()
12872{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012873struct sockaddr_in6 x;
12874x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000012875 ;
12876 return 0;
12877}
12878_ACEOF
12879rm -f conftest.$ac_objext
12880if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012881 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012882 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012883 grep -v '^ *+' conftest.er1 >conftest.err
12884 rm -f conftest.er1
12885 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12887 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000012888 { ac_try='test -z "$ac_c_werror_flag"
12889 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12891 (eval $ac_try) 2>&5
12892 ac_status=$?
12893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12894 (exit $ac_status); }; } &&
12895 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12897 (eval $ac_try) 2>&5
12898 ac_status=$?
12899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12900 (exit $ac_status); }; }; then
12901 echo "$as_me:$LINENO: result: yes" >&5
12902echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012903 ipv6=yes
12904else
Martin v. Löwis11437992002-04-12 09:54:03 +000012905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012906sed 's/^/| /' conftest.$ac_ext >&5
12907
Martin v. Löwis11437992002-04-12 09:54:03 +000012908echo "$as_me:$LINENO: result: no" >&5
12909echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012910 ipv6=no
12911fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012912rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012913fi
12914
12915if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012916 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012917#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012918_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012919
12920fi
12921
Martin v. Löwis11437992002-04-12 09:54:03 +000012922fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012923
12924ipv6type=unknown
12925ipv6lib=none
12926ipv6trylibc=no
12927
12928if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012929 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
12930echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000012931 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
12932 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012933 case $i in
12934 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000012935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012936/* confdefs.h. */
12937_ACEOF
12938cat confdefs.h >>conftest.$ac_ext
12939cat >>conftest.$ac_ext <<_ACEOF
12940/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012941
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012942#include <netinet/in.h>
12943#ifdef IPV6_INRIA_VERSION
12944yes
12945#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012946_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012947if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012948 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012949 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012950fi
12951rm -f conftest*
12952
12953 ;;
12954 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000012955 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012956/* confdefs.h. */
12957_ACEOF
12958cat confdefs.h >>conftest.$ac_ext
12959cat >>conftest.$ac_ext <<_ACEOF
12960/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012961
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012962#include <netinet/in.h>
12963#ifdef __KAME__
12964yes
12965#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012966_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012967if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012968 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012969 ipv6type=$i;
12970 ipv6lib=inet6
12971 ipv6libdir=/usr/local/v6/lib
12972 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012973fi
12974rm -f conftest*
12975
12976 ;;
12977 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000012978 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012979/* confdefs.h. */
12980_ACEOF
12981cat confdefs.h >>conftest.$ac_ext
12982cat >>conftest.$ac_ext <<_ACEOF
12983/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012984
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012985#include <features.h>
12986#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
12987yes
12988#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012989_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012990if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012991 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012992 ipv6type=$i;
12993 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012994fi
12995rm -f conftest*
12996
12997 ;;
12998 linux-inet6)
12999 if test -d /usr/inet6; then
13000 ipv6type=$i
13001 ipv6lib=inet6
13002 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000013003 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013004 fi
13005 ;;
13006 solaris)
13007 if test -f /etc/netconfig; then
13008 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
13009 ipv6type=$i
13010 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013011 fi
13012 fi
13013 ;;
13014 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000013015 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013016/* confdefs.h. */
13017_ACEOF
13018cat confdefs.h >>conftest.$ac_ext
13019cat >>conftest.$ac_ext <<_ACEOF
13020/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013021
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013022#include <sys/param.h>
13023#ifdef _TOSHIBA_INET6
13024yes
13025#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013026_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013027if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013028 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013029 ipv6type=$i;
13030 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013031 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013032fi
13033rm -f conftest*
13034
13035 ;;
13036 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000013037 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013038/* confdefs.h. */
13039_ACEOF
13040cat confdefs.h >>conftest.$ac_ext
13041cat >>conftest.$ac_ext <<_ACEOF
13042/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013043
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013044#include </usr/local/v6/include/sys/v6config.h>
13045#ifdef __V6D__
13046yes
13047#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013048_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013049if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013050 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013051 ipv6type=$i;
13052 ipv6lib=v6;
13053 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000013054 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013055fi
13056rm -f conftest*
13057
13058 ;;
13059 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000013060 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013061/* confdefs.h. */
13062_ACEOF
13063cat confdefs.h >>conftest.$ac_ext
13064cat >>conftest.$ac_ext <<_ACEOF
13065/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000013066
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013067#include <sys/param.h>
13068#ifdef _ZETA_MINAMI_INET6
13069yes
13070#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013071_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013072if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013073 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013074 ipv6type=$i;
13075 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013076 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013077fi
13078rm -f conftest*
13079
13080 ;;
13081 esac
13082 if test "$ipv6type" != "unknown"; then
13083 break
13084 fi
13085 done
Martin v. Löwis11437992002-04-12 09:54:03 +000013086 echo "$as_me:$LINENO: result: $ipv6type" >&5
13087echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013088fi
13089
13090if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
13091 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
13092 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
13093 echo "using lib$ipv6lib"
13094 else
13095 if test $ipv6trylibc = "yes"; then
13096 echo "using libc"
13097 else
13098 echo 'Fatal: no $ipv6lib library found. cannot continue.'
13099 echo "You need to fetch lib$ipv6lib.a from appropriate"
13100 echo 'ipv6 kit and compile beforehand.'
13101 exit 1
13102 fi
13103 fi
13104fi
13105
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000013106# Check for --with-doc-strings
13107echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
13108echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
13109
13110# Check whether --with-doc-strings or --without-doc-strings was given.
13111if test "${with_doc_strings+set}" = set; then
13112 withval="$with_doc_strings"
13113
13114fi;
13115
13116if test -z "$with_doc_strings"
13117then with_doc_strings="yes"
13118fi
13119if test "$with_doc_strings" != "no"
13120then
13121
13122cat >>confdefs.h <<\_ACEOF
13123#define WITH_DOC_STRINGS 1
13124_ACEOF
13125
13126fi
13127echo "$as_me:$LINENO: result: $with_doc_strings" >&5
13128echo "${ECHO_T}$with_doc_strings" >&6
13129
Neil Schemenauera35c6882001-02-27 04:45:05 +000013130# Check for Python-specific malloc support
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000013131echo "$as_me:$LINENO: checking for --with-tsc" >&5
13132echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6
13133
13134# Check whether --with-tsc or --without-tsc was given.
13135if test "${with_tsc+set}" = set; then
13136 withval="$with_tsc"
13137
13138if test "$withval" != no
13139then
13140
13141cat >>confdefs.h <<\_ACEOF
13142#define WITH_TSC 1
13143_ACEOF
13144
13145 echo "$as_me:$LINENO: result: yes" >&5
13146echo "${ECHO_T}yes" >&6
13147else echo "$as_me:$LINENO: result: no" >&5
13148echo "${ECHO_T}no" >&6
13149fi
13150else
13151 echo "$as_me:$LINENO: result: no" >&5
13152echo "${ECHO_T}no" >&6
13153fi;
13154
13155# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000013156echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
13157echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
13158
Neil Schemenauera35c6882001-02-27 04:45:05 +000013159# Check whether --with-pymalloc or --without-pymalloc was given.
13160if test "${with_pymalloc+set}" = set; then
13161 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000013162
Martin v. Löwis11437992002-04-12 09:54:03 +000013163fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000013164
Neil Schemenauer16c22972002-03-22 15:34:49 +000013165if test -z "$with_pymalloc"
13166then with_pymalloc="yes"
13167fi
13168if test "$with_pymalloc" != "no"
13169then
Martin v. Löwis11437992002-04-12 09:54:03 +000013170
13171cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013172#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013173_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013174
13175fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013176echo "$as_me:$LINENO: result: $with_pymalloc" >&5
13177echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000013178
Barry Warsawef82cd72000-06-30 16:21:01 +000013179# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013180echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
13181echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
13182
Barry Warsawef82cd72000-06-30 16:21:01 +000013183# Check whether --with-wctype-functions or --without-wctype-functions was given.
13184if test "${with_wctype_functions+set}" = set; then
13185 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000013186
Barry Warsawef82cd72000-06-30 16:21:01 +000013187if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013188then
13189
13190cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000013191#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013192_ACEOF
13193
13194 echo "$as_me:$LINENO: result: yes" >&5
13195echo "${ECHO_T}yes" >&6
13196else echo "$as_me:$LINENO: result: no" >&5
13197echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000013198fi
13199else
Martin v. Löwis11437992002-04-12 09:54:03 +000013200 echo "$as_me:$LINENO: result: no" >&5
13201echo "${ECHO_T}no" >&6
13202fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000013203
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013204# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000013205
Guido van Rossum98935bf2001-09-05 19:13:16 +000013206DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000013207
Guido van Rossume97ee181999-12-20 21:27:22 +000013208# the dlopen() function means we might want to use dynload_shlib.o. some
13209# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000013210
Thomas Wouters3a584202000-08-05 23:28:51 +000013211for ac_func in dlopen
13212do
Martin v. Löwis11437992002-04-12 09:54:03 +000013213as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13214echo "$as_me:$LINENO: checking for $ac_func" >&5
13215echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13216if eval "test \"\${$as_ac_var+set}\" = set"; then
13217 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013218else
Martin v. Löwis11437992002-04-12 09:54:03 +000013219 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013220/* confdefs.h. */
13221_ACEOF
13222cat confdefs.h >>conftest.$ac_ext
13223cat >>conftest.$ac_ext <<_ACEOF
13224/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000013225/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013226 which can conflict with char $ac_func (); below.
13227 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013228 <limits.h> exists even on freestanding compilers. Under hpux,
13229 including <limits.h> includes <sys/time.h> and causes problems
13230 checking for functions defined therein. */
13231#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013232# include <limits.h>
13233#else
13234# include <assert.h>
13235#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013236/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013237#ifdef __cplusplus
13238extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013239{
Martin v. Löwis11437992002-04-12 09:54:03 +000013240#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013241/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013242 builtin and then its argument prototype would still apply. */
13243char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000013244/* The GNU C library defines this for functions which it implements
13245 to always fail with ENOSYS. Some functions are actually named
13246 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013247#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000013248choke me
13249#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013250char (*f) () = $ac_func;
13251#endif
13252#ifdef __cplusplus
13253}
Guido van Rossume97ee181999-12-20 21:27:22 +000013254#endif
13255
Skip Montanaro6dead952003-09-25 14:50:04 +000013256int
13257main ()
13258{
13259return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013260 ;
13261 return 0;
13262}
13263_ACEOF
13264rm -f conftest.$ac_objext conftest$ac_exeext
13265if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013266 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013268 grep -v '^ *+' conftest.er1 >conftest.err
13269 rm -f conftest.er1
13270 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13272 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013273 { ac_try='test -z "$ac_c_werror_flag"
13274 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013275 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13276 (eval $ac_try) 2>&5
13277 ac_status=$?
13278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13279 (exit $ac_status); }; } &&
13280 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013281 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13282 (eval $ac_try) 2>&5
13283 ac_status=$?
13284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13285 (exit $ac_status); }; }; then
13286 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013287else
Martin v. Löwis11437992002-04-12 09:54:03 +000013288 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013289sed 's/^/| /' conftest.$ac_ext >&5
13290
Martin v. Löwis11437992002-04-12 09:54:03 +000013291eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013292fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013293rm -f conftest.err conftest.$ac_objext \
13294 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013295fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013296echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13297echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13298if test `eval echo '${'$as_ac_var'}'` = yes; then
13299 cat >>confdefs.h <<_ACEOF
13300#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13301_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013302
Guido van Rossume97ee181999-12-20 21:27:22 +000013303fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013304done
Guido van Rossume97ee181999-12-20 21:27:22 +000013305
Michael W. Hudson54241132001-12-07 15:38:26 +000013306
Guido van Rossume97ee181999-12-20 21:27:22 +000013307# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
13308# loading of modules.
13309
Martin v. Löwis11437992002-04-12 09:54:03 +000013310echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
13311echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013312if test -z "$DYNLOADFILE"
13313then
13314 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000013315 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
13316 if test "$ac_cv_func_dlopen" = yes
13317 then DYNLOADFILE="dynload_shlib.o"
13318 else DYNLOADFILE="dynload_aix.o"
13319 fi
13320 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000013321 BeOS*) DYNLOADFILE="dynload_beos.o";;
13322 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000013323 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013324 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000013325 *)
13326 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
13327 # out any dynamic loading
13328 if test "$ac_cv_func_dlopen" = yes
13329 then DYNLOADFILE="dynload_shlib.o"
13330 else DYNLOADFILE="dynload_stub.o"
13331 fi
13332 ;;
13333 esac
13334fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013335echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
13336echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013337if test "$DYNLOADFILE" != "dynload_stub.o"
13338then
Martin v. Löwis11437992002-04-12 09:54:03 +000013339
13340cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013341#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013342_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013343
13344fi
13345
Neil Schemenauer4e425612001-06-19 15:44:15 +000013346# MACHDEP_OBJS can be set to platform-specific object files needed by Python
13347
Michael W. Hudson54241132001-12-07 15:38:26 +000013348
Martin v. Löwis11437992002-04-12 09:54:03 +000013349echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
13350echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013351if test -z "$MACHDEP_OBJS"
13352then
Jack Jansene578a632001-08-15 01:27:14 +000013353 MACHDEP_OBJS=$extra_machdep_objs
13354else
13355 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000013356fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013357echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
13358echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013359
Guido van Rossum627b2d71993-12-24 10:39:16 +000013360# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013361
13362
13363
13364
13365
13366
13367
13368
13369
13370
13371
13372
13373
13374
13375
13376
13377
13378
13379
13380
13381
13382
13383
13384
13385
13386
13387
13388
13389
13390
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401
13402
13403
13404
13405
13406
13407
13408
13409
13410
13411
13412
13413
13414
13415
13416
13417
13418
13419
13420
13421
13422
13423
13424
13425
13426
13427
13428
13429
13430
13431
Martin v. Löwisd6320502004-08-12 13:45:08 +000013432
Martin v. Löwisc3001752005-01-23 09:27:24 +000013433
13434
Martin v. Löwisd6320502004-08-12 13:45:08 +000013435for ac_func in alarm bind_textdomain_codeset chown clock confstr ctermid \
13436 execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013437 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000013438 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000013439 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000013440 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000013441 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000013442 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000013443 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000013444 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000013445 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013446 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000013447do
Martin v. Löwis11437992002-04-12 09:54:03 +000013448as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13449echo "$as_me:$LINENO: checking for $ac_func" >&5
13450echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13451if eval "test \"\${$as_ac_var+set}\" = set"; then
13452 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013453else
Martin v. Löwis11437992002-04-12 09:54:03 +000013454 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013455/* confdefs.h. */
13456_ACEOF
13457cat confdefs.h >>conftest.$ac_ext
13458cat >>conftest.$ac_ext <<_ACEOF
13459/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013460/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013461 which can conflict with char $ac_func (); below.
13462 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013463 <limits.h> exists even on freestanding compilers. Under hpux,
13464 including <limits.h> includes <sys/time.h> and causes problems
13465 checking for functions defined therein. */
13466#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013467# include <limits.h>
13468#else
13469# include <assert.h>
13470#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013471/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013472#ifdef __cplusplus
13473extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013474{
Martin v. Löwis11437992002-04-12 09:54:03 +000013475#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013476/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013477 builtin and then its argument prototype would still apply. */
13478char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013479/* The GNU C library defines this for functions which it implements
13480 to always fail with ENOSYS. Some functions are actually named
13481 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013482#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013483choke me
13484#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013485char (*f) () = $ac_func;
13486#endif
13487#ifdef __cplusplus
13488}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013489#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013490
Skip Montanaro6dead952003-09-25 14:50:04 +000013491int
13492main ()
13493{
13494return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013495 ;
13496 return 0;
13497}
13498_ACEOF
13499rm -f conftest.$ac_objext conftest$ac_exeext
13500if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013501 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013502 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013503 grep -v '^ *+' conftest.er1 >conftest.err
13504 rm -f conftest.er1
13505 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13507 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013508 { ac_try='test -z "$ac_c_werror_flag"
13509 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013510 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13511 (eval $ac_try) 2>&5
13512 ac_status=$?
13513 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13514 (exit $ac_status); }; } &&
13515 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013516 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13517 (eval $ac_try) 2>&5
13518 ac_status=$?
13519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13520 (exit $ac_status); }; }; then
13521 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013522else
Martin v. Löwis11437992002-04-12 09:54:03 +000013523 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013524sed 's/^/| /' conftest.$ac_ext >&5
13525
Martin v. Löwis11437992002-04-12 09:54:03 +000013526eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013527fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013528rm -f conftest.err conftest.$ac_objext \
13529 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013530fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013531echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13532echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13533if test `eval echo '${'$as_ac_var'}'` = yes; then
13534 cat >>confdefs.h <<_ACEOF
13535#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13536_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013537
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013538fi
13539done
13540
Michael W. Hudson54241132001-12-07 15:38:26 +000013541
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013542# For some functions, having a definition is not sufficient, since
13543# we want to take their address.
13544echo "$as_me:$LINENO: checking for chroot" >&5
13545echo $ECHO_N "checking for chroot... $ECHO_C" >&6
13546cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013547/* confdefs.h. */
13548_ACEOF
13549cat confdefs.h >>conftest.$ac_ext
13550cat >>conftest.$ac_ext <<_ACEOF
13551/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013552#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013553int
13554main ()
13555{
13556void *x=chroot
13557 ;
13558 return 0;
13559}
13560_ACEOF
13561rm -f conftest.$ac_objext
13562if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013563 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +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öwisc8ad7cc2002-11-11 13:23:45 +000013568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13569 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013570 { ac_try='test -z "$ac_c_werror_flag"
13571 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013572 { (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_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013578 { (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
13583
13584cat >>confdefs.h <<\_ACEOF
13585#define HAVE_CHROOT 1
13586_ACEOF
13587
13588 echo "$as_me:$LINENO: result: yes" >&5
13589echo "${ECHO_T}yes" >&6
13590else
13591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013592sed 's/^/| /' conftest.$ac_ext >&5
13593
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013594echo "$as_me:$LINENO: result: no" >&5
13595echo "${ECHO_T}no" >&6
13596
13597fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013598rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013599echo "$as_me:$LINENO: checking for link" >&5
13600echo $ECHO_N "checking for link... $ECHO_C" >&6
13601cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013602/* confdefs.h. */
13603_ACEOF
13604cat confdefs.h >>conftest.$ac_ext
13605cat >>conftest.$ac_ext <<_ACEOF
13606/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013607#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013608int
13609main ()
13610{
13611void *x=link
13612 ;
13613 return 0;
13614}
13615_ACEOF
13616rm -f conftest.$ac_objext
13617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013618 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013619 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013620 grep -v '^ *+' conftest.er1 >conftest.err
13621 rm -f conftest.er1
13622 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13624 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013625 { ac_try='test -z "$ac_c_werror_flag"
13626 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13628 (eval $ac_try) 2>&5
13629 ac_status=$?
13630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13631 (exit $ac_status); }; } &&
13632 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13634 (eval $ac_try) 2>&5
13635 ac_status=$?
13636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13637 (exit $ac_status); }; }; then
13638
13639cat >>confdefs.h <<\_ACEOF
13640#define HAVE_LINK 1
13641_ACEOF
13642
13643 echo "$as_me:$LINENO: result: yes" >&5
13644echo "${ECHO_T}yes" >&6
13645else
13646 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013647sed 's/^/| /' conftest.$ac_ext >&5
13648
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013649echo "$as_me:$LINENO: result: no" >&5
13650echo "${ECHO_T}no" >&6
13651
13652fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013653rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013654echo "$as_me:$LINENO: checking for symlink" >&5
13655echo $ECHO_N "checking for symlink... $ECHO_C" >&6
13656cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013657/* confdefs.h. */
13658_ACEOF
13659cat confdefs.h >>conftest.$ac_ext
13660cat >>conftest.$ac_ext <<_ACEOF
13661/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013662#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013663int
13664main ()
13665{
13666void *x=symlink
13667 ;
13668 return 0;
13669}
13670_ACEOF
13671rm -f conftest.$ac_objext
13672if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013673 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013674 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013675 grep -v '^ *+' conftest.er1 >conftest.err
13676 rm -f conftest.er1
13677 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13679 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013680 { ac_try='test -z "$ac_c_werror_flag"
13681 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13683 (eval $ac_try) 2>&5
13684 ac_status=$?
13685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13686 (exit $ac_status); }; } &&
13687 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013688 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13689 (eval $ac_try) 2>&5
13690 ac_status=$?
13691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13692 (exit $ac_status); }; }; then
13693
13694cat >>confdefs.h <<\_ACEOF
13695#define HAVE_SYMLINK 1
13696_ACEOF
13697
13698 echo "$as_me:$LINENO: result: yes" >&5
13699echo "${ECHO_T}yes" >&6
13700else
13701 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013702sed 's/^/| /' conftest.$ac_ext >&5
13703
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013704echo "$as_me:$LINENO: result: no" >&5
13705echo "${ECHO_T}no" >&6
13706
13707fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013708rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013709echo "$as_me:$LINENO: checking for fchdir" >&5
13710echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
13711cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013712/* confdefs.h. */
13713_ACEOF
13714cat confdefs.h >>conftest.$ac_ext
13715cat >>conftest.$ac_ext <<_ACEOF
13716/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013717#include <unistd.h>
13718int
13719main ()
13720{
13721void *x=fchdir
13722 ;
13723 return 0;
13724}
13725_ACEOF
13726rm -f conftest.$ac_objext
13727if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013728 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013730 grep -v '^ *+' conftest.er1 >conftest.err
13731 rm -f conftest.er1
13732 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13734 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013735 { ac_try='test -z "$ac_c_werror_flag"
13736 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013737 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13738 (eval $ac_try) 2>&5
13739 ac_status=$?
13740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13741 (exit $ac_status); }; } &&
13742 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13744 (eval $ac_try) 2>&5
13745 ac_status=$?
13746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13747 (exit $ac_status); }; }; then
13748
13749cat >>confdefs.h <<\_ACEOF
13750#define HAVE_FCHDIR 1
13751_ACEOF
13752
13753 echo "$as_me:$LINENO: result: yes" >&5
13754echo "${ECHO_T}yes" >&6
13755else
13756 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013757sed 's/^/| /' conftest.$ac_ext >&5
13758
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013759echo "$as_me:$LINENO: result: no" >&5
13760echo "${ECHO_T}no" >&6
13761
13762fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013763rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013764echo "$as_me:$LINENO: checking for fsync" >&5
13765echo $ECHO_N "checking for fsync... $ECHO_C" >&6
13766cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013767/* confdefs.h. */
13768_ACEOF
13769cat confdefs.h >>conftest.$ac_ext
13770cat >>conftest.$ac_ext <<_ACEOF
13771/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013772#include <unistd.h>
13773int
13774main ()
13775{
13776void *x=fsync
13777 ;
13778 return 0;
13779}
13780_ACEOF
13781rm -f conftest.$ac_objext
13782if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013783 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013784 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013785 grep -v '^ *+' conftest.er1 >conftest.err
13786 rm -f conftest.er1
13787 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13789 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013790 { ac_try='test -z "$ac_c_werror_flag"
13791 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13793 (eval $ac_try) 2>&5
13794 ac_status=$?
13795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13796 (exit $ac_status); }; } &&
13797 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13799 (eval $ac_try) 2>&5
13800 ac_status=$?
13801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13802 (exit $ac_status); }; }; then
13803
13804cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013805#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013806_ACEOF
13807
13808 echo "$as_me:$LINENO: result: yes" >&5
13809echo "${ECHO_T}yes" >&6
13810else
13811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013812sed 's/^/| /' conftest.$ac_ext >&5
13813
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013814echo "$as_me:$LINENO: result: no" >&5
13815echo "${ECHO_T}no" >&6
13816
13817fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013818rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013819echo "$as_me:$LINENO: checking for fdatasync" >&5
13820echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
13821cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013822/* confdefs.h. */
13823_ACEOF
13824cat confdefs.h >>conftest.$ac_ext
13825cat >>conftest.$ac_ext <<_ACEOF
13826/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013827#include <unistd.h>
13828int
13829main ()
13830{
13831void *x=fdatasync
13832 ;
13833 return 0;
13834}
13835_ACEOF
13836rm -f conftest.$ac_objext
13837if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013838 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013839 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013840 grep -v '^ *+' conftest.er1 >conftest.err
13841 rm -f conftest.er1
13842 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13844 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013845 { ac_try='test -z "$ac_c_werror_flag"
13846 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13848 (eval $ac_try) 2>&5
13849 ac_status=$?
13850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13851 (exit $ac_status); }; } &&
13852 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013853 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13854 (eval $ac_try) 2>&5
13855 ac_status=$?
13856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13857 (exit $ac_status); }; }; then
13858
13859cat >>confdefs.h <<\_ACEOF
13860#define HAVE_FDATASYNC 1
13861_ACEOF
13862
13863 echo "$as_me:$LINENO: result: yes" >&5
13864echo "${ECHO_T}yes" >&6
13865else
13866 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013867sed 's/^/| /' conftest.$ac_ext >&5
13868
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013869echo "$as_me:$LINENO: result: no" >&5
13870echo "${ECHO_T}no" >&6
13871
13872fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013873rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013874
Martin v. Löwisd5843682002-11-21 20:41:28 +000013875# On some systems (eg. FreeBSD 5), we would find a definition of the
13876# functions ctermid_r, setgroups in the library, but no prototype
13877# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
13878# address to avoid compiler warnings and potential miscompilations
13879# because of the missing prototypes.
13880
13881echo "$as_me:$LINENO: checking for ctermid_r" >&5
13882echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
13883cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013884/* confdefs.h. */
13885_ACEOF
13886cat confdefs.h >>conftest.$ac_ext
13887cat >>conftest.$ac_ext <<_ACEOF
13888/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013889
13890#include "confdefs.h"
13891#include <stdio.h>
13892
Martin v. Löwisd5843682002-11-21 20:41:28 +000013893int
13894main ()
13895{
13896void* p = ctermid_r
13897 ;
13898 return 0;
13899}
13900_ACEOF
13901rm -f conftest.$ac_objext
13902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013903 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000013904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013905 grep -v '^ *+' conftest.er1 >conftest.err
13906 rm -f conftest.er1
13907 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000013908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13909 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013910 { ac_try='test -z "$ac_c_werror_flag"
13911 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13913 (eval $ac_try) 2>&5
13914 ac_status=$?
13915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13916 (exit $ac_status); }; } &&
13917 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000013918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13919 (eval $ac_try) 2>&5
13920 ac_status=$?
13921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13922 (exit $ac_status); }; }; then
13923
13924cat >>confdefs.h <<\_ACEOF
13925#define HAVE_CTERMID_R 1
13926_ACEOF
13927
13928 echo "$as_me:$LINENO: result: yes" >&5
13929echo "${ECHO_T}yes" >&6
13930else
13931 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013932sed 's/^/| /' conftest.$ac_ext >&5
13933
Martin v. Löwisd5843682002-11-21 20:41:28 +000013934echo "$as_me:$LINENO: result: no" >&5
13935echo "${ECHO_T}no" >&6
13936
13937fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013938rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000013939
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013940echo "$as_me:$LINENO: checking for flock" >&5
13941echo $ECHO_N "checking for flock... $ECHO_C" >&6
13942cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013943/* confdefs.h. */
13944_ACEOF
13945cat confdefs.h >>conftest.$ac_ext
13946cat >>conftest.$ac_ext <<_ACEOF
13947/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013948
13949#include "confdefs.h"
13950#include <sys/file.h>
13951
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013952int
13953main ()
13954{
13955void* p = flock
13956 ;
13957 return 0;
13958}
13959_ACEOF
13960rm -f conftest.$ac_objext
13961if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013962 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013963 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013964 grep -v '^ *+' conftest.er1 >conftest.err
13965 rm -f conftest.er1
13966 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013967 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13968 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000013969 { ac_try='test -z "$ac_c_werror_flag"
13970 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013971 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13972 (eval $ac_try) 2>&5
13973 ac_status=$?
13974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13975 (exit $ac_status); }; } &&
13976 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13978 (eval $ac_try) 2>&5
13979 ac_status=$?
13980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13981 (exit $ac_status); }; }; then
13982
13983cat >>confdefs.h <<\_ACEOF
13984#define HAVE_FLOCK 1
13985_ACEOF
13986
13987 echo "$as_me:$LINENO: result: yes" >&5
13988echo "${ECHO_T}yes" >&6
13989else
13990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013991sed 's/^/| /' conftest.$ac_ext >&5
13992
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013993echo "$as_me:$LINENO: result: no" >&5
13994echo "${ECHO_T}no" >&6
13995
13996fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013997rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013998
13999echo "$as_me:$LINENO: checking for getpagesize" >&5
14000echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
14001cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014002/* confdefs.h. */
14003_ACEOF
14004cat confdefs.h >>conftest.$ac_ext
14005cat >>conftest.$ac_ext <<_ACEOF
14006/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014007
14008#include "confdefs.h"
14009#include <unistd.h>
14010
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014011int
14012main ()
14013{
14014void* p = getpagesize
14015 ;
14016 return 0;
14017}
14018_ACEOF
14019rm -f conftest.$ac_objext
14020if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014021 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014022 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014023 grep -v '^ *+' conftest.er1 >conftest.err
14024 rm -f conftest.er1
14025 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14027 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014028 { ac_try='test -z "$ac_c_werror_flag"
14029 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14031 (eval $ac_try) 2>&5
14032 ac_status=$?
14033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14034 (exit $ac_status); }; } &&
14035 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14037 (eval $ac_try) 2>&5
14038 ac_status=$?
14039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14040 (exit $ac_status); }; }; then
14041
14042cat >>confdefs.h <<\_ACEOF
14043#define HAVE_GETPAGESIZE 1
14044_ACEOF
14045
14046 echo "$as_me:$LINENO: result: yes" >&5
14047echo "${ECHO_T}yes" >&6
14048else
14049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014050sed 's/^/| /' conftest.$ac_ext >&5
14051
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014052echo "$as_me:$LINENO: result: no" >&5
14053echo "${ECHO_T}no" >&6
14054
14055fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014056rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000014057
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014058for ac_prog in true
14059do
14060 # Extract the first word of "$ac_prog", so it can be a program name with args.
14061set dummy $ac_prog; ac_word=$2
14062echo "$as_me:$LINENO: checking for $ac_word" >&5
14063echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14064if test "${ac_cv_prog_TRUE+set}" = set; then
14065 echo $ECHO_N "(cached) $ECHO_C" >&6
14066else
14067 if test -n "$TRUE"; then
14068 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
14069else
14070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14071for as_dir in $PATH
14072do
14073 IFS=$as_save_IFS
14074 test -z "$as_dir" && as_dir=.
14075 for ac_exec_ext in '' $ac_executable_extensions; do
14076 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14077 ac_cv_prog_TRUE="$ac_prog"
14078 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14079 break 2
14080 fi
14081done
14082done
14083
14084fi
14085fi
14086TRUE=$ac_cv_prog_TRUE
14087if test -n "$TRUE"; then
14088 echo "$as_me:$LINENO: result: $TRUE" >&5
14089echo "${ECHO_T}$TRUE" >&6
14090else
14091 echo "$as_me:$LINENO: result: no" >&5
14092echo "${ECHO_T}no" >&6
14093fi
14094
14095 test -n "$TRUE" && break
14096done
14097test -n "$TRUE" || TRUE="/bin/true"
14098
14099
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014100echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
14101echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
14102if test "${ac_cv_lib_c_inet_aton+set}" = set; then
14103 echo $ECHO_N "(cached) $ECHO_C" >&6
14104else
14105 ac_check_lib_save_LIBS=$LIBS
14106LIBS="-lc $LIBS"
14107cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014108/* confdefs.h. */
14109_ACEOF
14110cat confdefs.h >>conftest.$ac_ext
14111cat >>conftest.$ac_ext <<_ACEOF
14112/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014113
14114/* Override any gcc2 internal prototype to avoid an error. */
14115#ifdef __cplusplus
14116extern "C"
14117#endif
14118/* We use char because int might match the return type of a gcc2
14119 builtin and then its argument prototype would still apply. */
14120char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014121int
14122main ()
14123{
14124inet_aton ();
14125 ;
14126 return 0;
14127}
14128_ACEOF
14129rm -f conftest.$ac_objext conftest$ac_exeext
14130if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014131 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014132 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014133 grep -v '^ *+' conftest.er1 >conftest.err
14134 rm -f conftest.er1
14135 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14137 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014138 { ac_try='test -z "$ac_c_werror_flag"
14139 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14141 (eval $ac_try) 2>&5
14142 ac_status=$?
14143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14144 (exit $ac_status); }; } &&
14145 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14147 (eval $ac_try) 2>&5
14148 ac_status=$?
14149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14150 (exit $ac_status); }; }; then
14151 ac_cv_lib_c_inet_aton=yes
14152else
14153 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014154sed 's/^/| /' conftest.$ac_ext >&5
14155
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014156ac_cv_lib_c_inet_aton=no
14157fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014158rm -f conftest.err conftest.$ac_objext \
14159 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014160LIBS=$ac_check_lib_save_LIBS
14161fi
14162echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
14163echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
14164if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014165 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014166else
14167
14168echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
14169echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
14170if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
14171 echo $ECHO_N "(cached) $ECHO_C" >&6
14172else
14173 ac_check_lib_save_LIBS=$LIBS
14174LIBS="-lresolv $LIBS"
14175cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014176/* confdefs.h. */
14177_ACEOF
14178cat confdefs.h >>conftest.$ac_ext
14179cat >>conftest.$ac_ext <<_ACEOF
14180/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014181
14182/* Override any gcc2 internal prototype to avoid an error. */
14183#ifdef __cplusplus
14184extern "C"
14185#endif
14186/* We use char because int might match the return type of a gcc2
14187 builtin and then its argument prototype would still apply. */
14188char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014189int
14190main ()
14191{
14192inet_aton ();
14193 ;
14194 return 0;
14195}
14196_ACEOF
14197rm -f conftest.$ac_objext conftest$ac_exeext
14198if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014199 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014201 grep -v '^ *+' conftest.er1 >conftest.err
14202 rm -f conftest.er1
14203 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14205 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014206 { ac_try='test -z "$ac_c_werror_flag"
14207 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14209 (eval $ac_try) 2>&5
14210 ac_status=$?
14211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14212 (exit $ac_status); }; } &&
14213 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014214 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14215 (eval $ac_try) 2>&5
14216 ac_status=$?
14217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14218 (exit $ac_status); }; }; then
14219 ac_cv_lib_resolv_inet_aton=yes
14220else
14221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014222sed 's/^/| /' conftest.$ac_ext >&5
14223
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014224ac_cv_lib_resolv_inet_aton=no
14225fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014226rm -f conftest.err conftest.$ac_objext \
14227 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014228LIBS=$ac_check_lib_save_LIBS
14229fi
14230echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
14231echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
14232if test $ac_cv_lib_resolv_inet_aton = yes; then
14233 cat >>confdefs.h <<_ACEOF
14234#define HAVE_LIBRESOLV 1
14235_ACEOF
14236
14237 LIBS="-lresolv $LIBS"
14238
14239fi
14240
14241
14242fi
14243
14244
Martin v. Löwise9416172003-05-03 10:12:45 +000014245echo "$as_me:$LINENO: checking for hstrerror" >&5
14246echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
14247cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014248/* confdefs.h. */
14249_ACEOF
14250cat confdefs.h >>conftest.$ac_ext
14251cat >>conftest.$ac_ext <<_ACEOF
14252/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014253
14254#include "confdefs.h"
14255#include <netdb.h>
14256
Martin v. Löwise9416172003-05-03 10:12:45 +000014257int
14258main ()
14259{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014260void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014261 ;
14262 return 0;
14263}
14264_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014265rm -f conftest.$ac_objext conftest$ac_exeext
14266if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014267 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014268 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014269 grep -v '^ *+' conftest.er1 >conftest.err
14270 rm -f conftest.er1
14271 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14273 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014274 { ac_try='test -z "$ac_c_werror_flag"
14275 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014276 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14277 (eval $ac_try) 2>&5
14278 ac_status=$?
14279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14280 (exit $ac_status); }; } &&
14281 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14283 (eval $ac_try) 2>&5
14284 ac_status=$?
14285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14286 (exit $ac_status); }; }; then
14287
14288cat >>confdefs.h <<\_ACEOF
14289#define HAVE_HSTRERROR 1
14290_ACEOF
14291
14292 echo "$as_me:$LINENO: result: yes" >&5
14293echo "${ECHO_T}yes" >&6
14294else
14295 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014296sed 's/^/| /' conftest.$ac_ext >&5
14297
Martin v. Löwise9416172003-05-03 10:12:45 +000014298echo "$as_me:$LINENO: result: no" >&5
14299echo "${ECHO_T}no" >&6
14300
14301fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014302rm -f conftest.err conftest.$ac_objext \
14303 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014304
14305echo "$as_me:$LINENO: checking for inet_aton" >&5
14306echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
14307cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014308/* confdefs.h. */
14309_ACEOF
14310cat confdefs.h >>conftest.$ac_ext
14311cat >>conftest.$ac_ext <<_ACEOF
14312/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014313
14314#include "confdefs.h"
14315#include <sys/socket.h>
14316#include <netinet/in.h>
14317#include <arpa/inet.h>
14318
Martin v. Löwise9416172003-05-03 10:12:45 +000014319int
14320main ()
14321{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014322void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014323 ;
14324 return 0;
14325}
14326_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014327rm -f conftest.$ac_objext conftest$ac_exeext
14328if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014329 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014330 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014331 grep -v '^ *+' conftest.er1 >conftest.err
14332 rm -f conftest.er1
14333 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14335 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014336 { ac_try='test -z "$ac_c_werror_flag"
14337 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014338 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14339 (eval $ac_try) 2>&5
14340 ac_status=$?
14341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14342 (exit $ac_status); }; } &&
14343 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14345 (eval $ac_try) 2>&5
14346 ac_status=$?
14347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14348 (exit $ac_status); }; }; then
14349
14350cat >>confdefs.h <<\_ACEOF
14351#define HAVE_INET_ATON 1
14352_ACEOF
14353
14354 echo "$as_me:$LINENO: result: yes" >&5
14355echo "${ECHO_T}yes" >&6
14356else
14357 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014358sed 's/^/| /' conftest.$ac_ext >&5
14359
Martin v. Löwise9416172003-05-03 10:12:45 +000014360echo "$as_me:$LINENO: result: no" >&5
14361echo "${ECHO_T}no" >&6
14362
14363fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014364rm -f conftest.err conftest.$ac_objext \
14365 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014366
14367echo "$as_me:$LINENO: checking for inet_pton" >&5
14368echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
14369cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014370/* confdefs.h. */
14371_ACEOF
14372cat confdefs.h >>conftest.$ac_ext
14373cat >>conftest.$ac_ext <<_ACEOF
14374/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014375
14376#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014377#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000014378#include <sys/socket.h>
14379#include <netinet/in.h>
14380#include <arpa/inet.h>
14381
Martin v. Löwise9416172003-05-03 10:12:45 +000014382int
14383main ()
14384{
14385void* p = inet_pton
14386 ;
14387 return 0;
14388}
14389_ACEOF
14390rm -f conftest.$ac_objext
14391if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014392 (eval $ac_compile) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014393 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014394 grep -v '^ *+' conftest.er1 >conftest.err
14395 rm -f conftest.er1
14396 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14398 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014399 { ac_try='test -z "$ac_c_werror_flag"
14400 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14402 (eval $ac_try) 2>&5
14403 ac_status=$?
14404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14405 (exit $ac_status); }; } &&
14406 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014407 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14408 (eval $ac_try) 2>&5
14409 ac_status=$?
14410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14411 (exit $ac_status); }; }; then
14412
14413cat >>confdefs.h <<\_ACEOF
14414#define HAVE_INET_PTON 1
14415_ACEOF
14416
14417 echo "$as_me:$LINENO: result: yes" >&5
14418echo "${ECHO_T}yes" >&6
14419else
14420 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014421sed 's/^/| /' conftest.$ac_ext >&5
14422
Martin v. Löwise9416172003-05-03 10:12:45 +000014423echo "$as_me:$LINENO: result: no" >&5
14424echo "${ECHO_T}no" >&6
14425
14426fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014427rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014428
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014429# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000014430echo "$as_me:$LINENO: checking for setgroups" >&5
14431echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
14432cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014433/* confdefs.h. */
14434_ACEOF
14435cat confdefs.h >>conftest.$ac_ext
14436cat >>conftest.$ac_ext <<_ACEOF
14437/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014438
14439#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014440#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014441#ifdef HAVE_GRP_H
14442#include <grp.h>
14443#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000014444
Martin v. Löwisd5843682002-11-21 20:41:28 +000014445int
14446main ()
14447{
14448void* p = setgroups
14449 ;
14450 return 0;
14451}
14452_ACEOF
14453rm -f conftest.$ac_objext
14454if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014455 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000014456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014457 grep -v '^ *+' conftest.er1 >conftest.err
14458 rm -f conftest.er1
14459 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000014460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14461 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014462 { ac_try='test -z "$ac_c_werror_flag"
14463 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014464 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14465 (eval $ac_try) 2>&5
14466 ac_status=$?
14467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14468 (exit $ac_status); }; } &&
14469 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000014470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14471 (eval $ac_try) 2>&5
14472 ac_status=$?
14473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14474 (exit $ac_status); }; }; then
14475
14476cat >>confdefs.h <<\_ACEOF
14477#define HAVE_SETGROUPS 1
14478_ACEOF
14479
14480 echo "$as_me:$LINENO: result: yes" >&5
14481echo "${ECHO_T}yes" >&6
14482else
14483 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014484sed 's/^/| /' conftest.$ac_ext >&5
14485
Martin v. Löwisd5843682002-11-21 20:41:28 +000014486echo "$as_me:$LINENO: result: no" >&5
14487echo "${ECHO_T}no" >&6
14488
14489fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014490rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014491
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014492# check for openpty and forkpty
14493
Martin v. Löwis11437992002-04-12 09:54:03 +000014494
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014495for ac_func in openpty
14496do
Martin v. Löwis11437992002-04-12 09:54:03 +000014497as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14498echo "$as_me:$LINENO: checking for $ac_func" >&5
14499echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14500if eval "test \"\${$as_ac_var+set}\" = set"; then
14501 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014502else
Martin v. Löwis11437992002-04-12 09:54:03 +000014503 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014504/* confdefs.h. */
14505_ACEOF
14506cat confdefs.h >>conftest.$ac_ext
14507cat >>conftest.$ac_ext <<_ACEOF
14508/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014509/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014510 which can conflict with char $ac_func (); below.
14511 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014512 <limits.h> exists even on freestanding compilers. Under hpux,
14513 including <limits.h> includes <sys/time.h> and causes problems
14514 checking for functions defined therein. */
14515#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014516# include <limits.h>
14517#else
14518# include <assert.h>
14519#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014520/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014521#ifdef __cplusplus
14522extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014523{
Martin v. Löwis11437992002-04-12 09:54:03 +000014524#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014525/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014526 builtin and then its argument prototype would still apply. */
14527char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014528/* The GNU C library defines this for functions which it implements
14529 to always fail with ENOSYS. Some functions are actually named
14530 something starting with __ and the normal name is an alias. */
14531#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14532choke me
14533#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014534char (*f) () = $ac_func;
14535#endif
14536#ifdef __cplusplus
14537}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014538#endif
14539
Skip Montanaro6dead952003-09-25 14:50:04 +000014540int
14541main ()
14542{
14543return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014544 ;
14545 return 0;
14546}
14547_ACEOF
14548rm -f conftest.$ac_objext conftest$ac_exeext
14549if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014550 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014551 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014552 grep -v '^ *+' conftest.er1 >conftest.err
14553 rm -f conftest.er1
14554 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014555 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14556 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014557 { ac_try='test -z "$ac_c_werror_flag"
14558 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014559 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14560 (eval $ac_try) 2>&5
14561 ac_status=$?
14562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14563 (exit $ac_status); }; } &&
14564 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14566 (eval $ac_try) 2>&5
14567 ac_status=$?
14568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14569 (exit $ac_status); }; }; then
14570 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014571else
Martin v. Löwis11437992002-04-12 09:54:03 +000014572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014573sed 's/^/| /' conftest.$ac_ext >&5
14574
Martin v. Löwis11437992002-04-12 09:54:03 +000014575eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014576fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014577rm -f conftest.err conftest.$ac_objext \
14578 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014579fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014580echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14581echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14582if test `eval echo '${'$as_ac_var'}'` = yes; then
14583 cat >>confdefs.h <<_ACEOF
14584#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14585_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014586
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014587else
Martin v. Löwis11437992002-04-12 09:54:03 +000014588 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
14589echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14590if test "${ac_cv_lib_util_openpty+set}" = set; then
14591 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014592else
Martin v. Löwis11437992002-04-12 09:54:03 +000014593 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014594LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014595cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014596/* confdefs.h. */
14597_ACEOF
14598cat confdefs.h >>conftest.$ac_ext
14599cat >>conftest.$ac_ext <<_ACEOF
14600/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014601
Fred Drake8cef4cf2000-06-28 16:40:38 +000014602/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014603#ifdef __cplusplus
14604extern "C"
14605#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014606/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014607 builtin and then its argument prototype would still apply. */
14608char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014609int
14610main ()
14611{
14612openpty ();
14613 ;
14614 return 0;
14615}
14616_ACEOF
14617rm -f conftest.$ac_objext conftest$ac_exeext
14618if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014619 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014620 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014621 grep -v '^ *+' conftest.er1 >conftest.err
14622 rm -f conftest.er1
14623 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014624 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14625 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014626 { ac_try='test -z "$ac_c_werror_flag"
14627 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014628 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14629 (eval $ac_try) 2>&5
14630 ac_status=$?
14631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14632 (exit $ac_status); }; } &&
14633 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14635 (eval $ac_try) 2>&5
14636 ac_status=$?
14637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14638 (exit $ac_status); }; }; then
14639 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014640else
Martin v. Löwis11437992002-04-12 09:54:03 +000014641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014642sed 's/^/| /' conftest.$ac_ext >&5
14643
Martin v. Löwis11437992002-04-12 09:54:03 +000014644ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014645fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014646rm -f conftest.err conftest.$ac_objext \
14647 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014648LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014649fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014650echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
14651echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14652if test $ac_cv_lib_util_openpty = yes; then
14653 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014654#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014655_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014656 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014657fi
14658
14659fi
14660done
14661
Martin v. Löwis11437992002-04-12 09:54:03 +000014662
Fred Drake8cef4cf2000-06-28 16:40:38 +000014663for ac_func in forkpty
14664do
Martin v. Löwis11437992002-04-12 09:54:03 +000014665as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14666echo "$as_me:$LINENO: checking for $ac_func" >&5
14667echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14668if eval "test \"\${$as_ac_var+set}\" = set"; then
14669 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014670else
Martin v. Löwis11437992002-04-12 09:54:03 +000014671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014672/* confdefs.h. */
14673_ACEOF
14674cat confdefs.h >>conftest.$ac_ext
14675cat >>conftest.$ac_ext <<_ACEOF
14676/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000014677/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014678 which can conflict with char $ac_func (); below.
14679 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014680 <limits.h> exists even on freestanding compilers. Under hpux,
14681 including <limits.h> includes <sys/time.h> and causes problems
14682 checking for functions defined therein. */
14683#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014684# include <limits.h>
14685#else
14686# include <assert.h>
14687#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014688/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014689#ifdef __cplusplus
14690extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014691{
Martin v. Löwis11437992002-04-12 09:54:03 +000014692#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014693/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014694 builtin and then its argument prototype would still apply. */
14695char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000014696/* The GNU C library defines this for functions which it implements
14697 to always fail with ENOSYS. Some functions are actually named
14698 something starting with __ and the normal name is an alias. */
14699#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14700choke me
14701#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014702char (*f) () = $ac_func;
14703#endif
14704#ifdef __cplusplus
14705}
Fred Drake8cef4cf2000-06-28 16:40:38 +000014706#endif
14707
Skip Montanaro6dead952003-09-25 14:50:04 +000014708int
14709main ()
14710{
14711return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014712 ;
14713 return 0;
14714}
14715_ACEOF
14716rm -f conftest.$ac_objext conftest$ac_exeext
14717if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014718 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014719 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014720 grep -v '^ *+' conftest.er1 >conftest.err
14721 rm -f conftest.er1
14722 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14724 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014725 { ac_try='test -z "$ac_c_werror_flag"
14726 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14728 (eval $ac_try) 2>&5
14729 ac_status=$?
14730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14731 (exit $ac_status); }; } &&
14732 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014733 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14734 (eval $ac_try) 2>&5
14735 ac_status=$?
14736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14737 (exit $ac_status); }; }; then
14738 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014739else
Martin v. Löwis11437992002-04-12 09:54:03 +000014740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014741sed 's/^/| /' conftest.$ac_ext >&5
14742
Martin v. Löwis11437992002-04-12 09:54:03 +000014743eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014744fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014745rm -f conftest.err conftest.$ac_objext \
14746 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014747fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014748echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14749echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14750if test `eval echo '${'$as_ac_var'}'` = yes; then
14751 cat >>confdefs.h <<_ACEOF
14752#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14753_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014754
Fred Drake8cef4cf2000-06-28 16:40:38 +000014755else
Martin v. Löwis11437992002-04-12 09:54:03 +000014756 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
14757echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
14758if test "${ac_cv_lib_util_forkpty+set}" = set; then
14759 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014760else
Martin v. Löwis11437992002-04-12 09:54:03 +000014761 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014762LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014763cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014764/* confdefs.h. */
14765_ACEOF
14766cat confdefs.h >>conftest.$ac_ext
14767cat >>conftest.$ac_ext <<_ACEOF
14768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014769
Fred Drake8cef4cf2000-06-28 16:40:38 +000014770/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014771#ifdef __cplusplus
14772extern "C"
14773#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014774/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014775 builtin and then its argument prototype would still apply. */
14776char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014777int
14778main ()
14779{
14780forkpty ();
14781 ;
14782 return 0;
14783}
14784_ACEOF
14785rm -f conftest.$ac_objext conftest$ac_exeext
14786if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014787 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014788 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014789 grep -v '^ *+' conftest.er1 >conftest.err
14790 rm -f conftest.er1
14791 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14793 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014794 { ac_try='test -z "$ac_c_werror_flag"
14795 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014796 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14797 (eval $ac_try) 2>&5
14798 ac_status=$?
14799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14800 (exit $ac_status); }; } &&
14801 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14803 (eval $ac_try) 2>&5
14804 ac_status=$?
14805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14806 (exit $ac_status); }; }; then
14807 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014808else
Martin v. Löwis11437992002-04-12 09:54:03 +000014809 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014810sed 's/^/| /' conftest.$ac_ext >&5
14811
Martin v. Löwis11437992002-04-12 09:54:03 +000014812ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014813fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014814rm -f conftest.err conftest.$ac_objext \
14815 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014816LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014817fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014818echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
14819echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
14820if test $ac_cv_lib_util_forkpty = yes; then
14821 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014822#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014823_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014824 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014825fi
14826
14827fi
14828done
14829
Jack Jansendd19cf82001-12-06 22:36:17 +000014830
Michael W. Hudson54241132001-12-07 15:38:26 +000014831# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000014832
14833
14834
14835
14836
14837
Fred Drake8cef4cf2000-06-28 16:40:38 +000014838for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
14839do
Martin v. Löwis11437992002-04-12 09:54:03 +000014840as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14841echo "$as_me:$LINENO: checking for $ac_func" >&5
14842echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14843if eval "test \"\${$as_ac_var+set}\" = set"; then
14844 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014845else
Martin v. Löwis11437992002-04-12 09:54:03 +000014846 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014847/* confdefs.h. */
14848_ACEOF
14849cat confdefs.h >>conftest.$ac_ext
14850cat >>conftest.$ac_ext <<_ACEOF
14851/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014852/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014853 which can conflict with char $ac_func (); below.
14854 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014855 <limits.h> exists even on freestanding compilers. Under hpux,
14856 including <limits.h> includes <sys/time.h> and causes problems
14857 checking for functions defined therein. */
14858#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014859# include <limits.h>
14860#else
14861# include <assert.h>
14862#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014863/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014864#ifdef __cplusplus
14865extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014866{
Martin v. Löwis11437992002-04-12 09:54:03 +000014867#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014868/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014869 builtin and then its argument prototype would still apply. */
14870char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014871/* The GNU C library defines this for functions which it implements
14872 to always fail with ENOSYS. Some functions are actually named
14873 something starting with __ and the normal name is an alias. */
14874#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14875choke me
14876#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014877char (*f) () = $ac_func;
14878#endif
14879#ifdef __cplusplus
14880}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014881#endif
14882
Skip Montanaro6dead952003-09-25 14:50:04 +000014883int
14884main ()
14885{
14886return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014887 ;
14888 return 0;
14889}
14890_ACEOF
14891rm -f conftest.$ac_objext conftest$ac_exeext
14892if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014893 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014895 grep -v '^ *+' conftest.er1 >conftest.err
14896 rm -f conftest.er1
14897 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14899 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000014900 { ac_try='test -z "$ac_c_werror_flag"
14901 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014902 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14903 (eval $ac_try) 2>&5
14904 ac_status=$?
14905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14906 (exit $ac_status); }; } &&
14907 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14909 (eval $ac_try) 2>&5
14910 ac_status=$?
14911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14912 (exit $ac_status); }; }; then
14913 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014914else
Martin v. Löwis11437992002-04-12 09:54:03 +000014915 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014916sed 's/^/| /' conftest.$ac_ext >&5
14917
Martin v. Löwis11437992002-04-12 09:54:03 +000014918eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014919fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014920rm -f conftest.err conftest.$ac_objext \
14921 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014922fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014923echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14924echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14925if test `eval echo '${'$as_ac_var'}'` = yes; then
14926 cat >>confdefs.h <<_ACEOF
14927#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14928_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014929
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014930fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014931done
14932
Michael W. Hudson54241132001-12-07 15:38:26 +000014933
Martin v. Löwis11437992002-04-12 09:54:03 +000014934
14935
14936
14937
14938
Martin v. Löwis1142de32002-03-29 16:28:31 +000014939for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000014940do
Martin v. Löwis11437992002-04-12 09:54:03 +000014941as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14942echo "$as_me:$LINENO: checking for $ac_func" >&5
14943echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14944if eval "test \"\${$as_ac_var+set}\" = set"; then
14945 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014946else
Martin v. Löwis11437992002-04-12 09:54:03 +000014947 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014948/* confdefs.h. */
14949_ACEOF
14950cat confdefs.h >>conftest.$ac_ext
14951cat >>conftest.$ac_ext <<_ACEOF
14952/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014953/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014954 which can conflict with char $ac_func (); below.
14955 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014956 <limits.h> exists even on freestanding compilers. Under hpux,
14957 including <limits.h> includes <sys/time.h> and causes problems
14958 checking for functions defined therein. */
14959#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014960# include <limits.h>
14961#else
14962# include <assert.h>
14963#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014964/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014965#ifdef __cplusplus
14966extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014967{
Martin v. Löwis11437992002-04-12 09:54:03 +000014968#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014969/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014970 builtin and then its argument prototype would still apply. */
14971char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000014972/* The GNU C library defines this for functions which it implements
14973 to always fail with ENOSYS. Some functions are actually named
14974 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014975#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000014976choke me
14977#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014978char (*f) () = $ac_func;
14979#endif
14980#ifdef __cplusplus
14981}
Guido van Rossum627b2d71993-12-24 10:39:16 +000014982#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014983
Skip Montanaro6dead952003-09-25 14:50:04 +000014984int
14985main ()
14986{
14987return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014988 ;
14989 return 0;
14990}
14991_ACEOF
14992rm -f conftest.$ac_objext conftest$ac_exeext
14993if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014994 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014996 grep -v '^ *+' conftest.er1 >conftest.err
14997 rm -f conftest.er1
14998 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15000 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015001 { ac_try='test -z "$ac_c_werror_flag"
15002 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015003 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15004 (eval $ac_try) 2>&5
15005 ac_status=$?
15006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15007 (exit $ac_status); }; } &&
15008 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015009 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15010 (eval $ac_try) 2>&5
15011 ac_status=$?
15012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15013 (exit $ac_status); }; }; then
15014 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015015else
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015017sed 's/^/| /' conftest.$ac_ext >&5
15018
Martin v. Löwis11437992002-04-12 09:54:03 +000015019eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000015020fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015021rm -f conftest.err conftest.$ac_objext \
15022 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000015023fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015024echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15025echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15026if test `eval echo '${'$as_ac_var'}'` = yes; then
15027 cat >>confdefs.h <<_ACEOF
15028#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15029_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000015030
Martin v. Löwis1142de32002-03-29 16:28:31 +000015031else
Skip Montanarof0d5f792004-08-15 14:08:23 +000015032 case $LIBOBJS in
15033 "$ac_func.$ac_objext" | \
15034 *" $ac_func.$ac_objext" | \
15035 "$ac_func.$ac_objext "* | \
15036 *" $ac_func.$ac_objext "* ) ;;
15037 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
15038esac
15039
Martin v. Löwis1142de32002-03-29 16:28:31 +000015040fi
15041done
15042
15043
Martin v. Löwis11437992002-04-12 09:54:03 +000015044
Martin v. Löwis1142de32002-03-29 16:28:31 +000015045for ac_func in getpgrp
15046do
Martin v. Löwis11437992002-04-12 09:54:03 +000015047as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15048echo "$as_me:$LINENO: checking for $ac_func" >&5
15049echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15050if eval "test \"\${$as_ac_var+set}\" = set"; then
15051 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000015052else
Martin v. Löwis11437992002-04-12 09:54:03 +000015053 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015054/* confdefs.h. */
15055_ACEOF
15056cat confdefs.h >>conftest.$ac_ext
15057cat >>conftest.$ac_ext <<_ACEOF
15058/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000015059/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015060 which can conflict with char $ac_func (); below.
15061 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015062 <limits.h> exists even on freestanding compilers. Under hpux,
15063 including <limits.h> includes <sys/time.h> and causes problems
15064 checking for functions defined therein. */
15065#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015066# include <limits.h>
15067#else
15068# include <assert.h>
15069#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015070/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015071#ifdef __cplusplus
15072extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015073{
Martin v. Löwis11437992002-04-12 09:54:03 +000015074#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015075/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015076 builtin and then its argument prototype would still apply. */
15077char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000015078/* The GNU C library defines this for functions which it implements
15079 to always fail with ENOSYS. Some functions are actually named
15080 something starting with __ and the normal name is an alias. */
15081#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15082choke me
15083#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015084char (*f) () = $ac_func;
15085#endif
15086#ifdef __cplusplus
15087}
Martin v. Löwis1142de32002-03-29 16:28:31 +000015088#endif
15089
Skip Montanaro6dead952003-09-25 14:50:04 +000015090int
15091main ()
15092{
15093return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015094 ;
15095 return 0;
15096}
15097_ACEOF
15098rm -f conftest.$ac_objext conftest$ac_exeext
15099if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015100 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015101 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015102 grep -v '^ *+' conftest.er1 >conftest.err
15103 rm -f conftest.er1
15104 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15106 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015107 { ac_try='test -z "$ac_c_werror_flag"
15108 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15110 (eval $ac_try) 2>&5
15111 ac_status=$?
15112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15113 (exit $ac_status); }; } &&
15114 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15116 (eval $ac_try) 2>&5
15117 ac_status=$?
15118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15119 (exit $ac_status); }; }; then
15120 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015121else
Martin v. Löwis11437992002-04-12 09:54:03 +000015122 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015123sed 's/^/| /' conftest.$ac_ext >&5
15124
Martin v. Löwis11437992002-04-12 09:54:03 +000015125eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015126fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015127rm -f conftest.err conftest.$ac_objext \
15128 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015129fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015130echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15131echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15132if test `eval echo '${'$as_ac_var'}'` = yes; then
15133 cat >>confdefs.h <<_ACEOF
15134#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15135_ACEOF
15136 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015137/* confdefs.h. */
15138_ACEOF
15139cat confdefs.h >>conftest.$ac_ext
15140cat >>conftest.$ac_ext <<_ACEOF
15141/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015142#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015143int
15144main ()
15145{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015146getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015147 ;
15148 return 0;
15149}
15150_ACEOF
15151rm -f conftest.$ac_objext
15152if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015153 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015155 grep -v '^ *+' conftest.er1 >conftest.err
15156 rm -f conftest.er1
15157 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15159 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015160 { ac_try='test -z "$ac_c_werror_flag"
15161 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15163 (eval $ac_try) 2>&5
15164 ac_status=$?
15165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15166 (exit $ac_status); }; } &&
15167 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15169 (eval $ac_try) 2>&5
15170 ac_status=$?
15171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15172 (exit $ac_status); }; }; then
15173
15174cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015175#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015176_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015177
Martin v. Löwis11437992002-04-12 09:54:03 +000015178
Guido van Rossumf78abae1997-01-21 22:02:36 +000015179else
Martin v. Löwis11437992002-04-12 09:54:03 +000015180 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015181sed 's/^/| /' conftest.$ac_ext >&5
15182
Guido van Rossum627b2d71993-12-24 10:39:16 +000015183fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015184rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015185
Guido van Rossum627b2d71993-12-24 10:39:16 +000015186fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015187done
Guido van Rossum627b2d71993-12-24 10:39:16 +000015188
Jack Jansen150753c2003-03-29 22:07:47 +000015189
15190for ac_func in setpgrp
15191do
15192as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15193echo "$as_me:$LINENO: checking for $ac_func" >&5
15194echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15195if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015196 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015197else
Martin v. Löwis11437992002-04-12 09:54:03 +000015198 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015199/* confdefs.h. */
15200_ACEOF
15201cat confdefs.h >>conftest.$ac_ext
15202cat >>conftest.$ac_ext <<_ACEOF
15203/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015204/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015205 which can conflict with char $ac_func (); below.
15206 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015207 <limits.h> exists even on freestanding compilers. Under hpux,
15208 including <limits.h> includes <sys/time.h> and causes problems
15209 checking for functions defined therein. */
15210#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015211# include <limits.h>
15212#else
15213# include <assert.h>
15214#endif
Jack Jansen150753c2003-03-29 22:07:47 +000015215/* Override any gcc2 internal prototype to avoid an error. */
15216#ifdef __cplusplus
15217extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015218{
Martin v. Löwis11437992002-04-12 09:54:03 +000015219#endif
Jack Jansen150753c2003-03-29 22:07:47 +000015220/* We use char because int might match the return type of a gcc2
15221 builtin and then its argument prototype would still apply. */
15222char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000015223/* The GNU C library defines this for functions which it implements
15224 to always fail with ENOSYS. Some functions are actually named
15225 something starting with __ and the normal name is an alias. */
15226#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15227choke me
15228#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015229char (*f) () = $ac_func;
15230#endif
15231#ifdef __cplusplus
15232}
Jack Jansen150753c2003-03-29 22:07:47 +000015233#endif
15234
Skip Montanaro6dead952003-09-25 14:50:04 +000015235int
15236main ()
15237{
15238return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015239 ;
15240 return 0;
15241}
15242_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000015243rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000015244if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015245 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015246 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015247 grep -v '^ *+' conftest.er1 >conftest.err
15248 rm -f conftest.er1
15249 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000015251 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015252 { ac_try='test -z "$ac_c_werror_flag"
15253 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15255 (eval $ac_try) 2>&5
15256 ac_status=$?
15257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15258 (exit $ac_status); }; } &&
15259 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15261 (eval $ac_try) 2>&5
15262 ac_status=$?
15263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15264 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000015265 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015266else
Jack Jansen150753c2003-03-29 22:07:47 +000015267 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015268sed 's/^/| /' conftest.$ac_ext >&5
15269
Jack Jansen150753c2003-03-29 22:07:47 +000015270eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015271fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015272rm -f conftest.err conftest.$ac_objext \
15273 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015274fi
Jack Jansen150753c2003-03-29 22:07:47 +000015275echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15276echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15277if test `eval echo '${'$as_ac_var'}'` = yes; then
15278 cat >>confdefs.h <<_ACEOF
15279#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15280_ACEOF
15281 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015282/* confdefs.h. */
15283_ACEOF
15284cat confdefs.h >>conftest.$ac_ext
15285cat >>conftest.$ac_ext <<_ACEOF
15286/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015287#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000015288int
15289main ()
15290{
15291setpgrp(0,0);
15292 ;
15293 return 0;
15294}
15295_ACEOF
15296rm -f conftest.$ac_objext
15297if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015298 (eval $ac_compile) 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000015299 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015300 grep -v '^ *+' conftest.er1 >conftest.err
15301 rm -f conftest.er1
15302 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000015303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15304 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015305 { ac_try='test -z "$ac_c_werror_flag"
15306 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015307 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15308 (eval $ac_try) 2>&5
15309 ac_status=$?
15310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15311 (exit $ac_status); }; } &&
15312 { ac_try='test -s conftest.$ac_objext'
Jack Jansen150753c2003-03-29 22:07:47 +000015313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15314 (eval $ac_try) 2>&5
15315 ac_status=$?
15316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15317 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015318
15319cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000015320#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015321_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015322
Jack Jansen150753c2003-03-29 22:07:47 +000015323
15324else
15325 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015326sed 's/^/| /' conftest.$ac_ext >&5
15327
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015328fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015329rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000015330
15331fi
15332done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015333
Martin v. Löwis11437992002-04-12 09:54:03 +000015334
Thomas Wouters3a584202000-08-05 23:28:51 +000015335for ac_func in gettimeofday
15336do
Martin v. Löwis11437992002-04-12 09:54:03 +000015337as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15338echo "$as_me:$LINENO: checking for $ac_func" >&5
15339echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15340if eval "test \"\${$as_ac_var+set}\" = set"; then
15341 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015342else
Martin v. Löwis11437992002-04-12 09:54:03 +000015343 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015344/* confdefs.h. */
15345_ACEOF
15346cat confdefs.h >>conftest.$ac_ext
15347cat >>conftest.$ac_ext <<_ACEOF
15348/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015349/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015350 which can conflict with char $ac_func (); below.
15351 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015352 <limits.h> exists even on freestanding compilers. Under hpux,
15353 including <limits.h> includes <sys/time.h> and causes problems
15354 checking for functions defined therein. */
15355#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015356# include <limits.h>
15357#else
15358# include <assert.h>
15359#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015360/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015361#ifdef __cplusplus
15362extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015363{
Martin v. Löwis11437992002-04-12 09:54:03 +000015364#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015365/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015366 builtin and then its argument prototype would still apply. */
15367char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015368/* The GNU C library defines this for functions which it implements
15369 to always fail with ENOSYS. Some functions are actually named
15370 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015371#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015372choke me
15373#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015374char (*f) () = $ac_func;
15375#endif
15376#ifdef __cplusplus
15377}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015378#endif
15379
Skip Montanaro6dead952003-09-25 14:50:04 +000015380int
15381main ()
15382{
15383return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015384 ;
15385 return 0;
15386}
15387_ACEOF
15388rm -f conftest.$ac_objext conftest$ac_exeext
15389if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015390 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015392 grep -v '^ *+' conftest.er1 >conftest.err
15393 rm -f conftest.er1
15394 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15396 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015397 { ac_try='test -z "$ac_c_werror_flag"
15398 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15400 (eval $ac_try) 2>&5
15401 ac_status=$?
15402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15403 (exit $ac_status); }; } &&
15404 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15406 (eval $ac_try) 2>&5
15407 ac_status=$?
15408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15409 (exit $ac_status); }; }; then
15410 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015411else
Martin v. Löwis11437992002-04-12 09:54:03 +000015412 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015413sed 's/^/| /' conftest.$ac_ext >&5
15414
Martin v. Löwis11437992002-04-12 09:54:03 +000015415eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015416fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015417rm -f conftest.err conftest.$ac_objext \
15418 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015419fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015420echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15421echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15422if test `eval echo '${'$as_ac_var'}'` = yes; then
15423 cat >>confdefs.h <<_ACEOF
15424#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15425_ACEOF
15426 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015427/* confdefs.h. */
15428_ACEOF
15429cat confdefs.h >>conftest.$ac_ext
15430cat >>conftest.$ac_ext <<_ACEOF
15431/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015432#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015433int
15434main ()
15435{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015436gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015437 ;
15438 return 0;
15439}
15440_ACEOF
15441rm -f conftest.$ac_objext
15442if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015443 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015444 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015445 grep -v '^ *+' conftest.er1 >conftest.err
15446 rm -f conftest.er1
15447 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15449 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015450 { ac_try='test -z "$ac_c_werror_flag"
15451 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015452 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15453 (eval $ac_try) 2>&5
15454 ac_status=$?
15455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15456 (exit $ac_status); }; } &&
15457 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015458 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15459 (eval $ac_try) 2>&5
15460 ac_status=$?
15461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15462 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015463 :
15464else
Martin v. Löwis11437992002-04-12 09:54:03 +000015465 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015466sed 's/^/| /' conftest.$ac_ext >&5
15467
Martin v. Löwis11437992002-04-12 09:54:03 +000015468
15469cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015470#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015471_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015472
Martin v. Löwis11437992002-04-12 09:54:03 +000015473
Guido van Rossum627b2d71993-12-24 10:39:16 +000015474fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015475rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015476
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015477fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015478done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015479
Michael W. Hudson54241132001-12-07 15:38:26 +000015480
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015481echo "$as_me:$LINENO: checking for major" >&5
15482echo $ECHO_N "checking for major... $ECHO_C" >&6
15483cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015484/* confdefs.h. */
15485_ACEOF
15486cat confdefs.h >>conftest.$ac_ext
15487cat >>conftest.$ac_ext <<_ACEOF
15488/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015489
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015490#if defined(MAJOR_IN_MKDEV)
15491#include <sys/mkdev.h>
15492#elif defined(MAJOR_IN_SYSMACROS)
15493#include <sys/sysmacros.h>
15494#else
15495#include <sys/types.h>
15496#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015497
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015498int
15499main ()
15500{
15501
15502 makedev(major(0),minor(0));
15503
15504 ;
15505 return 0;
15506}
15507_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000015508rm -f conftest.$ac_objext conftest$ac_exeext
15509if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015510 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015511 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015512 grep -v '^ *+' conftest.er1 >conftest.err
15513 rm -f conftest.er1
15514 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15516 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015517 { ac_try='test -z "$ac_c_werror_flag"
15518 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15520 (eval $ac_try) 2>&5
15521 ac_status=$?
15522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15523 (exit $ac_status); }; } &&
15524 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015525 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15526 (eval $ac_try) 2>&5
15527 ac_status=$?
15528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15529 (exit $ac_status); }; }; then
15530
15531
15532cat >>confdefs.h <<\_ACEOF
15533#define HAVE_DEVICE_MACROS 1
15534_ACEOF
15535
15536 echo "$as_me:$LINENO: result: yes" >&5
15537echo "${ECHO_T}yes" >&6
15538
15539else
15540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015541sed 's/^/| /' conftest.$ac_ext >&5
15542
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015543
15544 echo "$as_me:$LINENO: result: no" >&5
15545echo "${ECHO_T}no" >&6
15546
15547fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015548rm -f conftest.err conftest.$ac_objext \
15549 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015550
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015551# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000015552# for [no]getaddrinfo in netdb.h.
15553echo "$as_me:$LINENO: checking for getaddrinfo" >&5
15554echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
15555cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015556/* confdefs.h. */
15557_ACEOF
15558cat confdefs.h >>conftest.$ac_ext
15559cat >>conftest.$ac_ext <<_ACEOF
15560/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015561
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015562#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015563#include <sys/socket.h>
15564#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015565#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015566
Martin v. Löwis11437992002-04-12 09:54:03 +000015567int
15568main ()
15569{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015570
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015571getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015572
Martin v. Löwis11437992002-04-12 09:54:03 +000015573 ;
15574 return 0;
15575}
15576_ACEOF
15577rm -f conftest.$ac_objext conftest$ac_exeext
15578if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015579 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015581 grep -v '^ *+' conftest.er1 >conftest.err
15582 rm -f conftest.er1
15583 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15585 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015586 { ac_try='test -z "$ac_c_werror_flag"
15587 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015588 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15589 (eval $ac_try) 2>&5
15590 ac_status=$?
15591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15592 (exit $ac_status); }; } &&
15593 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15595 (eval $ac_try) 2>&5
15596 ac_status=$?
15597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15598 (exit $ac_status); }; }; then
15599
15600echo "$as_me:$LINENO: result: yes" >&5
15601echo "${ECHO_T}yes" >&6
15602echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
15603echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015604if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015605 echo "$as_me:$LINENO: result: buggy" >&5
15606echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015607buggygetaddrinfo=yes
15608else
Martin v. Löwis11437992002-04-12 09:54:03 +000015609 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015610/* confdefs.h. */
15611_ACEOF
15612cat confdefs.h >>conftest.$ac_ext
15613cat >>conftest.$ac_ext <<_ACEOF
15614/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015615
15616#include <sys/types.h>
15617#include <netdb.h>
15618#include <string.h>
15619#include <sys/socket.h>
15620#include <netinet/in.h>
15621
15622main()
15623{
15624 int passive, gaierr, inet4 = 0, inet6 = 0;
15625 struct addrinfo hints, *ai, *aitop;
15626 char straddr[INET6_ADDRSTRLEN], strport[16];
15627
15628 for (passive = 0; passive <= 1; passive++) {
15629 memset(&hints, 0, sizeof(hints));
15630 hints.ai_family = AF_UNSPEC;
15631 hints.ai_flags = passive ? AI_PASSIVE : 0;
15632 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000015633 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015634 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
15635 (void)gai_strerror(gaierr);
15636 goto bad;
15637 }
15638 for (ai = aitop; ai; ai = ai->ai_next) {
15639 if (ai->ai_addr == NULL ||
15640 ai->ai_addrlen == 0 ||
15641 getnameinfo(ai->ai_addr, ai->ai_addrlen,
15642 straddr, sizeof(straddr), strport, sizeof(strport),
15643 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
15644 goto bad;
15645 }
15646 switch (ai->ai_family) {
15647 case AF_INET:
15648 if (strcmp(strport, "54321") != 0) {
15649 goto bad;
15650 }
15651 if (passive) {
15652 if (strcmp(straddr, "0.0.0.0") != 0) {
15653 goto bad;
15654 }
15655 } else {
15656 if (strcmp(straddr, "127.0.0.1") != 0) {
15657 goto bad;
15658 }
15659 }
15660 inet4++;
15661 break;
15662 case AF_INET6:
15663 if (strcmp(strport, "54321") != 0) {
15664 goto bad;
15665 }
15666 if (passive) {
15667 if (strcmp(straddr, "::") != 0) {
15668 goto bad;
15669 }
15670 } else {
15671 if (strcmp(straddr, "::1") != 0) {
15672 goto bad;
15673 }
15674 }
15675 inet6++;
15676 break;
15677 case AF_UNSPEC:
15678 goto bad;
15679 break;
15680 default:
15681 /* another family support? */
15682 break;
15683 }
15684 }
15685 }
15686
15687 if (!(inet4 == 0 || inet4 == 2))
15688 goto bad;
15689 if (!(inet6 == 0 || inet6 == 2))
15690 goto bad;
15691
15692 if (aitop)
15693 freeaddrinfo(aitop);
15694 exit(0);
15695
15696 bad:
15697 if (aitop)
15698 freeaddrinfo(aitop);
15699 exit(1);
15700}
15701
Martin v. Löwis11437992002-04-12 09:54:03 +000015702_ACEOF
15703rm -f conftest$ac_exeext
15704if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15705 (eval $ac_link) 2>&5
15706 ac_status=$?
15707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15708 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15709 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15710 (eval $ac_try) 2>&5
15711 ac_status=$?
15712 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15713 (exit $ac_status); }; }; then
15714 echo "$as_me:$LINENO: result: good" >&5
15715echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015716buggygetaddrinfo=no
15717else
Martin v. Löwis11437992002-04-12 09:54:03 +000015718 echo "$as_me: program exited with status $ac_status" >&5
15719echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015720sed 's/^/| /' conftest.$ac_ext >&5
15721
Martin v. Löwis11437992002-04-12 09:54:03 +000015722( exit $ac_status )
15723echo "$as_me:$LINENO: result: buggy" >&5
15724echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015725buggygetaddrinfo=yes
15726fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015727rm -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 +000015728fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015729else
Martin v. Löwis11437992002-04-12 09:54:03 +000015730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015731sed 's/^/| /' conftest.$ac_ext >&5
15732
Martin v. Löwis11437992002-04-12 09:54:03 +000015733
15734echo "$as_me:$LINENO: result: no" >&5
15735echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015736buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015737
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015738fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015739rm -f conftest.err conftest.$ac_objext \
15740 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015741
15742if test "$buggygetaddrinfo" = "yes"; then
15743 if test "$ipv6" = "yes"; then
15744 echo 'Fatal: You must get working getaddrinfo() function.'
15745 echo ' or you can specify "--disable-ipv6"'.
15746 exit 1
15747 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015748else
Martin v. Löwis11437992002-04-12 09:54:03 +000015749
15750cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015751#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015752_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015753
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015754fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015755
Jack Jansen9a66b6d2001-08-08 13:56:14 +000015756for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015757do
Martin v. Löwis11437992002-04-12 09:54:03 +000015758as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15759echo "$as_me:$LINENO: checking for $ac_func" >&5
15760echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15761if eval "test \"\${$as_ac_var+set}\" = set"; then
15762 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015763else
Martin v. Löwis11437992002-04-12 09:54:03 +000015764 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015765/* confdefs.h. */
15766_ACEOF
15767cat confdefs.h >>conftest.$ac_ext
15768cat >>conftest.$ac_ext <<_ACEOF
15769/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015770/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015771 which can conflict with char $ac_func (); below.
15772 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015773 <limits.h> exists even on freestanding compilers. Under hpux,
15774 including <limits.h> includes <sys/time.h> and causes problems
15775 checking for functions defined therein. */
15776#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015777# include <limits.h>
15778#else
15779# include <assert.h>
15780#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015781/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015782#ifdef __cplusplus
15783extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015784{
Martin v. Löwis11437992002-04-12 09:54:03 +000015785#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015786/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015787 builtin and then its argument prototype would still apply. */
15788char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015789/* The GNU C library defines this for functions which it implements
15790 to always fail with ENOSYS. Some functions are actually named
15791 something starting with __ and the normal name is an alias. */
15792#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15793choke me
15794#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015795char (*f) () = $ac_func;
15796#endif
15797#ifdef __cplusplus
15798}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015799#endif
15800
Skip Montanaro6dead952003-09-25 14:50:04 +000015801int
15802main ()
15803{
15804return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015805 ;
15806 return 0;
15807}
15808_ACEOF
15809rm -f conftest.$ac_objext conftest$ac_exeext
15810if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015811 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015813 grep -v '^ *+' conftest.er1 >conftest.err
15814 rm -f conftest.er1
15815 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15817 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015818 { ac_try='test -z "$ac_c_werror_flag"
15819 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15821 (eval $ac_try) 2>&5
15822 ac_status=$?
15823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15824 (exit $ac_status); }; } &&
15825 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15827 (eval $ac_try) 2>&5
15828 ac_status=$?
15829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15830 (exit $ac_status); }; }; then
15831 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015832else
Martin v. Löwis11437992002-04-12 09:54:03 +000015833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015834sed 's/^/| /' conftest.$ac_ext >&5
15835
Martin v. Löwis11437992002-04-12 09:54:03 +000015836eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015837fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015838rm -f conftest.err conftest.$ac_objext \
15839 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015840fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015841echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15842echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15843if test `eval echo '${'$as_ac_var'}'` = yes; then
15844 cat >>confdefs.h <<_ACEOF
15845#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15846_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015847
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015848fi
15849done
15850
Michael W. Hudson54241132001-12-07 15:38:26 +000015851
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015852# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000015853echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
15854echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15855if test "${ac_cv_header_time+set}" = set; then
15856 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015857else
Martin v. Löwis11437992002-04-12 09:54:03 +000015858 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015859/* confdefs.h. */
15860_ACEOF
15861cat confdefs.h >>conftest.$ac_ext
15862cat >>conftest.$ac_ext <<_ACEOF
15863/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015864#include <sys/types.h>
15865#include <sys/time.h>
15866#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015867
Martin v. Löwis11437992002-04-12 09:54:03 +000015868int
15869main ()
15870{
15871if ((struct tm *) 0)
15872return 0;
15873 ;
15874 return 0;
15875}
15876_ACEOF
15877rm -f conftest.$ac_objext
15878if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015879 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015880 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015881 grep -v '^ *+' conftest.er1 >conftest.err
15882 rm -f conftest.er1
15883 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15885 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015886 { ac_try='test -z "$ac_c_werror_flag"
15887 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15889 (eval $ac_try) 2>&5
15890 ac_status=$?
15891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15892 (exit $ac_status); }; } &&
15893 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015894 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15895 (eval $ac_try) 2>&5
15896 ac_status=$?
15897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15898 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015899 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015900else
Martin v. Löwis11437992002-04-12 09:54:03 +000015901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015902sed 's/^/| /' conftest.$ac_ext >&5
15903
Martin v. Löwis11437992002-04-12 09:54:03 +000015904ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015905fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015906rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015907fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015908echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
15909echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015910if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015911
15912cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015913#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015914_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015915
15916fi
15917
Martin v. Löwis11437992002-04-12 09:54:03 +000015918echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
15919echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
15920if test "${ac_cv_struct_tm+set}" = set; then
15921 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015922else
Martin v. Löwis11437992002-04-12 09:54:03 +000015923 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015924/* confdefs.h. */
15925_ACEOF
15926cat confdefs.h >>conftest.$ac_ext
15927cat >>conftest.$ac_ext <<_ACEOF
15928/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015929#include <sys/types.h>
15930#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015931
Martin v. Löwis11437992002-04-12 09:54:03 +000015932int
15933main ()
15934{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015935struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000015936 ;
15937 return 0;
15938}
15939_ACEOF
15940rm -f conftest.$ac_objext
15941if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015942 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015944 grep -v '^ *+' conftest.er1 >conftest.err
15945 rm -f conftest.er1
15946 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15948 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000015949 { ac_try='test -z "$ac_c_werror_flag"
15950 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15952 (eval $ac_try) 2>&5
15953 ac_status=$?
15954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15955 (exit $ac_status); }; } &&
15956 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15958 (eval $ac_try) 2>&5
15959 ac_status=$?
15960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15961 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015962 ac_cv_struct_tm=time.h
15963else
Martin v. Löwis11437992002-04-12 09:54:03 +000015964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015965sed 's/^/| /' conftest.$ac_ext >&5
15966
Martin v. Löwis11437992002-04-12 09:54:03 +000015967ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015968fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015969rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015970fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015971echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
15972echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015973if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015974
15975cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015976#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015977_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015978
15979fi
15980
Martin v. Löwis11437992002-04-12 09:54:03 +000015981echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
15982echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
15983if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
15984 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015985else
Martin v. Löwis11437992002-04-12 09:54:03 +000015986 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015987/* confdefs.h. */
15988_ACEOF
15989cat confdefs.h >>conftest.$ac_ext
15990cat >>conftest.$ac_ext <<_ACEOF
15991/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015992#include <sys/types.h>
15993#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000015994
15995
Martin v. Löwis11437992002-04-12 09:54:03 +000015996int
15997main ()
15998{
15999static struct tm ac_aggr;
16000if (ac_aggr.tm_zone)
16001return 0;
16002 ;
16003 return 0;
16004}
16005_ACEOF
16006rm -f conftest.$ac_objext
16007if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016008 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016010 grep -v '^ *+' conftest.er1 >conftest.err
16011 rm -f conftest.er1
16012 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16014 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016015 { ac_try='test -z "$ac_c_werror_flag"
16016 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016017 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16018 (eval $ac_try) 2>&5
16019 ac_status=$?
16020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16021 (exit $ac_status); }; } &&
16022 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16024 (eval $ac_try) 2>&5
16025 ac_status=$?
16026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16027 (exit $ac_status); }; }; then
16028 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016029else
Martin v. Löwis11437992002-04-12 09:54:03 +000016030 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016031sed 's/^/| /' conftest.$ac_ext >&5
16032
16033cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016034/* confdefs.h. */
16035_ACEOF
16036cat confdefs.h >>conftest.$ac_ext
16037cat >>conftest.$ac_ext <<_ACEOF
16038/* end confdefs.h. */
16039#include <sys/types.h>
16040#include <$ac_cv_struct_tm>
16041
16042
16043int
16044main ()
16045{
16046static struct tm ac_aggr;
16047if (sizeof ac_aggr.tm_zone)
16048return 0;
16049 ;
16050 return 0;
16051}
16052_ACEOF
16053rm -f conftest.$ac_objext
16054if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016055 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016056 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016057 grep -v '^ *+' conftest.er1 >conftest.err
16058 rm -f conftest.er1
16059 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16061 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016062 { ac_try='test -z "$ac_c_werror_flag"
16063 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016064 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16065 (eval $ac_try) 2>&5
16066 ac_status=$?
16067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16068 (exit $ac_status); }; } &&
16069 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16071 (eval $ac_try) 2>&5
16072 ac_status=$?
16073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16074 (exit $ac_status); }; }; then
16075 ac_cv_member_struct_tm_tm_zone=yes
16076else
16077 echo "$as_me: failed program was:" >&5
16078sed 's/^/| /' conftest.$ac_ext >&5
16079
Martin v. Löwis11437992002-04-12 09:54:03 +000016080ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016081fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016082rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016083fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016084rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016085fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016086echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
16087echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
16088if test $ac_cv_member_struct_tm_tm_zone = yes; then
16089
16090cat >>confdefs.h <<_ACEOF
16091#define HAVE_STRUCT_TM_TM_ZONE 1
16092_ACEOF
16093
16094
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016095fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016096
Martin v. Löwis11437992002-04-12 09:54:03 +000016097if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16098
16099cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016100#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016101_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016102
16103else
Martin v. Löwis11437992002-04-12 09:54:03 +000016104 echo "$as_me:$LINENO: checking for tzname" >&5
16105echo $ECHO_N "checking for tzname... $ECHO_C" >&6
16106if test "${ac_cv_var_tzname+set}" = set; then
16107 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016108else
Martin v. Löwis11437992002-04-12 09:54:03 +000016109 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016110/* confdefs.h. */
16111_ACEOF
16112cat confdefs.h >>conftest.$ac_ext
16113cat >>conftest.$ac_ext <<_ACEOF
16114/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016115#include <time.h>
16116#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016117extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016118#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016119
Martin v. Löwis11437992002-04-12 09:54:03 +000016120int
16121main ()
16122{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016123atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000016124 ;
16125 return 0;
16126}
16127_ACEOF
16128rm -f conftest.$ac_objext conftest$ac_exeext
16129if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016130 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016131 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016132 grep -v '^ *+' conftest.er1 >conftest.err
16133 rm -f conftest.er1
16134 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016135 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16136 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016137 { ac_try='test -z "$ac_c_werror_flag"
16138 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016139 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16140 (eval $ac_try) 2>&5
16141 ac_status=$?
16142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16143 (exit $ac_status); }; } &&
16144 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016145 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16146 (eval $ac_try) 2>&5
16147 ac_status=$?
16148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16149 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016150 ac_cv_var_tzname=yes
16151else
Martin v. Löwis11437992002-04-12 09:54:03 +000016152 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016153sed 's/^/| /' conftest.$ac_ext >&5
16154
Martin v. Löwis11437992002-04-12 09:54:03 +000016155ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016156fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016157rm -f conftest.err conftest.$ac_objext \
16158 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000016159fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016160echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
16161echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016162 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016163
16164cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016165#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016166_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016167
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016168 fi
16169fi
16170
Martin v. Löwis11437992002-04-12 09:54:03 +000016171echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
16172echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
16173if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
16174 echo $ECHO_N "(cached) $ECHO_C" >&6
16175else
16176 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016177/* confdefs.h. */
16178_ACEOF
16179cat confdefs.h >>conftest.$ac_ext
16180cat >>conftest.$ac_ext <<_ACEOF
16181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016182$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016183int
16184main ()
16185{
16186static struct stat ac_aggr;
16187if (ac_aggr.st_rdev)
16188return 0;
16189 ;
16190 return 0;
16191}
16192_ACEOF
16193rm -f conftest.$ac_objext
16194if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016195 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016197 grep -v '^ *+' conftest.er1 >conftest.err
16198 rm -f conftest.er1
16199 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16201 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016202 { ac_try='test -z "$ac_c_werror_flag"
16203 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16205 (eval $ac_try) 2>&5
16206 ac_status=$?
16207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16208 (exit $ac_status); }; } &&
16209 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16211 (eval $ac_try) 2>&5
16212 ac_status=$?
16213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16214 (exit $ac_status); }; }; then
16215 ac_cv_member_struct_stat_st_rdev=yes
16216else
16217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016218sed 's/^/| /' conftest.$ac_ext >&5
16219
16220cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016221/* confdefs.h. */
16222_ACEOF
16223cat confdefs.h >>conftest.$ac_ext
16224cat >>conftest.$ac_ext <<_ACEOF
16225/* end confdefs.h. */
16226$ac_includes_default
16227int
16228main ()
16229{
16230static struct stat ac_aggr;
16231if (sizeof ac_aggr.st_rdev)
16232return 0;
16233 ;
16234 return 0;
16235}
16236_ACEOF
16237rm -f conftest.$ac_objext
16238if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016239 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016240 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016241 grep -v '^ *+' conftest.er1 >conftest.err
16242 rm -f conftest.er1
16243 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16245 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016246 { ac_try='test -z "$ac_c_werror_flag"
16247 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016248 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16249 (eval $ac_try) 2>&5
16250 ac_status=$?
16251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16252 (exit $ac_status); }; } &&
16253 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16255 (eval $ac_try) 2>&5
16256 ac_status=$?
16257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16258 (exit $ac_status); }; }; then
16259 ac_cv_member_struct_stat_st_rdev=yes
16260else
16261 echo "$as_me: failed program was:" >&5
16262sed 's/^/| /' conftest.$ac_ext >&5
16263
Martin v. Löwis11437992002-04-12 09:54:03 +000016264ac_cv_member_struct_stat_st_rdev=no
16265fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016266rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016267fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016268rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016269fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016270echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
16271echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
16272if test $ac_cv_member_struct_stat_st_rdev = yes; then
16273
16274cat >>confdefs.h <<_ACEOF
16275#define HAVE_STRUCT_STAT_ST_RDEV 1
16276_ACEOF
16277
16278
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016279fi
16280
Martin v. Löwis11437992002-04-12 09:54:03 +000016281echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
16282echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
16283if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
16284 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016285else
Martin v. Löwis11437992002-04-12 09:54:03 +000016286 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016287/* confdefs.h. */
16288_ACEOF
16289cat confdefs.h >>conftest.$ac_ext
16290cat >>conftest.$ac_ext <<_ACEOF
16291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016292$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016293int
16294main ()
16295{
16296static struct stat ac_aggr;
16297if (ac_aggr.st_blksize)
16298return 0;
16299 ;
16300 return 0;
16301}
16302_ACEOF
16303rm -f conftest.$ac_objext
16304if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016305 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016306 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016307 grep -v '^ *+' conftest.er1 >conftest.err
16308 rm -f conftest.er1
16309 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16311 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016312 { ac_try='test -z "$ac_c_werror_flag"
16313 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016314 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16315 (eval $ac_try) 2>&5
16316 ac_status=$?
16317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16318 (exit $ac_status); }; } &&
16319 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016320 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16321 (eval $ac_try) 2>&5
16322 ac_status=$?
16323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16324 (exit $ac_status); }; }; then
16325 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016326else
Martin v. Löwis11437992002-04-12 09:54:03 +000016327 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016328sed 's/^/| /' conftest.$ac_ext >&5
16329
16330cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016331/* confdefs.h. */
16332_ACEOF
16333cat confdefs.h >>conftest.$ac_ext
16334cat >>conftest.$ac_ext <<_ACEOF
16335/* end confdefs.h. */
16336$ac_includes_default
16337int
16338main ()
16339{
16340static struct stat ac_aggr;
16341if (sizeof ac_aggr.st_blksize)
16342return 0;
16343 ;
16344 return 0;
16345}
16346_ACEOF
16347rm -f conftest.$ac_objext
16348if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016349 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016350 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016351 grep -v '^ *+' conftest.er1 >conftest.err
16352 rm -f conftest.er1
16353 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16355 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016356 { ac_try='test -z "$ac_c_werror_flag"
16357 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16359 (eval $ac_try) 2>&5
16360 ac_status=$?
16361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16362 (exit $ac_status); }; } &&
16363 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16365 (eval $ac_try) 2>&5
16366 ac_status=$?
16367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16368 (exit $ac_status); }; }; then
16369 ac_cv_member_struct_stat_st_blksize=yes
16370else
16371 echo "$as_me: failed program was:" >&5
16372sed 's/^/| /' conftest.$ac_ext >&5
16373
Martin v. Löwis11437992002-04-12 09:54:03 +000016374ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016375fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016376rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016377fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016378rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016379fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016380echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
16381echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
16382if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000016383
Martin v. Löwis11437992002-04-12 09:54:03 +000016384cat >>confdefs.h <<_ACEOF
16385#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
16386_ACEOF
16387
16388
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016389fi
16390
Martin v. Löwis11437992002-04-12 09:54:03 +000016391echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
16392echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
16393if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
16394 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016395else
Martin v. Löwis11437992002-04-12 09:54:03 +000016396 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016397/* confdefs.h. */
16398_ACEOF
16399cat confdefs.h >>conftest.$ac_ext
16400cat >>conftest.$ac_ext <<_ACEOF
16401/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016402$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016403int
16404main ()
16405{
16406static struct stat ac_aggr;
16407if (ac_aggr.st_blocks)
16408return 0;
16409 ;
16410 return 0;
16411}
16412_ACEOF
16413rm -f conftest.$ac_objext
16414if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016415 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016417 grep -v '^ *+' conftest.er1 >conftest.err
16418 rm -f conftest.er1
16419 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16421 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016422 { ac_try='test -z "$ac_c_werror_flag"
16423 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16425 (eval $ac_try) 2>&5
16426 ac_status=$?
16427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16428 (exit $ac_status); }; } &&
16429 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16431 (eval $ac_try) 2>&5
16432 ac_status=$?
16433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16434 (exit $ac_status); }; }; then
16435 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016436else
Martin v. Löwis11437992002-04-12 09:54:03 +000016437 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016438sed 's/^/| /' conftest.$ac_ext >&5
16439
16440cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016441/* confdefs.h. */
16442_ACEOF
16443cat confdefs.h >>conftest.$ac_ext
16444cat >>conftest.$ac_ext <<_ACEOF
16445/* end confdefs.h. */
16446$ac_includes_default
16447int
16448main ()
16449{
16450static struct stat ac_aggr;
16451if (sizeof ac_aggr.st_blocks)
16452return 0;
16453 ;
16454 return 0;
16455}
16456_ACEOF
16457rm -f conftest.$ac_objext
16458if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016459 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016460 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016461 grep -v '^ *+' conftest.er1 >conftest.err
16462 rm -f conftest.er1
16463 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16465 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016466 { ac_try='test -z "$ac_c_werror_flag"
16467 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016468 { (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); }; } &&
16473 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16475 (eval $ac_try) 2>&5
16476 ac_status=$?
16477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16478 (exit $ac_status); }; }; then
16479 ac_cv_member_struct_stat_st_blocks=yes
16480else
16481 echo "$as_me: failed program was:" >&5
16482sed 's/^/| /' conftest.$ac_ext >&5
16483
Martin v. Löwis11437992002-04-12 09:54:03 +000016484ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016485fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016486rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016487fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016488rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016489fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016490echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
16491echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
16492if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000016493
Martin v. Löwis11437992002-04-12 09:54:03 +000016494cat >>confdefs.h <<_ACEOF
16495#define HAVE_STRUCT_STAT_ST_BLOCKS 1
16496_ACEOF
16497
16498
16499cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016500#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016501_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016502
16503else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016504 case $LIBOBJS in
16505 "fileblocks.$ac_objext" | \
16506 *" fileblocks.$ac_objext" | \
16507 "fileblocks.$ac_objext "* | \
16508 *" fileblocks.$ac_objext "* ) ;;
16509 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" ;;
16510esac
16511
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016512fi
16513
Michael W. Hudson54241132001-12-07 15:38:26 +000016514
Martin v. Löwis11437992002-04-12 09:54:03 +000016515
16516echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
16517echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
16518if test "${ac_cv_header_time_altzone+set}" = set; then
16519 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016520else
Martin v. Löwis11437992002-04-12 09:54:03 +000016521 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016522/* confdefs.h. */
16523_ACEOF
16524cat confdefs.h >>conftest.$ac_ext
16525cat >>conftest.$ac_ext <<_ACEOF
16526/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016527#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016528int
16529main ()
16530{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016531return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000016532 ;
16533 return 0;
16534}
16535_ACEOF
16536rm -f conftest.$ac_objext
16537if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016538 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016539 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016540 grep -v '^ *+' conftest.er1 >conftest.err
16541 rm -f conftest.er1
16542 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16544 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016545 { ac_try='test -z "$ac_c_werror_flag"
16546 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16548 (eval $ac_try) 2>&5
16549 ac_status=$?
16550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16551 (exit $ac_status); }; } &&
16552 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016553 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16554 (eval $ac_try) 2>&5
16555 ac_status=$?
16556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16557 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016558 ac_cv_header_time_altzone=yes
16559else
Martin v. Löwis11437992002-04-12 09:54:03 +000016560 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016561sed 's/^/| /' conftest.$ac_ext >&5
16562
Martin v. Löwis11437992002-04-12 09:54:03 +000016563ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000016564fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016565rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016566fi
16567
Martin v. Löwis11437992002-04-12 09:54:03 +000016568echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
16569echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016570if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016571
16572cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016573#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016574_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016575
16576fi
16577
Guido van Rossumda88dad1995-01-26 00:46:29 +000016578was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016579echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
16580echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
16581cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016582/* confdefs.h. */
16583_ACEOF
16584cat confdefs.h >>conftest.$ac_ext
16585cat >>conftest.$ac_ext <<_ACEOF
16586/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016587
16588#include <sys/types.h>
16589#include <sys/select.h>
16590#include <sys/time.h>
16591
Martin v. Löwis11437992002-04-12 09:54:03 +000016592int
16593main ()
16594{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016595;
Martin v. Löwis11437992002-04-12 09:54:03 +000016596 ;
16597 return 0;
16598}
16599_ACEOF
16600rm -f conftest.$ac_objext
16601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016602 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016603 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016604 grep -v '^ *+' conftest.er1 >conftest.err
16605 rm -f conftest.er1
16606 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16608 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016609 { ac_try='test -z "$ac_c_werror_flag"
16610 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16612 (eval $ac_try) 2>&5
16613 ac_status=$?
16614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16615 (exit $ac_status); }; } &&
16616 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16618 (eval $ac_try) 2>&5
16619 ac_status=$?
16620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16621 (exit $ac_status); }; }; then
16622
16623
16624cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016625#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016626_ACEOF
16627
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016628 was_it_defined=yes
16629
Guido van Rossumf78abae1997-01-21 22:02:36 +000016630else
Martin v. Löwis11437992002-04-12 09:54:03 +000016631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016632sed 's/^/| /' conftest.$ac_ext >&5
16633
Guido van Rossum7f43da71994-08-01 12:15:30 +000016634fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016635rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016636echo "$as_me:$LINENO: result: $was_it_defined" >&5
16637echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000016638
Martin v. Löwis11437992002-04-12 09:54:03 +000016639echo "$as_me:$LINENO: checking for addrinfo" >&5
16640echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
16641if test "${ac_cv_struct_addrinfo+set}" = set; then
16642 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016643else
Martin v. Löwis11437992002-04-12 09:54:03 +000016644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016645/* confdefs.h. */
16646_ACEOF
16647cat confdefs.h >>conftest.$ac_ext
16648cat >>conftest.$ac_ext <<_ACEOF
16649/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016650
16651# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016652int
16653main ()
16654{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016655struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000016656 ;
16657 return 0;
16658}
16659_ACEOF
16660rm -f conftest.$ac_objext
16661if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016662 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016663 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016664 grep -v '^ *+' conftest.er1 >conftest.err
16665 rm -f conftest.er1
16666 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16668 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016669 { ac_try='test -z "$ac_c_werror_flag"
16670 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16672 (eval $ac_try) 2>&5
16673 ac_status=$?
16674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16675 (exit $ac_status); }; } &&
16676 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16678 (eval $ac_try) 2>&5
16679 ac_status=$?
16680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16681 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016682 ac_cv_struct_addrinfo=yes
16683else
Martin v. Löwis11437992002-04-12 09:54:03 +000016684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016685sed 's/^/| /' conftest.$ac_ext >&5
16686
Martin v. Löwis11437992002-04-12 09:54:03 +000016687ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016688fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016689rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016690fi
16691
Martin v. Löwis11437992002-04-12 09:54:03 +000016692echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
16693echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016694if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016695
16696cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016697#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016698_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016699
16700fi
16701
Martin v. Löwis11437992002-04-12 09:54:03 +000016702echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
16703echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
16704if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
16705 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016706else
Martin v. Löwis11437992002-04-12 09:54:03 +000016707 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016708/* confdefs.h. */
16709_ACEOF
16710cat confdefs.h >>conftest.$ac_ext
16711cat >>conftest.$ac_ext <<_ACEOF
16712/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016713
16714# include <sys/types.h>
16715# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016716int
16717main ()
16718{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016719struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000016720 ;
16721 return 0;
16722}
16723_ACEOF
16724rm -f conftest.$ac_objext
16725if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016726 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016728 grep -v '^ *+' conftest.er1 >conftest.err
16729 rm -f conftest.er1
16730 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16732 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016733 { ac_try='test -z "$ac_c_werror_flag"
16734 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16736 (eval $ac_try) 2>&5
16737 ac_status=$?
16738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16739 (exit $ac_status); }; } &&
16740 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016741 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16742 (eval $ac_try) 2>&5
16743 ac_status=$?
16744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16745 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016746 ac_cv_struct_sockaddr_storage=yes
16747else
Martin v. Löwis11437992002-04-12 09:54:03 +000016748 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016749sed 's/^/| /' conftest.$ac_ext >&5
16750
Martin v. Löwis11437992002-04-12 09:54:03 +000016751ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016752fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016753rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016754fi
16755
Martin v. Löwis11437992002-04-12 09:54:03 +000016756echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
16757echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016758if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016759
16760cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016761#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016762_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016763
16764fi
16765
Guido van Rossum627b2d71993-12-24 10:39:16 +000016766# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000016767
Michael W. Hudson54241132001-12-07 15:38:26 +000016768
Martin v. Löwis11437992002-04-12 09:54:03 +000016769echo "$as_me:$LINENO: checking whether char is unsigned" >&5
16770echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
16771if test "${ac_cv_c_char_unsigned+set}" = set; then
16772 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000016773else
Martin v. Löwis11437992002-04-12 09:54:03 +000016774 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016775/* confdefs.h. */
16776_ACEOF
16777cat confdefs.h >>conftest.$ac_ext
16778cat >>conftest.$ac_ext <<_ACEOF
16779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016780$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016781int
16782main ()
16783{
16784static int test_array [1 - 2 * !(((char) -1) < 0)];
16785test_array [0] = 0
16786
16787 ;
16788 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000016789}
Martin v. Löwis11437992002-04-12 09:54:03 +000016790_ACEOF
16791rm -f conftest.$ac_objext
16792if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016793 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016794 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016795 grep -v '^ *+' conftest.er1 >conftest.err
16796 rm -f conftest.er1
16797 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16799 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016800 { ac_try='test -z "$ac_c_werror_flag"
16801 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016802 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16803 (eval $ac_try) 2>&5
16804 ac_status=$?
16805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16806 (exit $ac_status); }; } &&
16807 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16809 (eval $ac_try) 2>&5
16810 ac_status=$?
16811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16812 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016813 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016814else
16815 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016816sed 's/^/| /' conftest.$ac_ext >&5
16817
Martin v. Löwis11437992002-04-12 09:54:03 +000016818ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016819fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016820rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016821fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016822echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
16823echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016824if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016825 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016826#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016827_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016828
16829fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000016830
Martin v. Löwis11437992002-04-12 09:54:03 +000016831echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
16832echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16833if test "${ac_cv_c_const+set}" = set; then
16834 echo $ECHO_N "(cached) $ECHO_C" >&6
16835else
16836 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016837/* confdefs.h. */
16838_ACEOF
16839cat confdefs.h >>conftest.$ac_ext
16840cat >>conftest.$ac_ext <<_ACEOF
16841/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016842
Martin v. Löwis11437992002-04-12 09:54:03 +000016843int
16844main ()
16845{
16846/* FIXME: Include the comments suggested by Paul. */
16847#ifndef __cplusplus
16848 /* Ultrix mips cc rejects this. */
16849 typedef int charset[2];
16850 const charset x;
16851 /* SunOS 4.1.1 cc rejects this. */
16852 char const *const *ccp;
16853 char **p;
16854 /* NEC SVR4.0.2 mips cc rejects this. */
16855 struct point {int x, y;};
16856 static struct point const zero = {0,0};
16857 /* AIX XL C 1.02.0.0 rejects this.
16858 It does not let you subtract one const X* pointer from another in
16859 an arm of an if-expression whose if-part is not a constant
16860 expression */
16861 const char *g = "string";
16862 ccp = &g + (g ? g-g : 0);
16863 /* HPUX 7.0 cc rejects these. */
16864 ++ccp;
16865 p = (char**) ccp;
16866 ccp = (char const *const *) p;
16867 { /* SCO 3.2v4 cc rejects this. */
16868 char *t;
16869 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016870
Martin v. Löwis11437992002-04-12 09:54:03 +000016871 *t++ = 0;
16872 }
16873 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16874 int x[] = {25, 17};
16875 const int *foo = &x[0];
16876 ++foo;
16877 }
16878 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16879 typedef const int *iptr;
16880 iptr p = 0;
16881 ++p;
16882 }
16883 { /* AIX XL C 1.02.0.0 rejects this saying
16884 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16885 struct s { int j; const int *ap[3]; };
16886 struct s *b; b->j = 5;
16887 }
16888 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16889 const int foo = 10;
16890 }
16891#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000016892
Martin v. Löwis11437992002-04-12 09:54:03 +000016893 ;
16894 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000016895}
Martin v. Löwis11437992002-04-12 09:54:03 +000016896_ACEOF
16897rm -f conftest.$ac_objext
16898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016899 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016900 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016901 grep -v '^ *+' conftest.er1 >conftest.err
16902 rm -f conftest.er1
16903 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16905 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016906 { ac_try='test -z "$ac_c_werror_flag"
16907 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16909 (eval $ac_try) 2>&5
16910 ac_status=$?
16911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16912 (exit $ac_status); }; } &&
16913 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16915 (eval $ac_try) 2>&5
16916 ac_status=$?
16917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16918 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016919 ac_cv_c_const=yes
16920else
Martin v. Löwis11437992002-04-12 09:54:03 +000016921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016922sed 's/^/| /' conftest.$ac_ext >&5
16923
Martin v. Löwis11437992002-04-12 09:54:03 +000016924ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016925fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016926rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016927fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016928echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
16929echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016930if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016931
16932cat >>confdefs.h <<\_ACEOF
16933#define const
16934_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016935
16936fi
16937
Michael W. Hudson54241132001-12-07 15:38:26 +000016938
Guido van Rossumda88dad1995-01-26 00:46:29 +000016939works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016940echo "$as_me:$LINENO: checking for working volatile" >&5
16941echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
16942cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016943/* confdefs.h. */
16944_ACEOF
16945cat confdefs.h >>conftest.$ac_ext
16946cat >>conftest.$ac_ext <<_ACEOF
16947/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016948
Martin v. Löwis11437992002-04-12 09:54:03 +000016949int
16950main ()
16951{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016952volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016953 ;
16954 return 0;
16955}
16956_ACEOF
16957rm -f conftest.$ac_objext
16958if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016959 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016961 grep -v '^ *+' conftest.er1 >conftest.err
16962 rm -f conftest.er1
16963 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016964 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16965 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000016966 { ac_try='test -z "$ac_c_werror_flag"
16967 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16969 (eval $ac_try) 2>&5
16970 ac_status=$?
16971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16972 (exit $ac_status); }; } &&
16973 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16975 (eval $ac_try) 2>&5
16976 ac_status=$?
16977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16978 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000016979 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016980else
Martin v. Löwis11437992002-04-12 09:54:03 +000016981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016982sed 's/^/| /' conftest.$ac_ext >&5
16983
Martin v. Löwis11437992002-04-12 09:54:03 +000016984
16985cat >>confdefs.h <<\_ACEOF
16986#define volatile
16987_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016988
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016989
Guido van Rossum627b2d71993-12-24 10:39:16 +000016990fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016991rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016992echo "$as_me:$LINENO: result: $works" >&5
16993echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000016994
Guido van Rossumda88dad1995-01-26 00:46:29 +000016995works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016996echo "$as_me:$LINENO: checking for working signed char" >&5
16997echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
16998cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016999/* confdefs.h. */
17000_ACEOF
17001cat confdefs.h >>conftest.$ac_ext
17002cat >>conftest.$ac_ext <<_ACEOF
17003/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000017004
Martin v. Löwis11437992002-04-12 09:54:03 +000017005int
17006main ()
17007{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017008signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000017009 ;
17010 return 0;
17011}
17012_ACEOF
17013rm -f conftest.$ac_objext
17014if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017015 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017017 grep -v '^ *+' conftest.er1 >conftest.err
17018 rm -f conftest.er1
17019 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17021 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017022 { ac_try='test -z "$ac_c_werror_flag"
17023 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17025 (eval $ac_try) 2>&5
17026 ac_status=$?
17027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17028 (exit $ac_status); }; } &&
17029 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017030 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17031 (eval $ac_try) 2>&5
17032 ac_status=$?
17033 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17034 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000017035 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000017036else
Martin v. Löwis11437992002-04-12 09:54:03 +000017037 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017038sed 's/^/| /' conftest.$ac_ext >&5
17039
Martin v. Löwis11437992002-04-12 09:54:03 +000017040
17041cat >>confdefs.h <<\_ACEOF
17042#define signed
17043_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000017044
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017045
Guido van Rossum7f43da71994-08-01 12:15:30 +000017046fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017047rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017048echo "$as_me:$LINENO: result: $works" >&5
17049echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000017050
Guido van Rossumda88dad1995-01-26 00:46:29 +000017051have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017052echo "$as_me:$LINENO: checking for prototypes" >&5
17053echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
17054cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017055/* confdefs.h. */
17056_ACEOF
17057cat confdefs.h >>conftest.$ac_ext
17058cat >>conftest.$ac_ext <<_ACEOF
17059/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017060int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017061int
17062main ()
17063{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017064return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000017065 ;
17066 return 0;
17067}
17068_ACEOF
17069rm -f conftest.$ac_objext
17070if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017071 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017072 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017073 grep -v '^ *+' conftest.er1 >conftest.err
17074 rm -f conftest.er1
17075 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17077 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017078 { ac_try='test -z "$ac_c_werror_flag"
17079 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017080 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17081 (eval $ac_try) 2>&5
17082 ac_status=$?
17083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17084 (exit $ac_status); }; } &&
17085 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17087 (eval $ac_try) 2>&5
17088 ac_status=$?
17089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17090 (exit $ac_status); }; }; then
17091
17092
17093cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017094#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017095_ACEOF
17096
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017097 have_prototypes=yes
17098
Guido van Rossumf78abae1997-01-21 22:02:36 +000017099else
Martin v. Löwis11437992002-04-12 09:54:03 +000017100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017101sed 's/^/| /' conftest.$ac_ext >&5
17102
Guido van Rossum7f43da71994-08-01 12:15:30 +000017103fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017104rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017105echo "$as_me:$LINENO: result: $have_prototypes" >&5
17106echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017107
Guido van Rossumda88dad1995-01-26 00:46:29 +000017108works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017109echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
17110echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
17111cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017112/* confdefs.h. */
17113_ACEOF
17114cat confdefs.h >>conftest.$ac_ext
17115cat >>conftest.$ac_ext <<_ACEOF
17116/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017117
17118#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000017119int foo(int x, ...) {
17120 va_list va;
17121 va_start(va, x);
17122 va_arg(va, int);
17123 va_arg(va, char *);
17124 va_arg(va, double);
17125 return 0;
17126}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017127
Martin v. Löwis11437992002-04-12 09:54:03 +000017128int
17129main ()
17130{
Guido van Rossum90eea071996-08-30 20:58:57 +000017131return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000017132 ;
17133 return 0;
17134}
17135_ACEOF
17136rm -f conftest.$ac_objext
17137if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017138 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017140 grep -v '^ *+' conftest.er1 >conftest.err
17141 rm -f conftest.er1
17142 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17144 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017145 { ac_try='test -z "$ac_c_werror_flag"
17146 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017147 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17148 (eval $ac_try) 2>&5
17149 ac_status=$?
17150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17151 (exit $ac_status); }; } &&
17152 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017153 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17154 (eval $ac_try) 2>&5
17155 ac_status=$?
17156 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17157 (exit $ac_status); }; }; then
17158
17159
17160cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017161#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017162_ACEOF
17163
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017164 works=yes
17165
Guido van Rossumf78abae1997-01-21 22:02:36 +000017166else
Martin v. Löwis11437992002-04-12 09:54:03 +000017167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017168sed 's/^/| /' conftest.$ac_ext >&5
17169
Guido van Rossum627b2d71993-12-24 10:39:16 +000017170fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017171rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017172echo "$as_me:$LINENO: result: $works" >&5
17173echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017174
Martin v. Löwisd6320502004-08-12 13:45:08 +000017175# check for socketpair
17176echo "$as_me:$LINENO: checking for socketpair" >&5
17177echo $ECHO_N "checking for socketpair... $ECHO_C" >&6
17178cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000017179/* confdefs.h. */
17180_ACEOF
17181cat confdefs.h >>conftest.$ac_ext
17182cat >>conftest.$ac_ext <<_ACEOF
17183/* end confdefs.h. */
17184
17185#include <sys/types.h>
17186#include <sys/socket.h>
17187
17188int
17189main ()
17190{
17191void *x=socketpair
17192 ;
17193 return 0;
17194}
17195_ACEOF
17196rm -f conftest.$ac_objext
17197if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017198 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000017199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017200 grep -v '^ *+' conftest.er1 >conftest.err
17201 rm -f conftest.er1
17202 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000017203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17204 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017205 { ac_try='test -z "$ac_c_werror_flag"
17206 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017207 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17208 (eval $ac_try) 2>&5
17209 ac_status=$?
17210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17211 (exit $ac_status); }; } &&
17212 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd6320502004-08-12 13:45:08 +000017213 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17214 (eval $ac_try) 2>&5
17215 ac_status=$?
17216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17217 (exit $ac_status); }; }; then
17218
17219cat >>confdefs.h <<\_ACEOF
17220#define HAVE_SOCKETPAIR 1
17221_ACEOF
17222
17223 echo "$as_me:$LINENO: result: yes" >&5
17224echo "${ECHO_T}yes" >&6
17225else
17226 echo "$as_me: failed program was:" >&5
17227sed 's/^/| /' conftest.$ac_ext >&5
17228
17229echo "$as_me:$LINENO: result: no" >&5
17230echo "${ECHO_T}no" >&6
17231
17232fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017233rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000017234
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017235# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000017236echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
17237echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
17238cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017239/* confdefs.h. */
17240_ACEOF
17241cat confdefs.h >>conftest.$ac_ext
17242cat >>conftest.$ac_ext <<_ACEOF
17243/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017244#include <sys/types.h>
17245#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017246int
17247main ()
17248{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017249struct sockaddr x;
17250x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000017251 ;
17252 return 0;
17253}
17254_ACEOF
17255rm -f conftest.$ac_objext
17256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017257 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017258 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017259 grep -v '^ *+' conftest.er1 >conftest.err
17260 rm -f conftest.er1
17261 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17263 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017264 { ac_try='test -z "$ac_c_werror_flag"
17265 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17267 (eval $ac_try) 2>&5
17268 ac_status=$?
17269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17270 (exit $ac_status); }; } &&
17271 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17273 (eval $ac_try) 2>&5
17274 ac_status=$?
17275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17276 (exit $ac_status); }; }; then
17277 echo "$as_me:$LINENO: result: yes" >&5
17278echo "${ECHO_T}yes" >&6
17279
17280cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017281#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017282_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017283
17284else
Martin v. Löwis11437992002-04-12 09:54:03 +000017285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017286sed 's/^/| /' conftest.$ac_ext >&5
17287
Martin v. Löwis11437992002-04-12 09:54:03 +000017288echo "$as_me:$LINENO: result: no" >&5
17289echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017290fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017291rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017292
Guido van Rossumda88dad1995-01-26 00:46:29 +000017293va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017294echo "$as_me:$LINENO: checking whether va_list is an array" >&5
17295echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
17296cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017297/* confdefs.h. */
17298_ACEOF
17299cat confdefs.h >>conftest.$ac_ext
17300cat >>conftest.$ac_ext <<_ACEOF
17301/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017302
17303#ifdef HAVE_STDARG_PROTOTYPES
17304#include <stdarg.h>
17305#else
17306#include <varargs.h>
17307#endif
17308
Martin v. Löwis11437992002-04-12 09:54:03 +000017309int
17310main ()
17311{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017312va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000017313 ;
17314 return 0;
17315}
17316_ACEOF
17317rm -f conftest.$ac_objext
17318if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017319 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017321 grep -v '^ *+' conftest.er1 >conftest.err
17322 rm -f conftest.er1
17323 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17325 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017326 { ac_try='test -z "$ac_c_werror_flag"
17327 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17329 (eval $ac_try) 2>&5
17330 ac_status=$?
17331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17332 (exit $ac_status); }; } &&
17333 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17335 (eval $ac_try) 2>&5
17336 ac_status=$?
17337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17338 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017339 :
17340else
Martin v. Löwis11437992002-04-12 09:54:03 +000017341 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017342sed 's/^/| /' conftest.$ac_ext >&5
17343
Martin v. Löwis11437992002-04-12 09:54:03 +000017344
17345
17346cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017347#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017348_ACEOF
17349
Guido van Rossumda88dad1995-01-26 00:46:29 +000017350 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017351
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017352fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017353rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017354echo "$as_me:$LINENO: result: $va_list_is_array" >&5
17355echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017356
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017357# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000017358
17359
17360
17361echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
17362echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
17363if test "${ac_cv_func_gethostbyname_r+set}" = set; then
17364 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017365else
Martin v. Löwis11437992002-04-12 09:54:03 +000017366 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017367/* confdefs.h. */
17368_ACEOF
17369cat confdefs.h >>conftest.$ac_ext
17370cat >>conftest.$ac_ext <<_ACEOF
17371/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017372/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017373 which can conflict with char gethostbyname_r (); below.
17374 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017375 <limits.h> exists even on freestanding compilers. Under hpux,
17376 including <limits.h> includes <sys/time.h> and causes problems
17377 checking for functions defined therein. */
17378#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017379# include <limits.h>
17380#else
17381# include <assert.h>
17382#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017383/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017384#ifdef __cplusplus
17385extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017386{
Martin v. Löwis11437992002-04-12 09:54:03 +000017387#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017388/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017389 builtin and then its argument prototype would still apply. */
17390char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017391/* The GNU C library defines this for functions which it implements
17392 to always fail with ENOSYS. Some functions are actually named
17393 something starting with __ and the normal name is an alias. */
17394#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
17395choke me
17396#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017397char (*f) () = gethostbyname_r;
17398#endif
17399#ifdef __cplusplus
17400}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017401#endif
17402
Skip Montanaro6dead952003-09-25 14:50:04 +000017403int
17404main ()
17405{
17406return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000017407 ;
17408 return 0;
17409}
17410_ACEOF
17411rm -f conftest.$ac_objext conftest$ac_exeext
17412if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017413 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017414 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017415 grep -v '^ *+' conftest.er1 >conftest.err
17416 rm -f conftest.er1
17417 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17419 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017420 { ac_try='test -z "$ac_c_werror_flag"
17421 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017422 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17423 (eval $ac_try) 2>&5
17424 ac_status=$?
17425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17426 (exit $ac_status); }; } &&
17427 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17429 (eval $ac_try) 2>&5
17430 ac_status=$?
17431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17432 (exit $ac_status); }; }; then
17433 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017434else
Martin v. Löwis11437992002-04-12 09:54:03 +000017435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017436sed 's/^/| /' conftest.$ac_ext >&5
17437
Martin v. Löwis11437992002-04-12 09:54:03 +000017438ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017439fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017440rm -f conftest.err conftest.$ac_objext \
17441 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017442fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017443echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
17444echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
17445if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017446
Martin v. Löwis11437992002-04-12 09:54:03 +000017447 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017448#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017449_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017450
Martin v. Löwis11437992002-04-12 09:54:03 +000017451 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
17452echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017453 OLD_CFLAGS=$CFLAGS
17454 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017456/* confdefs.h. */
17457_ACEOF
17458cat confdefs.h >>conftest.$ac_ext
17459cat >>conftest.$ac_ext <<_ACEOF
17460/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017461
17462# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017463
Martin v. Löwis11437992002-04-12 09:54:03 +000017464int
17465main ()
17466{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017467
17468 char *name;
17469 struct hostent *he, *res;
17470 char buffer[2048];
17471 int buflen = 2048;
17472 int h_errnop;
17473
17474 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000017475
17476 ;
17477 return 0;
17478}
17479_ACEOF
17480rm -f conftest.$ac_objext
17481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017482 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017483 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017484 grep -v '^ *+' conftest.er1 >conftest.err
17485 rm -f conftest.er1
17486 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17488 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017489 { ac_try='test -z "$ac_c_werror_flag"
17490 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17492 (eval $ac_try) 2>&5
17493 ac_status=$?
17494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17495 (exit $ac_status); }; } &&
17496 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017497 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17498 (eval $ac_try) 2>&5
17499 ac_status=$?
17500 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17501 (exit $ac_status); }; }; then
17502
17503 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017504#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017505_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017506
Martin v. Löwis11437992002-04-12 09:54:03 +000017507
17508cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017509#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017510_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017511
Martin v. Löwis11437992002-04-12 09:54:03 +000017512 echo "$as_me:$LINENO: result: yes" >&5
17513echo "${ECHO_T}yes" >&6
17514
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017515else
Martin v. Löwis11437992002-04-12 09:54:03 +000017516 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017517sed 's/^/| /' conftest.$ac_ext >&5
17518
Martin v. Löwis11437992002-04-12 09:54:03 +000017519
17520 echo "$as_me:$LINENO: result: no" >&5
17521echo "${ECHO_T}no" >&6
17522 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
17523echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
17524 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017525/* confdefs.h. */
17526_ACEOF
17527cat confdefs.h >>conftest.$ac_ext
17528cat >>conftest.$ac_ext <<_ACEOF
17529/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017530
17531# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017532
Martin v. Löwis11437992002-04-12 09:54:03 +000017533int
17534main ()
17535{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017536
17537 char *name;
17538 struct hostent *he;
17539 char buffer[2048];
17540 int buflen = 2048;
17541 int h_errnop;
17542
17543 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000017544
17545 ;
17546 return 0;
17547}
17548_ACEOF
17549rm -f conftest.$ac_objext
17550if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017551 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017553 grep -v '^ *+' conftest.er1 >conftest.err
17554 rm -f conftest.er1
17555 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17557 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017558 { ac_try='test -z "$ac_c_werror_flag"
17559 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17561 (eval $ac_try) 2>&5
17562 ac_status=$?
17563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17564 (exit $ac_status); }; } &&
17565 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017566 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17567 (eval $ac_try) 2>&5
17568 ac_status=$?
17569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17570 (exit $ac_status); }; }; then
17571
17572 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017573#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017574_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017575
Martin v. Löwis11437992002-04-12 09:54:03 +000017576
17577cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017578#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017579_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017580
Martin v. Löwis11437992002-04-12 09:54:03 +000017581 echo "$as_me:$LINENO: result: yes" >&5
17582echo "${ECHO_T}yes" >&6
17583
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017584else
Martin v. Löwis11437992002-04-12 09:54:03 +000017585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017586sed 's/^/| /' conftest.$ac_ext >&5
17587
Martin v. Löwis11437992002-04-12 09:54:03 +000017588
17589 echo "$as_me:$LINENO: result: no" >&5
17590echo "${ECHO_T}no" >&6
17591 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
17592echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
17593 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017594/* confdefs.h. */
17595_ACEOF
17596cat confdefs.h >>conftest.$ac_ext
17597cat >>conftest.$ac_ext <<_ACEOF
17598/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017599
17600# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017601
Martin v. Löwis11437992002-04-12 09:54:03 +000017602int
17603main ()
17604{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017605
17606 char *name;
17607 struct hostent *he;
17608 struct hostent_data data;
17609
17610 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000017611
17612 ;
17613 return 0;
17614}
17615_ACEOF
17616rm -f conftest.$ac_objext
17617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017618 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017619 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017620 grep -v '^ *+' conftest.er1 >conftest.err
17621 rm -f conftest.er1
17622 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17624 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017625 { ac_try='test -z "$ac_c_werror_flag"
17626 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017627 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17628 (eval $ac_try) 2>&5
17629 ac_status=$?
17630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17631 (exit $ac_status); }; } &&
17632 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17634 (eval $ac_try) 2>&5
17635 ac_status=$?
17636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17637 (exit $ac_status); }; }; then
17638
17639 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017640#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017641_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017642
Martin v. Löwis11437992002-04-12 09:54:03 +000017643
17644cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017645#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017646_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017647
Martin v. Löwis11437992002-04-12 09:54:03 +000017648 echo "$as_me:$LINENO: result: yes" >&5
17649echo "${ECHO_T}yes" >&6
17650
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017651else
Martin v. Löwis11437992002-04-12 09:54:03 +000017652 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017653sed 's/^/| /' conftest.$ac_ext >&5
17654
Martin v. Löwis11437992002-04-12 09:54:03 +000017655
17656 echo "$as_me:$LINENO: result: no" >&5
17657echo "${ECHO_T}no" >&6
17658
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017659fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017660rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017661
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017662fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017663rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017664
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017665fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017666rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017667 CFLAGS=$OLD_CFLAGS
17668
17669else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017670
Martin v. Löwis11437992002-04-12 09:54:03 +000017671
17672for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000017673do
Martin v. Löwis11437992002-04-12 09:54:03 +000017674as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17675echo "$as_me:$LINENO: checking for $ac_func" >&5
17676echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17677if eval "test \"\${$as_ac_var+set}\" = set"; then
17678 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017679else
Martin v. Löwis11437992002-04-12 09:54:03 +000017680 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017681/* confdefs.h. */
17682_ACEOF
17683cat confdefs.h >>conftest.$ac_ext
17684cat >>conftest.$ac_ext <<_ACEOF
17685/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017686/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017687 which can conflict with char $ac_func (); below.
17688 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017689 <limits.h> exists even on freestanding compilers. Under hpux,
17690 including <limits.h> includes <sys/time.h> and causes problems
17691 checking for functions defined therein. */
17692#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017693# include <limits.h>
17694#else
17695# include <assert.h>
17696#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017697/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017698#ifdef __cplusplus
17699extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017700{
Martin v. Löwis11437992002-04-12 09:54:03 +000017701#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017702/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017703 builtin and then its argument prototype would still apply. */
17704char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017705/* The GNU C library defines this for functions which it implements
17706 to always fail with ENOSYS. Some functions are actually named
17707 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000017708#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017709choke me
17710#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017711char (*f) () = $ac_func;
17712#endif
17713#ifdef __cplusplus
17714}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017715#endif
17716
Skip Montanaro6dead952003-09-25 14:50:04 +000017717int
17718main ()
17719{
17720return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000017721 ;
17722 return 0;
17723}
17724_ACEOF
17725rm -f conftest.$ac_objext conftest$ac_exeext
17726if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017727 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017728 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017729 grep -v '^ *+' conftest.er1 >conftest.err
17730 rm -f conftest.er1
17731 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17733 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017734 { ac_try='test -z "$ac_c_werror_flag"
17735 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17737 (eval $ac_try) 2>&5
17738 ac_status=$?
17739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17740 (exit $ac_status); }; } &&
17741 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017742 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17743 (eval $ac_try) 2>&5
17744 ac_status=$?
17745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17746 (exit $ac_status); }; }; then
17747 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017748else
Martin v. Löwis11437992002-04-12 09:54:03 +000017749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017750sed 's/^/| /' conftest.$ac_ext >&5
17751
Martin v. Löwis11437992002-04-12 09:54:03 +000017752eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017753fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017754rm -f conftest.err conftest.$ac_objext \
17755 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017756fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017757echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17758echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17759if test `eval echo '${'$as_ac_var'}'` = yes; then
17760 cat >>confdefs.h <<_ACEOF
17761#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17762_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017763
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017764fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017765done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017766
Michael W. Hudson54241132001-12-07 15:38:26 +000017767
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017768fi
17769
Michael W. Hudson54241132001-12-07 15:38:26 +000017770
17771
17772
17773
17774
17775
Guido van Rossum627b2d71993-12-24 10:39:16 +000017776# checks for system services
17777# (none yet)
17778
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017779# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000017780echo "$as_me:$LINENO: checking for __fpu_control" >&5
17781echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
17782if test "${ac_cv_func___fpu_control+set}" = set; then
17783 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017784else
Martin v. Löwis11437992002-04-12 09:54:03 +000017785 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017786/* confdefs.h. */
17787_ACEOF
17788cat confdefs.h >>conftest.$ac_ext
17789cat >>conftest.$ac_ext <<_ACEOF
17790/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017791/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017792 which can conflict with char __fpu_control (); below.
17793 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017794 <limits.h> exists even on freestanding compilers. Under hpux,
17795 including <limits.h> includes <sys/time.h> and causes problems
17796 checking for functions defined therein. */
17797#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017798# include <limits.h>
17799#else
17800# include <assert.h>
17801#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017802/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017803#ifdef __cplusplus
17804extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017805{
Martin v. Löwis11437992002-04-12 09:54:03 +000017806#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017807/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017808 builtin and then its argument prototype would still apply. */
17809char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017810/* The GNU C library defines this for functions which it implements
17811 to always fail with ENOSYS. Some functions are actually named
17812 something starting with __ and the normal name is an alias. */
17813#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
17814choke me
17815#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017816char (*f) () = __fpu_control;
17817#endif
17818#ifdef __cplusplus
17819}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017820#endif
17821
Skip Montanaro6dead952003-09-25 14:50:04 +000017822int
17823main ()
17824{
17825return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000017826 ;
17827 return 0;
17828}
17829_ACEOF
17830rm -f conftest.$ac_objext conftest$ac_exeext
17831if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017832 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017833 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017834 grep -v '^ *+' conftest.er1 >conftest.err
17835 rm -f conftest.er1
17836 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17838 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017839 { ac_try='test -z "$ac_c_werror_flag"
17840 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17842 (eval $ac_try) 2>&5
17843 ac_status=$?
17844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17845 (exit $ac_status); }; } &&
17846 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017847 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17848 (eval $ac_try) 2>&5
17849 ac_status=$?
17850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17851 (exit $ac_status); }; }; then
17852 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017853else
Martin v. Löwis11437992002-04-12 09:54:03 +000017854 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017855sed 's/^/| /' conftest.$ac_ext >&5
17856
Martin v. Löwis11437992002-04-12 09:54:03 +000017857ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017858fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017859rm -f conftest.err conftest.$ac_objext \
17860 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017861fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017862echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
17863echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
17864if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017865 :
17866else
Martin v. Löwis11437992002-04-12 09:54:03 +000017867
17868echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
17869echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
17870if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
17871 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017872else
Martin v. Löwis11437992002-04-12 09:54:03 +000017873 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017874LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017875cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017876/* confdefs.h. */
17877_ACEOF
17878cat confdefs.h >>conftest.$ac_ext
17879cat >>conftest.$ac_ext <<_ACEOF
17880/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017881
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017882/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017883#ifdef __cplusplus
17884extern "C"
17885#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017886/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017887 builtin and then its argument prototype would still apply. */
17888char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017889int
17890main ()
17891{
17892__fpu_control ();
17893 ;
17894 return 0;
17895}
17896_ACEOF
17897rm -f conftest.$ac_objext conftest$ac_exeext
17898if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017899 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017900 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017901 grep -v '^ *+' conftest.er1 >conftest.err
17902 rm -f conftest.er1
17903 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17905 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000017906 { ac_try='test -z "$ac_c_werror_flag"
17907 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17909 (eval $ac_try) 2>&5
17910 ac_status=$?
17911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17912 (exit $ac_status); }; } &&
17913 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17915 (eval $ac_try) 2>&5
17916 ac_status=$?
17917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17918 (exit $ac_status); }; }; then
17919 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017920else
Martin v. Löwis11437992002-04-12 09:54:03 +000017921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017922sed 's/^/| /' conftest.$ac_ext >&5
17923
Martin v. Löwis11437992002-04-12 09:54:03 +000017924ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017925fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017926rm -f conftest.err conftest.$ac_objext \
17927 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017928LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017929fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017930echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
17931echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
17932if test $ac_cv_lib_ieee___fpu_control = yes; then
17933 cat >>confdefs.h <<_ACEOF
17934#define HAVE_LIBIEEE 1
17935_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017936
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017937 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017938
Guido van Rossum627b2d71993-12-24 10:39:16 +000017939fi
17940
Michael W. Hudson54241132001-12-07 15:38:26 +000017941
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017942fi
17943
Michael W. Hudson54241132001-12-07 15:38:26 +000017944
Guido van Rossum7f253911997-05-09 02:42:48 +000017945# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000017946echo "$as_me:$LINENO: checking for --with-fpectl" >&5
17947echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
17948
Guido van Rossum7f253911997-05-09 02:42:48 +000017949# Check whether --with-fpectl or --without-fpectl was given.
17950if test "${with_fpectl+set}" = set; then
17951 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000017952
Guido van Rossum7f253911997-05-09 02:42:48 +000017953if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017954then
17955
17956cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000017957#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017958_ACEOF
17959
17960 echo "$as_me:$LINENO: result: yes" >&5
17961echo "${ECHO_T}yes" >&6
17962else echo "$as_me:$LINENO: result: no" >&5
17963echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017964fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017965else
Martin v. Löwis11437992002-04-12 09:54:03 +000017966 echo "$as_me:$LINENO: result: no" >&5
17967echo "${ECHO_T}no" >&6
17968fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000017969
Guido van Rossum7f43da71994-08-01 12:15:30 +000017970# check for --with-libm=...
17971
Guido van Rossum563e7081996-09-10 18:20:48 +000017972case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000017973Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000017974BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000017975*) LIBM=-lm
17976esac
Martin v. Löwis11437992002-04-12 09:54:03 +000017977echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
17978echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
17979
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017980# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017981if test "${with_libm+set}" = set; then
17982 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000017983
Guido van Rossum7f253911997-05-09 02:42:48 +000017984if test "$withval" = no
17985then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000017986 echo "$as_me:$LINENO: result: force LIBM empty" >&5
17987echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017988elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000017989then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000017990 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
17991echo "${ECHO_T}set LIBM=\"$withval\"" >&6
17992else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
17993echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
17994 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000017995fi
Guido van Rossum7f253911997-05-09 02:42:48 +000017996else
Martin v. Löwis11437992002-04-12 09:54:03 +000017997 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
17998echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
17999fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018000
18001# check for --with-libc=...
18002
Martin v. Löwis11437992002-04-12 09:54:03 +000018003echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
18004echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
18005
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018006# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018007if test "${with_libc+set}" = set; then
18008 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000018009
Guido van Rossum7f253911997-05-09 02:42:48 +000018010if test "$withval" = no
18011then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000018012 echo "$as_me:$LINENO: result: force LIBC empty" >&5
18013echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000018014elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000018015then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000018016 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
18017echo "${ECHO_T}set LIBC=\"$withval\"" >&6
18018else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
18019echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
18020 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000018021fi
Guido van Rossum7f253911997-05-09 02:42:48 +000018022else
Martin v. Löwis11437992002-04-12 09:54:03 +000018023 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
18024echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
18025fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000018026
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018027# check for hypot() in math library
18028LIBS_SAVE=$LIBS
18029LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000018030
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018031for ac_func in hypot
18032do
Martin v. Löwis11437992002-04-12 09:54:03 +000018033as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18034echo "$as_me:$LINENO: checking for $ac_func" >&5
18035echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18036if eval "test \"\${$as_ac_var+set}\" = set"; then
18037 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018038else
Martin v. Löwis11437992002-04-12 09:54:03 +000018039 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018040/* confdefs.h. */
18041_ACEOF
18042cat confdefs.h >>conftest.$ac_ext
18043cat >>conftest.$ac_ext <<_ACEOF
18044/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018045/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018046 which can conflict with char $ac_func (); below.
18047 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000018048 <limits.h> exists even on freestanding compilers. Under hpux,
18049 including <limits.h> includes <sys/time.h> and causes problems
18050 checking for functions defined therein. */
18051#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000018052# include <limits.h>
18053#else
18054# include <assert.h>
18055#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018056/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018057#ifdef __cplusplus
18058extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000018059{
Martin v. Löwis11437992002-04-12 09:54:03 +000018060#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018061/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000018062 builtin and then its argument prototype would still apply. */
18063char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018064/* The GNU C library defines this for functions which it implements
18065 to always fail with ENOSYS. Some functions are actually named
18066 something starting with __ and the normal name is an alias. */
18067#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18068choke me
18069#else
Skip Montanaro6dead952003-09-25 14:50:04 +000018070char (*f) () = $ac_func;
18071#endif
18072#ifdef __cplusplus
18073}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018074#endif
18075
Skip Montanaro6dead952003-09-25 14:50:04 +000018076int
18077main ()
18078{
18079return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000018080 ;
18081 return 0;
18082}
18083_ACEOF
18084rm -f conftest.$ac_objext conftest$ac_exeext
18085if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018086 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018087 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018088 grep -v '^ *+' conftest.er1 >conftest.err
18089 rm -f conftest.er1
18090 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18092 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018093 { ac_try='test -z "$ac_c_werror_flag"
18094 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18096 (eval $ac_try) 2>&5
18097 ac_status=$?
18098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18099 (exit $ac_status); }; } &&
18100 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18102 (eval $ac_try) 2>&5
18103 ac_status=$?
18104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18105 (exit $ac_status); }; }; then
18106 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018107else
Martin v. Löwis11437992002-04-12 09:54:03 +000018108 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018109sed 's/^/| /' conftest.$ac_ext >&5
18110
Martin v. Löwis11437992002-04-12 09:54:03 +000018111eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018112fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018113rm -f conftest.err conftest.$ac_objext \
18114 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018115fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018116echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18117echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18118if test `eval echo '${'$as_ac_var'}'` = yes; then
18119 cat >>confdefs.h <<_ACEOF
18120#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18121_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018122
Michael W. Hudson54241132001-12-07 15:38:26 +000018123else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018124 case $LIBOBJS in
18125 "$ac_func.$ac_objext" | \
18126 *" $ac_func.$ac_objext" | \
18127 "$ac_func.$ac_objext "* | \
18128 *" $ac_func.$ac_objext "* ) ;;
18129 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
18130esac
18131
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018132fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018133done
18134
Michael W. Hudson54241132001-12-07 15:38:26 +000018135
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018136LIBS=$LIBS_SAVE
18137
Guido van Rossumef2255b2000-03-10 22:30:29 +000018138# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000018139if test "${ac_cv_header_wchar_h+set}" = set; then
18140 echo "$as_me:$LINENO: checking for wchar.h" >&5
18141echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
18142if test "${ac_cv_header_wchar_h+set}" = set; then
18143 echo $ECHO_N "(cached) $ECHO_C" >&6
18144fi
18145echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
18146echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000018147else
Martin v. Löwis11437992002-04-12 09:54:03 +000018148 # Is the header compilable?
18149echo "$as_me:$LINENO: checking wchar.h usability" >&5
18150echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
18151cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018152/* confdefs.h. */
18153_ACEOF
18154cat confdefs.h >>conftest.$ac_ext
18155cat >>conftest.$ac_ext <<_ACEOF
18156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018157$ac_includes_default
18158#include <wchar.h>
18159_ACEOF
18160rm -f conftest.$ac_objext
18161if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018162 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018164 grep -v '^ *+' conftest.er1 >conftest.err
18165 rm -f conftest.er1
18166 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18168 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018169 { ac_try='test -z "$ac_c_werror_flag"
18170 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18172 (eval $ac_try) 2>&5
18173 ac_status=$?
18174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18175 (exit $ac_status); }; } &&
18176 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018177 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18178 (eval $ac_try) 2>&5
18179 ac_status=$?
18180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18181 (exit $ac_status); }; }; then
18182 ac_header_compiler=yes
18183else
18184 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018185sed 's/^/| /' conftest.$ac_ext >&5
18186
Martin v. Löwis11437992002-04-12 09:54:03 +000018187ac_header_compiler=no
18188fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018189rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018190echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18191echo "${ECHO_T}$ac_header_compiler" >&6
18192
18193# Is the header present?
18194echo "$as_me:$LINENO: checking wchar.h presence" >&5
18195echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
18196cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018197/* confdefs.h. */
18198_ACEOF
18199cat confdefs.h >>conftest.$ac_ext
18200cat >>conftest.$ac_ext <<_ACEOF
18201/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000018202#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018203_ACEOF
18204if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18205 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18206 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000018207 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000018208 rm -f conftest.er1
18209 cat conftest.err >&5
18210 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18211 (exit $ac_status); } >/dev/null; then
18212 if test -s conftest.err; then
18213 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000018214 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000018215 else
18216 ac_cpp_err=
18217 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018218else
Martin v. Löwis11437992002-04-12 09:54:03 +000018219 ac_cpp_err=yes
18220fi
18221if test -z "$ac_cpp_err"; then
18222 ac_header_preproc=yes
18223else
18224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018225sed 's/^/| /' conftest.$ac_ext >&5
18226
Martin v. Löwis11437992002-04-12 09:54:03 +000018227 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000018228fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018229rm -f conftest.err conftest.$ac_ext
18230echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18231echo "${ECHO_T}$ac_header_preproc" >&6
18232
18233# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018234case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18235 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000018236 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
18237echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018238 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
18239echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
18240 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018241 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018242 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018243 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
18244echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018245 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
18246echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
18247 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
18248echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
18249 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
18250echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018251 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
18252echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018253 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
18254echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018255 (
18256 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +000018257## --------------------------------- ##
18258## Report this to the python lists. ##
18259## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000018260_ASBOX
18261 ) |
18262 sed "s/^/$as_me: WARNING: /" >&2
18263 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018264esac
18265echo "$as_me:$LINENO: checking for wchar.h" >&5
18266echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
18267if test "${ac_cv_header_wchar_h+set}" = set; then
18268 echo $ECHO_N "(cached) $ECHO_C" >&6
18269else
18270 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000018271fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018272echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
18273echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
18274
18275fi
18276if test $ac_cv_header_wchar_h = yes; then
18277
18278
18279cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000018280#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018281_ACEOF
18282
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018283 wchar_h="yes"
18284
Guido van Rossumef2255b2000-03-10 22:30:29 +000018285else
Martin v. Löwis11437992002-04-12 09:54:03 +000018286 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000018287
18288fi
18289
Michael W. Hudson54241132001-12-07 15:38:26 +000018290
Martin v. Löwis11437992002-04-12 09:54:03 +000018291
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018292# determine wchar_t size
18293if test "$wchar_h" = yes
18294then
Martin v. Löwis11437992002-04-12 09:54:03 +000018295 echo "$as_me:$LINENO: checking for wchar_t" >&5
18296echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
18297if test "${ac_cv_type_wchar_t+set}" = set; then
18298 echo $ECHO_N "(cached) $ECHO_C" >&6
18299else
18300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018301/* confdefs.h. */
18302_ACEOF
18303cat confdefs.h >>conftest.$ac_ext
18304cat >>conftest.$ac_ext <<_ACEOF
18305/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018306#include <wchar.h>
18307
Martin v. Löwis11437992002-04-12 09:54:03 +000018308int
18309main ()
18310{
18311if ((wchar_t *) 0)
18312 return 0;
18313if (sizeof (wchar_t))
18314 return 0;
18315 ;
18316 return 0;
18317}
18318_ACEOF
18319rm -f conftest.$ac_objext
18320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018321 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018322 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018323 grep -v '^ *+' conftest.er1 >conftest.err
18324 rm -f conftest.er1
18325 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018326 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18327 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018328 { ac_try='test -z "$ac_c_werror_flag"
18329 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018330 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18331 (eval $ac_try) 2>&5
18332 ac_status=$?
18333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18334 (exit $ac_status); }; } &&
18335 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18337 (eval $ac_try) 2>&5
18338 ac_status=$?
18339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18340 (exit $ac_status); }; }; then
18341 ac_cv_type_wchar_t=yes
18342else
18343 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018344sed 's/^/| /' conftest.$ac_ext >&5
18345
Martin v. Löwis11437992002-04-12 09:54:03 +000018346ac_cv_type_wchar_t=no
18347fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018348rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018349fi
18350echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
18351echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
18352
18353echo "$as_me:$LINENO: checking size of wchar_t" >&5
18354echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
18355if test "${ac_cv_sizeof_wchar_t+set}" = set; then
18356 echo $ECHO_N "(cached) $ECHO_C" >&6
18357else
18358 if test "$ac_cv_type_wchar_t" = yes; then
18359 # The cast to unsigned long works around a bug in the HP C Compiler
18360 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18361 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18362 # This bug is HP SR number 8606223364.
18363 if test "$cross_compiling" = yes; then
18364 # Depending upon the size, compute the lo and hi bounds.
18365cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018366/* confdefs.h. */
18367_ACEOF
18368cat confdefs.h >>conftest.$ac_ext
18369cat >>conftest.$ac_ext <<_ACEOF
18370/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018371#include <wchar.h>
18372
Martin v. Löwis11437992002-04-12 09:54:03 +000018373int
18374main ()
18375{
18376static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
18377test_array [0] = 0
18378
18379 ;
18380 return 0;
18381}
18382_ACEOF
18383rm -f conftest.$ac_objext
18384if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018385 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018386 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018387 grep -v '^ *+' conftest.er1 >conftest.err
18388 rm -f conftest.er1
18389 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18391 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018392 { ac_try='test -z "$ac_c_werror_flag"
18393 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018394 { (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); }; } &&
18399 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18401 (eval $ac_try) 2>&5
18402 ac_status=$?
18403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18404 (exit $ac_status); }; }; then
18405 ac_lo=0 ac_mid=0
18406 while :; do
18407 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018408/* confdefs.h. */
18409_ACEOF
18410cat confdefs.h >>conftest.$ac_ext
18411cat >>conftest.$ac_ext <<_ACEOF
18412/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018413#include <wchar.h>
18414
Martin v. Löwis11437992002-04-12 09:54:03 +000018415int
18416main ()
18417{
18418static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
18419test_array [0] = 0
18420
18421 ;
18422 return 0;
18423}
18424_ACEOF
18425rm -f conftest.$ac_objext
18426if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018427 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018428 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018429 grep -v '^ *+' conftest.er1 >conftest.err
18430 rm -f conftest.er1
18431 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18433 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018434 { ac_try='test -z "$ac_c_werror_flag"
18435 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18437 (eval $ac_try) 2>&5
18438 ac_status=$?
18439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18440 (exit $ac_status); }; } &&
18441 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18443 (eval $ac_try) 2>&5
18444 ac_status=$?
18445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18446 (exit $ac_status); }; }; then
18447 ac_hi=$ac_mid; break
18448else
18449 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018450sed 's/^/| /' conftest.$ac_ext >&5
18451
Martin v. Löwis11437992002-04-12 09:54:03 +000018452ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000018453 if test $ac_lo -le $ac_mid; then
18454 ac_lo= ac_hi=
18455 break
18456 fi
18457 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000018458fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018459rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018460 done
18461else
18462 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018463sed 's/^/| /' conftest.$ac_ext >&5
18464
Martin v. Löwis11437992002-04-12 09:54:03 +000018465cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018466/* confdefs.h. */
18467_ACEOF
18468cat confdefs.h >>conftest.$ac_ext
18469cat >>conftest.$ac_ext <<_ACEOF
18470/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018471#include <wchar.h>
18472
Martin v. Löwis11437992002-04-12 09:54:03 +000018473int
18474main ()
18475{
18476static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
18477test_array [0] = 0
18478
18479 ;
18480 return 0;
18481}
18482_ACEOF
18483rm -f conftest.$ac_objext
18484if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018485 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018486 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018487 grep -v '^ *+' conftest.er1 >conftest.err
18488 rm -f conftest.er1
18489 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18491 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018492 { ac_try='test -z "$ac_c_werror_flag"
18493 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18495 (eval $ac_try) 2>&5
18496 ac_status=$?
18497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18498 (exit $ac_status); }; } &&
18499 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018500 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18501 (eval $ac_try) 2>&5
18502 ac_status=$?
18503 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18504 (exit $ac_status); }; }; then
18505 ac_hi=-1 ac_mid=-1
18506 while :; do
18507 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018508/* confdefs.h. */
18509_ACEOF
18510cat confdefs.h >>conftest.$ac_ext
18511cat >>conftest.$ac_ext <<_ACEOF
18512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018513#include <wchar.h>
18514
Martin v. Löwis11437992002-04-12 09:54:03 +000018515int
18516main ()
18517{
18518static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
18519test_array [0] = 0
18520
18521 ;
18522 return 0;
18523}
18524_ACEOF
18525rm -f conftest.$ac_objext
18526if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018527 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018528 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018529 grep -v '^ *+' conftest.er1 >conftest.err
18530 rm -f conftest.er1
18531 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18533 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018534 { ac_try='test -z "$ac_c_werror_flag"
18535 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18537 (eval $ac_try) 2>&5
18538 ac_status=$?
18539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18540 (exit $ac_status); }; } &&
18541 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18543 (eval $ac_try) 2>&5
18544 ac_status=$?
18545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18546 (exit $ac_status); }; }; then
18547 ac_lo=$ac_mid; break
18548else
18549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018550sed 's/^/| /' conftest.$ac_ext >&5
18551
Martin v. Löwis11437992002-04-12 09:54:03 +000018552ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000018553 if test $ac_mid -le $ac_hi; then
18554 ac_lo= ac_hi=
18555 break
18556 fi
18557 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000018558fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018559rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018560 done
18561else
18562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018563sed 's/^/| /' conftest.$ac_ext >&5
18564
Martin v. Löwis11437992002-04-12 09:54:03 +000018565ac_lo= ac_hi=
18566fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018567rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018568fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018569rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018570# Binary search between lo and hi bounds.
18571while test "x$ac_lo" != "x$ac_hi"; do
18572 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18573 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018574/* confdefs.h. */
18575_ACEOF
18576cat confdefs.h >>conftest.$ac_ext
18577cat >>conftest.$ac_ext <<_ACEOF
18578/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018579#include <wchar.h>
18580
Martin v. Löwis11437992002-04-12 09:54:03 +000018581int
18582main ()
18583{
18584static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
18585test_array [0] = 0
18586
18587 ;
18588 return 0;
18589}
18590_ACEOF
18591rm -f conftest.$ac_objext
18592if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018593 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018594 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018595 grep -v '^ *+' conftest.er1 >conftest.err
18596 rm -f conftest.er1
18597 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18599 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018600 { ac_try='test -z "$ac_c_werror_flag"
18601 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18603 (eval $ac_try) 2>&5
18604 ac_status=$?
18605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18606 (exit $ac_status); }; } &&
18607 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18609 (eval $ac_try) 2>&5
18610 ac_status=$?
18611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18612 (exit $ac_status); }; }; then
18613 ac_hi=$ac_mid
18614else
18615 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018616sed 's/^/| /' conftest.$ac_ext >&5
18617
Martin v. Löwis11437992002-04-12 09:54:03 +000018618ac_lo=`expr '(' $ac_mid ')' + 1`
18619fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018620rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018621done
18622case $ac_lo in
18623?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018624'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
18625See \`config.log' for more details." >&5
18626echo "$as_me: error: cannot compute sizeof (wchar_t), 77
18627See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018628 { (exit 1); exit 1; }; } ;;
18629esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018630else
18631 if test "$cross_compiling" = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000018632 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18633See \`config.log' for more details." >&5
18634echo "$as_me: error: cannot run test program while cross compiling
18635See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018636 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000018637else
Martin v. Löwis11437992002-04-12 09:54:03 +000018638 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018639/* confdefs.h. */
18640_ACEOF
18641cat confdefs.h >>conftest.$ac_ext
18642cat >>conftest.$ac_ext <<_ACEOF
18643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018644#include <wchar.h>
18645
18646long longval () { return (long) (sizeof (wchar_t)); }
18647unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000018648#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018649#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018650int
18651main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018652{
Martin v. Löwis11437992002-04-12 09:54:03 +000018653
18654 FILE *f = fopen ("conftest.val", "w");
18655 if (! f)
18656 exit (1);
18657 if (((long) (sizeof (wchar_t))) < 0)
18658 {
18659 long i = longval ();
18660 if (i != ((long) (sizeof (wchar_t))))
18661 exit (1);
18662 fprintf (f, "%ld\n", i);
18663 }
18664 else
18665 {
18666 unsigned long i = ulongval ();
18667 if (i != ((long) (sizeof (wchar_t))))
18668 exit (1);
18669 fprintf (f, "%lu\n", i);
18670 }
18671 exit (ferror (f) || fclose (f) != 0);
18672
18673 ;
18674 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000018675}
Martin v. Löwis11437992002-04-12 09:54:03 +000018676_ACEOF
18677rm -f conftest$ac_exeext
18678if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18679 (eval $ac_link) 2>&5
18680 ac_status=$?
18681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18682 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18684 (eval $ac_try) 2>&5
18685 ac_status=$?
18686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18687 (exit $ac_status); }; }; then
18688 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000018689else
Martin v. Löwis11437992002-04-12 09:54:03 +000018690 echo "$as_me: program exited with status $ac_status" >&5
18691echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018692sed 's/^/| /' conftest.$ac_ext >&5
18693
Martin v. Löwis11437992002-04-12 09:54:03 +000018694( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000018695{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
18696See \`config.log' for more details." >&5
18697echo "$as_me: error: cannot compute sizeof (wchar_t), 77
18698See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018699 { (exit 1); exit 1; }; }
18700fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018701rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018702fi
18703fi
18704rm -f conftest.val
18705else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018706 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000018707fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018708fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018709echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
18710echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
18711cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018712#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000018713_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018714
Michael W. Hudson54241132001-12-07 15:38:26 +000018715
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018716fi
18717
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018718echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
18719echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
18720have_ucs4_tcl=no
18721cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018722/* confdefs.h. */
18723_ACEOF
18724cat confdefs.h >>conftest.$ac_ext
18725cat >>conftest.$ac_ext <<_ACEOF
18726/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018727
18728#include <tcl.h>
18729#if TCL_UTF_MAX != 6
18730# error "NOT UCS4_TCL"
18731#endif
18732int
18733main ()
18734{
18735
18736 ;
18737 return 0;
18738}
18739_ACEOF
18740rm -f conftest.$ac_objext
18741if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018742 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018743 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018744 grep -v '^ *+' conftest.er1 >conftest.err
18745 rm -f conftest.er1
18746 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18748 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018749 { ac_try='test -z "$ac_c_werror_flag"
18750 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18752 (eval $ac_try) 2>&5
18753 ac_status=$?
18754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18755 (exit $ac_status); }; } &&
18756 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018757 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18758 (eval $ac_try) 2>&5
18759 ac_status=$?
18760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18761 (exit $ac_status); }; }; then
18762
18763
18764cat >>confdefs.h <<\_ACEOF
18765#define HAVE_UCS4_TCL 1
18766_ACEOF
18767
18768 have_ucs4_tcl=yes
18769
18770else
18771 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018772sed 's/^/| /' conftest.$ac_ext >&5
18773
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018774fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018775rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018776echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
18777echo "${ECHO_T}$have_ucs4_tcl" >&6
18778
Skip Montanaro6dead952003-09-25 14:50:04 +000018779# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018780if test "$wchar_h" = yes
18781then
18782 # check whether wchar_t is signed or not
18783 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
18784echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
18785 if test "${ac_cv_wchar_t_signed+set}" = set; then
18786 echo $ECHO_N "(cached) $ECHO_C" >&6
18787else
18788
18789 if test "$cross_compiling" = yes; then
18790 ac_cv_wchar_t_signed=yes
18791else
18792 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018793/* confdefs.h. */
18794_ACEOF
18795cat confdefs.h >>conftest.$ac_ext
18796cat >>conftest.$ac_ext <<_ACEOF
18797/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018798
18799 #include <wchar.h>
18800 int main()
18801 {
18802 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
18803 }
18804
18805_ACEOF
18806rm -f conftest$ac_exeext
18807if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18808 (eval $ac_link) 2>&5
18809 ac_status=$?
18810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18811 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18813 (eval $ac_try) 2>&5
18814 ac_status=$?
18815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18816 (exit $ac_status); }; }; then
18817 ac_cv_wchar_t_signed=yes
18818else
18819 echo "$as_me: program exited with status $ac_status" >&5
18820echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018821sed 's/^/| /' conftest.$ac_ext >&5
18822
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018823( exit $ac_status )
18824ac_cv_wchar_t_signed=no
18825fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018826rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018827fi
18828fi
18829
18830 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
18831echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
18832fi
18833
Martin v. Löwis11437992002-04-12 09:54:03 +000018834echo "$as_me:$LINENO: checking what type to use for unicode" >&5
18835echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018836# Check whether --enable-unicode or --disable-unicode was given.
18837if test "${enable_unicode+set}" = set; then
18838 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000018839
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018840else
18841 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000018842fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018843
18844if test $enable_unicode = yes
18845then
Martin v. Löwisfd917792001-06-27 20:22:04 +000018846 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018847 case "$have_ucs4_tcl" in
18848 yes) enable_unicode="ucs4"
18849 ;;
18850 *) enable_unicode="ucs2"
18851 ;;
18852 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018853fi
18854
Martin v. Löwis0036cba2002-04-12 09:58:45 +000018855
18856
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018857case "$enable_unicode" in
18858ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000018859 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018860#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000018861_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018862
18863 ;;
18864ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000018865 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018866#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000018867_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018868
18869 ;;
18870esac
18871
Michael W. Hudson54241132001-12-07 15:38:26 +000018872
Martin v. Löwis11437992002-04-12 09:54:03 +000018873
18874
Martin v. Löwis0036cba2002-04-12 09:58:45 +000018875
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018876if test "$enable_unicode" = "no"
18877then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000018878 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000018879 echo "$as_me:$LINENO: result: not used" >&5
18880echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018881else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000018882 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000018883
18884cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018885#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018886_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018887
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018888
18889 # wchar_t is only usable if it maps to an unsigned type
18890 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000018891 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018892 then
18893 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018894
Martin v. Löwis11437992002-04-12 09:54:03 +000018895cat >>confdefs.h <<\_ACEOF
18896#define HAVE_USABLE_WCHAR_T 1
18897_ACEOF
18898
18899 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018900#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000018901_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018902
18903 elif test "$ac_cv_sizeof_short" = "$unicode_size"
18904 then
18905 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000018906 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018907#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000018908_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018909
18910 elif test "$ac_cv_sizeof_long" = "$unicode_size"
18911 then
18912 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000018913 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018914#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000018915_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018916
18917 else
18918 PY_UNICODE_TYPE="no type found"
18919 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018920 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
18921echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018922fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018923
18924# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000018925echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
18926echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
18927if test "${ac_cv_c_bigendian+set}" = set; then
18928 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000018929else
Martin v. Löwis11437992002-04-12 09:54:03 +000018930 # See if sys/param.h defines the BYTE_ORDER macro.
18931cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018932/* confdefs.h. */
18933_ACEOF
18934cat confdefs.h >>conftest.$ac_ext
18935cat >>conftest.$ac_ext <<_ACEOF
18936/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000018937#include <sys/types.h>
18938#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000018939
Martin v. Löwis11437992002-04-12 09:54:03 +000018940int
18941main ()
18942{
Guido van Rossumef2255b2000-03-10 22:30:29 +000018943#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
18944 bogus endian macros
18945#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018946
18947 ;
18948 return 0;
18949}
18950_ACEOF
18951rm -f conftest.$ac_objext
18952if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018953 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018955 grep -v '^ *+' conftest.er1 >conftest.err
18956 rm -f conftest.er1
18957 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18959 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000018960 { ac_try='test -z "$ac_c_werror_flag"
18961 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018962 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18963 (eval $ac_try) 2>&5
18964 ac_status=$?
18965 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18966 (exit $ac_status); }; } &&
18967 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018968 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18969 (eval $ac_try) 2>&5
18970 ac_status=$?
18971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18972 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000018973 # It does; now see whether it defined to BIG_ENDIAN or not.
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 Rossumef2255b2000-03-10 22:30:29 +000018980#include <sys/types.h>
18981#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000018982
Martin v. Löwis11437992002-04-12 09:54:03 +000018983int
18984main ()
18985{
Guido van Rossumef2255b2000-03-10 22:30:29 +000018986#if BYTE_ORDER != BIG_ENDIAN
18987 not big endian
18988#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018989
18990 ;
18991 return 0;
18992}
18993_ACEOF
18994rm -f conftest.$ac_objext
18995if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018996 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018997 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018998 grep -v '^ *+' conftest.er1 >conftest.err
18999 rm -f conftest.er1
19000 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19002 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019003 { ac_try='test -z "$ac_c_werror_flag"
19004 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19006 (eval $ac_try) 2>&5
19007 ac_status=$?
19008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19009 (exit $ac_status); }; } &&
19010 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019011 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19012 (eval $ac_try) 2>&5
19013 ac_status=$?
19014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19015 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019016 ac_cv_c_bigendian=yes
19017else
Martin v. Löwis11437992002-04-12 09:54:03 +000019018 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019019sed 's/^/| /' conftest.$ac_ext >&5
19020
Martin v. Löwis11437992002-04-12 09:54:03 +000019021ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000019022fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019023rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000019024else
Martin v. Löwis11437992002-04-12 09:54:03 +000019025 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019026sed 's/^/| /' conftest.$ac_ext >&5
19027
Martin v. Löwis11437992002-04-12 09:54:03 +000019028# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000019029if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019030 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000019031 ac_cv_c_bigendian=unknown
19032 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019033/* confdefs.h. */
19034_ACEOF
19035cat confdefs.h >>conftest.$ac_ext
19036cat >>conftest.$ac_ext <<_ACEOF
19037/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019038short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
19039short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
19040void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
19041short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
19042short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
19043void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019044int
19045main ()
19046{
19047 _ascii (); _ebcdic ();
19048 ;
19049 return 0;
19050}
19051_ACEOF
19052rm -f conftest.$ac_objext
19053if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019054 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019056 grep -v '^ *+' conftest.er1 >conftest.err
19057 rm -f conftest.er1
19058 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19060 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019061 { ac_try='test -z "$ac_c_werror_flag"
19062 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19064 (eval $ac_try) 2>&5
19065 ac_status=$?
19066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19067 (exit $ac_status); }; } &&
19068 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019069 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19070 (eval $ac_try) 2>&5
19071 ac_status=$?
19072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19073 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019074 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019075 ac_cv_c_bigendian=yes
19076fi
Skip Montanaro6dead952003-09-25 14:50:04 +000019077if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019078 if test "$ac_cv_c_bigendian" = unknown; then
19079 ac_cv_c_bigendian=no
19080 else
19081 # finding both strings is unlikely to happen, but who knows?
19082 ac_cv_c_bigendian=unknown
19083 fi
19084fi
19085else
19086 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019087sed 's/^/| /' conftest.$ac_ext >&5
19088
Martin v. Löwis11437992002-04-12 09:54:03 +000019089fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019090rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019091else
19092 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019093/* confdefs.h. */
19094_ACEOF
19095cat confdefs.h >>conftest.$ac_ext
19096cat >>conftest.$ac_ext <<_ACEOF
19097/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019098int
19099main ()
19100{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019101 /* Are we little or big endian? From Harbison&Steele. */
19102 union
19103 {
19104 long l;
19105 char c[sizeof (long)];
19106 } u;
19107 u.l = 1;
19108 exit (u.c[sizeof (long) - 1] == 1);
19109}
Martin v. Löwis11437992002-04-12 09:54:03 +000019110_ACEOF
19111rm -f conftest$ac_exeext
19112if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19113 (eval $ac_link) 2>&5
19114 ac_status=$?
19115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19116 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19118 (eval $ac_try) 2>&5
19119 ac_status=$?
19120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19121 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019122 ac_cv_c_bigendian=no
19123else
Martin v. Löwis11437992002-04-12 09:54:03 +000019124 echo "$as_me: program exited with status $ac_status" >&5
19125echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019126sed 's/^/| /' conftest.$ac_ext >&5
19127
Martin v. Löwis11437992002-04-12 09:54:03 +000019128( exit $ac_status )
19129ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000019130fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019131rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000019132fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019133fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019134rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019135fi
19136echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
19137echo "${ECHO_T}$ac_cv_c_bigendian" >&6
19138case $ac_cv_c_bigendian in
19139 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000019140
Martin v. Löwis11437992002-04-12 09:54:03 +000019141cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000019142#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019143_ACEOF
19144 ;;
19145 no)
19146 ;;
19147 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000019148 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019149presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019150echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019151presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
19152 { (exit 1); exit 1; }; } ;;
19153esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000019154
Michael W. Hudson54241132001-12-07 15:38:26 +000019155
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019156# Check whether right shifting a negative integer extends the sign bit
19157# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000019158echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
19159echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
19160if test "${ac_cv_rshift_extends_sign+set}" = set; then
19161 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000019162else
Martin v. Löwis11437992002-04-12 09:54:03 +000019163
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019164if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000019165 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019166else
Martin v. Löwis11437992002-04-12 09:54:03 +000019167 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019168/* confdefs.h. */
19169_ACEOF
19170cat confdefs.h >>conftest.$ac_ext
19171cat >>conftest.$ac_ext <<_ACEOF
19172/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019173
19174int main()
19175{
Vladimir Marangozova6180282000-07-12 05:05:06 +000019176 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019177}
19178
Martin v. Löwis11437992002-04-12 09:54:03 +000019179_ACEOF
19180rm -f conftest$ac_exeext
19181if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19182 (eval $ac_link) 2>&5
19183 ac_status=$?
19184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19185 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
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); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000019191 ac_cv_rshift_extends_sign=yes
19192else
Martin v. Löwis11437992002-04-12 09:54:03 +000019193 echo "$as_me: program exited with status $ac_status" >&5
19194echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019195sed 's/^/| /' conftest.$ac_ext >&5
19196
Martin v. Löwis11437992002-04-12 09:54:03 +000019197( exit $ac_status )
19198ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000019199fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019200rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019201fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000019202fi
19203
Martin v. Löwis11437992002-04-12 09:54:03 +000019204echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
19205echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000019206if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019207then
Martin v. Löwis11437992002-04-12 09:54:03 +000019208
19209cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019210#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019211_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019212
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019213fi
19214
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019215# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019216echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
19217echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
19218if test "${ac_cv_have_getc_unlocked+set}" = set; then
19219 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019220else
Martin v. Löwis11437992002-04-12 09:54:03 +000019221
19222cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019223/* confdefs.h. */
19224_ACEOF
19225cat confdefs.h >>conftest.$ac_ext
19226cat >>conftest.$ac_ext <<_ACEOF
19227/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019228#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019229int
19230main ()
19231{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019232
19233 FILE *f = fopen("/dev/null", "r");
19234 flockfile(f);
19235 getc_unlocked(f);
19236 funlockfile(f);
19237
Martin v. Löwis11437992002-04-12 09:54:03 +000019238 ;
19239 return 0;
19240}
19241_ACEOF
19242rm -f conftest.$ac_objext conftest$ac_exeext
19243if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019244 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019245 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019246 grep -v '^ *+' conftest.er1 >conftest.err
19247 rm -f conftest.er1
19248 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019249 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19250 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019251 { ac_try='test -z "$ac_c_werror_flag"
19252 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019253 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19254 (eval $ac_try) 2>&5
19255 ac_status=$?
19256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19257 (exit $ac_status); }; } &&
19258 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19260 (eval $ac_try) 2>&5
19261 ac_status=$?
19262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19263 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019264 ac_cv_have_getc_unlocked=yes
19265else
Martin v. Löwis11437992002-04-12 09:54:03 +000019266 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019267sed 's/^/| /' conftest.$ac_ext >&5
19268
Martin v. Löwis11437992002-04-12 09:54:03 +000019269ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019270fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019271rm -f conftest.err conftest.$ac_objext \
19272 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019273fi
19274
Martin v. Löwis11437992002-04-12 09:54:03 +000019275echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
19276echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019277if test "$ac_cv_have_getc_unlocked" = yes
19278then
Martin v. Löwis11437992002-04-12 09:54:03 +000019279
19280cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019281#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019282_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019283
19284fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019285
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019286# check for readline 2.1
19287echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
19288echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
19289if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
19290 echo $ECHO_N "(cached) $ECHO_C" >&6
19291else
19292 ac_check_lib_save_LIBS=$LIBS
19293LIBS="-lreadline -ltermcap $LIBS"
19294cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019295/* confdefs.h. */
19296_ACEOF
19297cat confdefs.h >>conftest.$ac_ext
19298cat >>conftest.$ac_ext <<_ACEOF
19299/* end confdefs.h. */
19300
19301/* Override any gcc2 internal prototype to avoid an error. */
19302#ifdef __cplusplus
19303extern "C"
19304#endif
19305/* We use char because int might match the return type of a gcc2
19306 builtin and then its argument prototype would still apply. */
19307char rl_callback_handler_install ();
19308int
19309main ()
19310{
19311rl_callback_handler_install ();
19312 ;
19313 return 0;
19314}
19315_ACEOF
19316rm -f conftest.$ac_objext conftest$ac_exeext
19317if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019318 (eval $ac_link) 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019319 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019320 grep -v '^ *+' conftest.er1 >conftest.err
19321 rm -f conftest.er1
19322 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19324 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019325 { ac_try='test -z "$ac_c_werror_flag"
19326 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19328 (eval $ac_try) 2>&5
19329 ac_status=$?
19330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19331 (exit $ac_status); }; } &&
19332 { ac_try='test -s conftest$ac_exeext'
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019333 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19334 (eval $ac_try) 2>&5
19335 ac_status=$?
19336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19337 (exit $ac_status); }; }; then
19338 ac_cv_lib_readline_rl_callback_handler_install=yes
19339else
19340 echo "$as_me: failed program was:" >&5
19341sed 's/^/| /' conftest.$ac_ext >&5
19342
19343ac_cv_lib_readline_rl_callback_handler_install=no
19344fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019345rm -f conftest.err conftest.$ac_objext \
19346 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019347LIBS=$ac_check_lib_save_LIBS
19348fi
19349echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
19350echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
19351if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
19352
19353cat >>confdefs.h <<\_ACEOF
19354#define HAVE_RL_CALLBACK 1
19355_ACEOF
19356
19357fi
19358
19359
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019360# check for readline 2.2
19361cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019362/* confdefs.h. */
19363_ACEOF
19364cat confdefs.h >>conftest.$ac_ext
19365cat >>conftest.$ac_ext <<_ACEOF
19366/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019367#include <readline/readline.h>
19368_ACEOF
19369if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19370 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19371 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000019372 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019373 rm -f conftest.er1
19374 cat conftest.err >&5
19375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19376 (exit $ac_status); } >/dev/null; then
19377 if test -s conftest.err; then
19378 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000019379 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019380 else
19381 ac_cpp_err=
19382 fi
19383else
19384 ac_cpp_err=yes
19385fi
19386if test -z "$ac_cpp_err"; then
19387 have_readline=yes
19388else
19389 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019390sed 's/^/| /' conftest.$ac_ext >&5
19391
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019392 have_readline=no
19393fi
19394rm -f conftest.err conftest.$ac_ext
19395if test $have_readline = yes
19396then
19397 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019398/* confdefs.h. */
19399_ACEOF
19400cat confdefs.h >>conftest.$ac_ext
19401cat >>conftest.$ac_ext <<_ACEOF
19402/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019403#include <readline/readline.h>
19404
19405_ACEOF
19406if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000019407 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019408
19409cat >>confdefs.h <<\_ACEOF
19410#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
19411_ACEOF
19412
19413fi
19414rm -f conftest*
19415
19416fi
19417
Martin v. Löwis0daad592001-09-30 21:09:59 +000019418# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000019419echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
19420echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
19421if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
19422 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000019423else
Martin v. Löwis11437992002-04-12 09:54:03 +000019424 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000019425LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019426cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019427/* confdefs.h. */
19428_ACEOF
19429cat confdefs.h >>conftest.$ac_ext
19430cat >>conftest.$ac_ext <<_ACEOF
19431/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019432
Guido van Rossum353ae582001-07-10 16:45:32 +000019433/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019434#ifdef __cplusplus
19435extern "C"
19436#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000019437/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019438 builtin and then its argument prototype would still apply. */
19439char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019440int
19441main ()
19442{
19443rl_pre_input_hook ();
19444 ;
19445 return 0;
19446}
19447_ACEOF
19448rm -f conftest.$ac_objext conftest$ac_exeext
19449if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019450 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019451 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019452 grep -v '^ *+' conftest.er1 >conftest.err
19453 rm -f conftest.er1
19454 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019455 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19456 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019457 { ac_try='test -z "$ac_c_werror_flag"
19458 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019459 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19460 (eval $ac_try) 2>&5
19461 ac_status=$?
19462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19463 (exit $ac_status); }; } &&
19464 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19466 (eval $ac_try) 2>&5
19467 ac_status=$?
19468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19469 (exit $ac_status); }; }; then
19470 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000019471else
Martin v. Löwis11437992002-04-12 09:54:03 +000019472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019473sed 's/^/| /' conftest.$ac_ext >&5
19474
Martin v. Löwis11437992002-04-12 09:54:03 +000019475ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000019476fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019477rm -f conftest.err conftest.$ac_objext \
19478 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019479LIBS=$ac_check_lib_save_LIBS
19480fi
19481echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
19482echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
19483if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019484
Martin v. Löwis11437992002-04-12 09:54:03 +000019485cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000019486#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019487_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000019488
Martin v. Löwis0daad592001-09-30 21:09:59 +000019489fi
19490
Michael W. Hudson54241132001-12-07 15:38:26 +000019491
Martin v. Löwis0daad592001-09-30 21:09:59 +000019492# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000019493echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
19494echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
19495if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
19496 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000019497else
Martin v. Löwis11437992002-04-12 09:54:03 +000019498 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000019499LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019500cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019501/* confdefs.h. */
19502_ACEOF
19503cat confdefs.h >>conftest.$ac_ext
19504cat >>conftest.$ac_ext <<_ACEOF
19505/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019506
Martin v. Löwis0daad592001-09-30 21:09:59 +000019507/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019508#ifdef __cplusplus
19509extern "C"
19510#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000019511/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019512 builtin and then its argument prototype would still apply. */
19513char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019514int
19515main ()
19516{
19517rl_completion_matches ();
19518 ;
19519 return 0;
19520}
19521_ACEOF
19522rm -f conftest.$ac_objext conftest$ac_exeext
19523if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019524 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019526 grep -v '^ *+' conftest.er1 >conftest.err
19527 rm -f conftest.er1
19528 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19530 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000019531 { ac_try='test -z "$ac_c_werror_flag"
19532 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19534 (eval $ac_try) 2>&5
19535 ac_status=$?
19536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19537 (exit $ac_status); }; } &&
19538 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19540 (eval $ac_try) 2>&5
19541 ac_status=$?
19542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19543 (exit $ac_status); }; }; then
19544 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000019545else
Martin v. Löwis11437992002-04-12 09:54:03 +000019546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019547sed 's/^/| /' conftest.$ac_ext >&5
19548
Martin v. Löwis11437992002-04-12 09:54:03 +000019549ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000019550fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019551rm -f conftest.err conftest.$ac_objext \
19552 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019553LIBS=$ac_check_lib_save_LIBS
19554fi
19555echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
19556echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
19557if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019558
Martin v. Löwis11437992002-04-12 09:54:03 +000019559cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000019560#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019561_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000019562
Guido van Rossum353ae582001-07-10 16:45:32 +000019563fi
19564
Jack Jansendd19cf82001-12-06 22:36:17 +000019565
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019566# also in readline 4.2
19567cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019568/* confdefs.h. */
19569_ACEOF
19570cat confdefs.h >>conftest.$ac_ext
19571cat >>conftest.$ac_ext <<_ACEOF
19572/* end confdefs.h. */
19573#include <readline/readline.h>
19574_ACEOF
19575if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19576 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19577 ac_status=$?
19578 grep -v '^ *+' conftest.er1 >conftest.err
19579 rm -f conftest.er1
19580 cat conftest.err >&5
19581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19582 (exit $ac_status); } >/dev/null; then
19583 if test -s conftest.err; then
19584 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000019585 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019586 else
19587 ac_cpp_err=
19588 fi
19589else
19590 ac_cpp_err=yes
19591fi
19592if test -z "$ac_cpp_err"; then
19593 have_readline=yes
19594else
19595 echo "$as_me: failed program was:" >&5
19596sed 's/^/| /' conftest.$ac_ext >&5
19597
19598 have_readline=no
19599fi
19600rm -f conftest.err conftest.$ac_ext
19601if test $have_readline = yes
19602then
19603 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019604/* confdefs.h. */
19605_ACEOF
19606cat confdefs.h >>conftest.$ac_ext
19607cat >>conftest.$ac_ext <<_ACEOF
19608/* end confdefs.h. */
19609#include <readline/readline.h>
19610
19611_ACEOF
19612if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19613 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
19614
19615cat >>confdefs.h <<\_ACEOF
19616#define HAVE_RL_CATCH_SIGNAL 1
19617_ACEOF
19618
19619fi
19620rm -f conftest*
19621
19622fi
19623
Martin v. Löwis11437992002-04-12 09:54:03 +000019624echo "$as_me:$LINENO: checking for broken nice()" >&5
19625echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
19626if test "${ac_cv_broken_nice+set}" = set; then
19627 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000019628else
Martin v. Löwis11437992002-04-12 09:54:03 +000019629
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019630if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000019631 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019632else
Martin v. Löwis11437992002-04-12 09:54:03 +000019633 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019634/* confdefs.h. */
19635_ACEOF
19636cat confdefs.h >>conftest.$ac_ext
19637cat >>conftest.$ac_ext <<_ACEOF
19638/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019639
19640int main()
19641{
19642 int val1 = nice(1);
19643 if (val1 != -1 && val1 == nice(2))
19644 exit(0);
19645 exit(1);
19646}
19647
Martin v. Löwis11437992002-04-12 09:54:03 +000019648_ACEOF
19649rm -f conftest$ac_exeext
19650if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19651 (eval $ac_link) 2>&5
19652 ac_status=$?
19653 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19654 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19655 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19656 (eval $ac_try) 2>&5
19657 ac_status=$?
19658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19659 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019660 ac_cv_broken_nice=yes
19661else
Martin v. Löwis11437992002-04-12 09:54:03 +000019662 echo "$as_me: program exited with status $ac_status" >&5
19663echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019664sed 's/^/| /' conftest.$ac_ext >&5
19665
Martin v. Löwis11437992002-04-12 09:54:03 +000019666( exit $ac_status )
19667ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019668fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019669rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019670fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019671fi
19672
Martin v. Löwis11437992002-04-12 09:54:03 +000019673echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
19674echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019675if test "$ac_cv_broken_nice" = yes
19676then
Martin v. Löwis11437992002-04-12 09:54:03 +000019677
19678cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019679#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019680_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019681
19682fi
19683
Nicholas Bastine62c5c82004-03-21 23:45:42 +000019684echo "$as_me:$LINENO: checking for broken poll()" >&5
19685echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
19686if test "$cross_compiling" = yes; then
19687 ac_cv_broken_poll=no
19688else
19689 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000019690/* confdefs.h. */
19691_ACEOF
19692cat confdefs.h >>conftest.$ac_ext
19693cat >>conftest.$ac_ext <<_ACEOF
19694/* end confdefs.h. */
19695
19696#include <poll.h>
19697
19698int main (void)
19699 {
19700 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
19701
19702 close (42);
19703
19704 int poll_test = poll (&poll_struct, 1, 0);
19705
19706 if (poll_test < 0)
19707 {
19708 exit(0);
19709 }
19710 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
19711 {
19712 exit(0);
19713 }
19714 else
19715 {
19716 exit(1);
19717 }
19718 }
19719
19720_ACEOF
19721rm -f conftest$ac_exeext
19722if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19723 (eval $ac_link) 2>&5
19724 ac_status=$?
19725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19726 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19727 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19728 (eval $ac_try) 2>&5
19729 ac_status=$?
19730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19731 (exit $ac_status); }; }; then
19732 ac_cv_broken_poll=yes
19733else
19734 echo "$as_me: program exited with status $ac_status" >&5
19735echo "$as_me: failed program was:" >&5
19736sed 's/^/| /' conftest.$ac_ext >&5
19737
19738( exit $ac_status )
19739ac_cv_broken_poll=no
19740fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019741rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000019742fi
19743echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
19744echo "${ECHO_T}$ac_cv_broken_poll" >&6
19745if test "$ac_cv_broken_poll" = yes
19746then
19747
19748cat >>confdefs.h <<\_ACEOF
19749#define HAVE_BROKEN_POLL 1
19750_ACEOF
19751
19752fi
19753
Brett Cannon43802422005-02-10 20:48:03 +000019754# Before we can test tzset, we need to check if struct tm has a tm_zone
19755# and/or if we support tzname[]
19756echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19757echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
19758if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
19759 echo $ECHO_N "(cached) $ECHO_C" >&6
19760else
19761 cat >conftest.$ac_ext <<_ACEOF
19762/* confdefs.h. */
19763_ACEOF
19764cat confdefs.h >>conftest.$ac_ext
19765cat >>conftest.$ac_ext <<_ACEOF
19766/* end confdefs.h. */
19767#include <sys/types.h>
19768#include <$ac_cv_struct_tm>
19769
19770
19771int
19772main ()
19773{
19774static struct tm ac_aggr;
19775if (ac_aggr.tm_zone)
19776return 0;
19777 ;
19778 return 0;
19779}
19780_ACEOF
19781rm -f conftest.$ac_objext
19782if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19783 (eval $ac_compile) 2>conftest.er1
19784 ac_status=$?
19785 grep -v '^ *+' conftest.er1 >conftest.err
19786 rm -f conftest.er1
19787 cat conftest.err >&5
19788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19789 (exit $ac_status); } &&
19790 { ac_try='test -z "$ac_c_werror_flag"
19791 || test ! -s conftest.err'
19792 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19793 (eval $ac_try) 2>&5
19794 ac_status=$?
19795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19796 (exit $ac_status); }; } &&
19797 { ac_try='test -s conftest.$ac_objext'
19798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19799 (eval $ac_try) 2>&5
19800 ac_status=$?
19801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19802 (exit $ac_status); }; }; then
19803 ac_cv_member_struct_tm_tm_zone=yes
19804else
19805 echo "$as_me: failed program was:" >&5
19806sed 's/^/| /' conftest.$ac_ext >&5
19807
19808cat >conftest.$ac_ext <<_ACEOF
19809/* confdefs.h. */
19810_ACEOF
19811cat confdefs.h >>conftest.$ac_ext
19812cat >>conftest.$ac_ext <<_ACEOF
19813/* end confdefs.h. */
19814#include <sys/types.h>
19815#include <$ac_cv_struct_tm>
19816
19817
19818int
19819main ()
19820{
19821static struct tm ac_aggr;
19822if (sizeof ac_aggr.tm_zone)
19823return 0;
19824 ;
19825 return 0;
19826}
19827_ACEOF
19828rm -f conftest.$ac_objext
19829if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
19830 (eval $ac_compile) 2>conftest.er1
19831 ac_status=$?
19832 grep -v '^ *+' conftest.er1 >conftest.err
19833 rm -f conftest.er1
19834 cat conftest.err >&5
19835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19836 (exit $ac_status); } &&
19837 { ac_try='test -z "$ac_c_werror_flag"
19838 || test ! -s conftest.err'
19839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19840 (eval $ac_try) 2>&5
19841 ac_status=$?
19842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19843 (exit $ac_status); }; } &&
19844 { ac_try='test -s conftest.$ac_objext'
19845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19846 (eval $ac_try) 2>&5
19847 ac_status=$?
19848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19849 (exit $ac_status); }; }; then
19850 ac_cv_member_struct_tm_tm_zone=yes
19851else
19852 echo "$as_me: failed program was:" >&5
19853sed 's/^/| /' conftest.$ac_ext >&5
19854
19855ac_cv_member_struct_tm_tm_zone=no
19856fi
19857rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19858fi
19859rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
19860fi
19861echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19862echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
19863if test $ac_cv_member_struct_tm_tm_zone = yes; then
19864
19865cat >>confdefs.h <<_ACEOF
19866#define HAVE_STRUCT_TM_TM_ZONE 1
19867_ACEOF
19868
19869
19870fi
19871
19872if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19873
19874cat >>confdefs.h <<\_ACEOF
19875#define HAVE_TM_ZONE 1
19876_ACEOF
19877
19878else
19879 echo "$as_me:$LINENO: checking for tzname" >&5
19880echo $ECHO_N "checking for tzname... $ECHO_C" >&6
19881if test "${ac_cv_var_tzname+set}" = set; then
19882 echo $ECHO_N "(cached) $ECHO_C" >&6
19883else
19884 cat >conftest.$ac_ext <<_ACEOF
19885/* confdefs.h. */
19886_ACEOF
19887cat confdefs.h >>conftest.$ac_ext
19888cat >>conftest.$ac_ext <<_ACEOF
19889/* end confdefs.h. */
19890#include <time.h>
19891#ifndef tzname /* For SGI. */
19892extern char *tzname[]; /* RS6000 and others reject char **tzname. */
19893#endif
19894
19895int
19896main ()
19897{
19898atoi(*tzname);
19899 ;
19900 return 0;
19901}
19902_ACEOF
19903rm -f conftest.$ac_objext conftest$ac_exeext
19904if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19905 (eval $ac_link) 2>conftest.er1
19906 ac_status=$?
19907 grep -v '^ *+' conftest.er1 >conftest.err
19908 rm -f conftest.er1
19909 cat conftest.err >&5
19910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19911 (exit $ac_status); } &&
19912 { ac_try='test -z "$ac_c_werror_flag"
19913 || test ! -s conftest.err'
19914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19915 (eval $ac_try) 2>&5
19916 ac_status=$?
19917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19918 (exit $ac_status); }; } &&
19919 { ac_try='test -s conftest$ac_exeext'
19920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19921 (eval $ac_try) 2>&5
19922 ac_status=$?
19923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19924 (exit $ac_status); }; }; then
19925 ac_cv_var_tzname=yes
19926else
19927 echo "$as_me: failed program was:" >&5
19928sed 's/^/| /' conftest.$ac_ext >&5
19929
19930ac_cv_var_tzname=no
19931fi
19932rm -f conftest.err conftest.$ac_objext \
19933 conftest$ac_exeext conftest.$ac_ext
19934fi
19935echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19936echo "${ECHO_T}$ac_cv_var_tzname" >&6
19937 if test $ac_cv_var_tzname = yes; then
19938
19939cat >>confdefs.h <<\_ACEOF
19940#define HAVE_TZNAME 1
19941_ACEOF
19942
19943 fi
19944fi
19945
Nicholas Bastine62c5c82004-03-21 23:45:42 +000019946
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019947# tzset(3) exists and works like we expect it to
19948echo "$as_me:$LINENO: checking for working tzset()" >&5
19949echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
19950if test "${ac_cv_working_tzset+set}" = set; then
19951 echo $ECHO_N "(cached) $ECHO_C" >&6
19952else
19953
19954if test "$cross_compiling" = yes; then
19955 ac_cv_working_tzset=no
19956else
19957 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019958/* confdefs.h. */
19959_ACEOF
19960cat confdefs.h >>conftest.$ac_ext
19961cat >>conftest.$ac_ext <<_ACEOF
19962/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019963
19964#include <stdlib.h>
19965#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000019966#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000019967
19968#if HAVE_TZNAME
19969extern char *tzname[];
19970#endif
19971
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019972int main()
19973{
Brett Cannon18367812003-09-19 00:59:16 +000019974 /* Note that we need to ensure that not only does tzset(3)
19975 do 'something' with localtime, but it works as documented
19976 in the library reference and as expected by the test suite.
19977
19978 Red Hat 6.2 doesn't understand the southern hemisphere
19979 after New Year's Day; it thinks swaps on that day.
19980 */
19981
19982 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
19983 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
19984
Neal Norwitz7f2588c2003-04-11 15:35:53 +000019985 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019986 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000019987 if (localtime(&groundhogday)->tm_hour != 0)
19988 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000019989#if HAVE_TZNAME
19990 /* For UTC, tzname[1] is sometimes "", sometimes " " */
19991 if (strcmp(tzname[0], "UTC") ||
19992 (tzname[1][0] != 0 && tzname[1][0] != ' '))
19993 exit(1);
19994#endif
Brett Cannon18367812003-09-19 00:59:16 +000019995
Neal Norwitz7f2588c2003-04-11 15:35:53 +000019996 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019997 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000019998 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019999 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020000#if HAVE_TZNAME
20001 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
20002 exit(1);
20003#endif
Brett Cannon18367812003-09-19 00:59:16 +000020004
20005 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
20006 tzset();
20007 if (localtime(&groundhogday)->tm_hour != 11)
20008 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020009#if HAVE_TZNAME
20010 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
20011 exit(1);
20012#endif
20013
20014#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000020015 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
20016 exit(1);
20017 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
20018 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000020019#endif
Brett Cannon18367812003-09-19 00:59:16 +000020020
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020021 exit(0);
20022}
20023
20024_ACEOF
20025rm -f conftest$ac_exeext
20026if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
20027 (eval $ac_link) 2>&5
20028 ac_status=$?
20029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20030 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20031 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20032 (eval $ac_try) 2>&5
20033 ac_status=$?
20034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20035 (exit $ac_status); }; }; then
20036 ac_cv_working_tzset=yes
20037else
20038 echo "$as_me: program exited with status $ac_status" >&5
20039echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020040sed 's/^/| /' conftest.$ac_ext >&5
20041
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020042( exit $ac_status )
20043ac_cv_working_tzset=no
20044fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020045rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000020046fi
20047fi
20048
20049echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
20050echo "${ECHO_T}$ac_cv_working_tzset" >&6
20051if test "$ac_cv_working_tzset" = yes
20052then
20053
20054cat >>confdefs.h <<\_ACEOF
20055#define HAVE_WORKING_TZSET 1
20056_ACEOF
20057
20058fi
20059
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020060# Look for subsecond timestamps in struct stat
20061echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
20062echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
20063if test "${ac_cv_stat_tv_nsec+set}" = set; then
20064 echo $ECHO_N "(cached) $ECHO_C" >&6
20065else
20066 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020067/* confdefs.h. */
20068_ACEOF
20069cat confdefs.h >>conftest.$ac_ext
20070cat >>conftest.$ac_ext <<_ACEOF
20071/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020072#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020073int
20074main ()
20075{
20076
20077struct stat st;
20078st.st_mtim.tv_nsec = 1;
20079
20080 ;
20081 return 0;
20082}
20083_ACEOF
20084rm -f conftest.$ac_objext
20085if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020086 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020087 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020088 grep -v '^ *+' conftest.er1 >conftest.err
20089 rm -f conftest.er1
20090 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20092 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020093 { ac_try='test -z "$ac_c_werror_flag"
20094 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20096 (eval $ac_try) 2>&5
20097 ac_status=$?
20098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20099 (exit $ac_status); }; } &&
20100 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020101 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20102 (eval $ac_try) 2>&5
20103 ac_status=$?
20104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20105 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000020106 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020107else
20108 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020109sed 's/^/| /' conftest.$ac_ext >&5
20110
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020111ac_cv_stat_tv_nsec=no
20112fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020113rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000020114fi
20115
20116echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
20117echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
20118if test "$ac_cv_stat_tv_nsec" = yes
20119then
20120
20121cat >>confdefs.h <<\_ACEOF
20122#define HAVE_STAT_TV_NSEC 1
20123_ACEOF
20124
20125fi
20126
Jack Jansen666b1e72001-10-31 12:11:48 +000020127# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000020128echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
20129echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
20130if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
20131 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020132else
Martin v. Löwis11437992002-04-12 09:54:03 +000020133 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020134/* confdefs.h. */
20135_ACEOF
20136cat confdefs.h >>conftest.$ac_ext
20137cat >>conftest.$ac_ext <<_ACEOF
20138/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000020139#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020140int
20141main ()
20142{
Jack Jansen666b1e72001-10-31 12:11:48 +000020143
20144 int rtn;
20145 rtn = mvwdelch(0,0,0);
20146
Martin v. Löwis11437992002-04-12 09:54:03 +000020147 ;
20148 return 0;
20149}
20150_ACEOF
20151rm -f conftest.$ac_objext
20152if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020153 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020155 grep -v '^ *+' conftest.er1 >conftest.err
20156 rm -f conftest.er1
20157 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020158 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20159 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020160 { ac_try='test -z "$ac_c_werror_flag"
20161 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20163 (eval $ac_try) 2>&5
20164 ac_status=$?
20165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20166 (exit $ac_status); }; } &&
20167 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020168 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20169 (eval $ac_try) 2>&5
20170 ac_status=$?
20171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20172 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000020173 ac_cv_mvwdelch_is_expression=yes
20174else
Martin v. Löwis11437992002-04-12 09:54:03 +000020175 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020176sed 's/^/| /' conftest.$ac_ext >&5
20177
Martin v. Löwis11437992002-04-12 09:54:03 +000020178ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000020179fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020180rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000020181fi
20182
Martin v. Löwis11437992002-04-12 09:54:03 +000020183echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
20184echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020185
20186if test "$ac_cv_mvwdelch_is_expression" = yes
20187then
Martin v. Löwis11437992002-04-12 09:54:03 +000020188
20189cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020190#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020191_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020192
20193fi
20194
Martin v. Löwis11437992002-04-12 09:54:03 +000020195echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
20196echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
20197if test "${ac_cv_window_has_flags+set}" = set; then
20198 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000020199else
Martin v. Löwis11437992002-04-12 09:54:03 +000020200 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020201/* confdefs.h. */
20202_ACEOF
20203cat confdefs.h >>conftest.$ac_ext
20204cat >>conftest.$ac_ext <<_ACEOF
20205/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000020206#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020207int
20208main ()
20209{
Jack Jansen666b1e72001-10-31 12:11:48 +000020210
20211 WINDOW *w;
20212 w->_flags = 0;
20213
Martin v. Löwis11437992002-04-12 09:54:03 +000020214 ;
20215 return 0;
20216}
20217_ACEOF
20218rm -f conftest.$ac_objext
20219if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020220 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020221 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020222 grep -v '^ *+' conftest.er1 >conftest.err
20223 rm -f conftest.er1
20224 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20226 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020227 { ac_try='test -z "$ac_c_werror_flag"
20228 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20230 (eval $ac_try) 2>&5
20231 ac_status=$?
20232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20233 (exit $ac_status); }; } &&
20234 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020235 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20236 (eval $ac_try) 2>&5
20237 ac_status=$?
20238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20239 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000020240 ac_cv_window_has_flags=yes
20241else
Martin v. Löwis11437992002-04-12 09:54:03 +000020242 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020243sed 's/^/| /' conftest.$ac_ext >&5
20244
Martin v. Löwis11437992002-04-12 09:54:03 +000020245ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000020246fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020247rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000020248fi
20249
Martin v. Löwis11437992002-04-12 09:54:03 +000020250echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
20251echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000020252
Jack Jansen666b1e72001-10-31 12:11:48 +000020253
20254if test "$ac_cv_window_has_flags" = yes
20255then
Martin v. Löwis11437992002-04-12 09:54:03 +000020256
20257cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020258#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020259_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000020260
20261fi
20262
Martin v. Löwis24a880b2002-12-31 12:55:15 +000020263echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
20264echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
20265
20266if test -e /dev/ptmx
20267then
20268 echo "$as_me:$LINENO: result: yes" >&5
20269echo "${ECHO_T}yes" >&6
20270
20271cat >>confdefs.h <<\_ACEOF
20272#define HAVE_DEV_PTMX 1
20273_ACEOF
20274
20275else
20276 echo "$as_me:$LINENO: result: no" >&5
20277echo "${ECHO_T}no" >&6
20278fi
20279
Neal Norwitz865400f2003-03-21 01:42:58 +000020280echo "$as_me:$LINENO: checking for /dev/ptc" >&5
20281echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
20282
20283if test -e /dev/ptc
20284then
20285 echo "$as_me:$LINENO: result: yes" >&5
20286echo "${ECHO_T}yes" >&6
20287
20288cat >>confdefs.h <<\_ACEOF
20289#define HAVE_DEV_PTC 1
20290_ACEOF
20291
20292else
20293 echo "$as_me:$LINENO: result: no" >&5
20294echo "${ECHO_T}no" >&6
20295fi
20296
Martin v. Löwis11437992002-04-12 09:54:03 +000020297echo "$as_me:$LINENO: checking for socklen_t" >&5
20298echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
20299if test "${ac_cv_type_socklen_t+set}" = set; then
20300 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000020301else
Martin v. Löwis11437992002-04-12 09:54:03 +000020302 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020303/* confdefs.h. */
20304_ACEOF
20305cat confdefs.h >>conftest.$ac_ext
20306cat >>conftest.$ac_ext <<_ACEOF
20307/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000020308
20309#ifdef HAVE_SYS_TYPES_H
20310#include <sys/types.h>
20311#endif
20312#ifdef HAVE_SYS_SOCKET_H
20313#include <sys/socket.h>
20314#endif
20315
20316
Martin v. Löwis11437992002-04-12 09:54:03 +000020317int
20318main ()
20319{
20320if ((socklen_t *) 0)
20321 return 0;
20322if (sizeof (socklen_t))
20323 return 0;
20324 ;
20325 return 0;
20326}
20327_ACEOF
20328rm -f conftest.$ac_objext
20329if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020330 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020331 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020332 grep -v '^ *+' conftest.er1 >conftest.err
20333 rm -f conftest.er1
20334 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20336 (exit $ac_status); } &&
Brett Cannon43802422005-02-10 20:48:03 +000020337 { ac_try='test -z "$ac_c_werror_flag"
20338 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020339 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20340 (eval $ac_try) 2>&5
20341 ac_status=$?
20342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20343 (exit $ac_status); }; } &&
20344 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20346 (eval $ac_try) 2>&5
20347 ac_status=$?
20348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20349 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000020350 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000020351else
Martin v. Löwis11437992002-04-12 09:54:03 +000020352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020353sed 's/^/| /' conftest.$ac_ext >&5
20354
Martin v. Löwis11437992002-04-12 09:54:03 +000020355ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000020356fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020357rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020358fi
20359echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
20360echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
20361if test $ac_cv_type_socklen_t = yes; then
20362 :
20363else
Guido van Rossum95713eb2000-05-18 20:53:31 +000020364
Martin v. Löwis01c04012002-11-11 14:58:44 +000020365cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000020366#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000020367_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000020368
20369fi
20370
Michael W. Hudson54241132001-12-07 15:38:26 +000020371
Michael W. Hudson54241132001-12-07 15:38:26 +000020372
20373
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000020374for h in `(cd $srcdir;echo Python/thread_*.h)`
20375do
20376 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
20377done
20378
Michael W. Hudson54241132001-12-07 15:38:26 +000020379
Jack Jansen0b06be72002-06-21 14:48:38 +000020380SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000020381echo "$as_me:$LINENO: checking for build directories" >&5
20382echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000020383for dir in $SRCDIRS; do
20384 if test ! -d $dir; then
20385 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000020386 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000020387done
Martin v. Löwis11437992002-04-12 09:54:03 +000020388echo "$as_me:$LINENO: result: done" >&5
20389echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000020390
Guido van Rossum627b2d71993-12-24 10:39:16 +000020391# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000020392 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000020393
Martin v. Löwis11437992002-04-12 09:54:03 +000020394cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020395# This file is a shell script that caches the results of configure
20396# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000020397# scripts and configure runs, see configure's option --config-cache.
20398# It is not useful on other systems. If it contains results you don't
20399# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020400#
Martin v. Löwis11437992002-04-12 09:54:03 +000020401# config.status only pays attention to the cache file if you give it
20402# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020403#
Skip Montanaro6dead952003-09-25 14:50:04 +000020404# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000020405# loading this file, other *unset* `ac_cv_foo' will be assigned the
20406# following values.
20407
20408_ACEOF
20409
Guido van Rossumf78abae1997-01-21 22:02:36 +000020410# The following way of writing the cache mishandles newlines in values,
20411# but we know of no workaround that is simple, portable, and efficient.
20412# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020413# Ultrix sh set writes to stderr and can't be redirected directly,
20414# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000020415{
20416 (set) 2>&1 |
20417 case `(ac_space=' '; set | grep ac_space) 2>&1` in
20418 *ac_space=\ *)
20419 # `set' does not quote correctly, so add quotes (double-quote
20420 # substitution turns \\\\ into \\, and sed turns \\ into \).
20421 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020422 "s/'/'\\\\''/g;
20423 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000020424 ;;
20425 *)
20426 # `set' quotes correctly as required by POSIX, so do not add quotes.
20427 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020428 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000020429 ;;
20430 esac;
20431} |
20432 sed '
20433 t clear
20434 : clear
20435 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20436 t end
20437 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20438 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000020439if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020440 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020441 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20442 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020443 else
20444 echo "not updating unwritable cache $cache_file"
20445 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020446fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020447rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000020448
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020449test "x$prefix" = xNONE && prefix=$ac_default_prefix
20450# Let make expand exec_prefix.
20451test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000020452
Martin v. Löwis11437992002-04-12 09:54:03 +000020453# VPATH may cause trouble with some makes, so we remove $(srcdir),
20454# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20455# trailing colons and then remove the whole line if VPATH becomes empty
20456# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000020457if test "x$srcdir" = x.; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000020458 ac_vpsub='/^[ ]*VPATH[ ]*=/{
Martin v. Löwis11437992002-04-12 09:54:03 +000020459s/:*\$(srcdir):*/:/;
20460s/:*\${srcdir}:*/:/;
20461s/:*@srcdir@:*/:/;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020462s/^\([^=]*=[ ]*\):*/\1/;
Martin v. Löwis11437992002-04-12 09:54:03 +000020463s/:*$//;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020464s/^[^=]*=[ ]*$//;
Martin v. Löwis11437992002-04-12 09:54:03 +000020465}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000020466fi
20467
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020468DEFS=-DHAVE_CONFIG_H
20469
Skip Montanaro6dead952003-09-25 14:50:04 +000020470ac_libobjs=
20471ac_ltlibobjs=
20472for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20473 # 1. Remove the extension, and $U if already installed.
20474 ac_i=`echo "$ac_i" |
Skip Montanarof0d5f792004-08-15 14:08:23 +000020475 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
Skip Montanaro6dead952003-09-25 14:50:04 +000020476 # 2. Add them.
20477 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
20478 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
20479done
20480LIBOBJS=$ac_libobjs
20481
20482LTLIBOBJS=$ac_ltlibobjs
20483
20484
Martin v. Löwis11437992002-04-12 09:54:03 +000020485
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020486: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000020487ac_clean_files_save=$ac_clean_files
20488ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20489{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
20490echo "$as_me: creating $CONFIG_STATUS" >&6;}
20491cat >$CONFIG_STATUS <<_ACEOF
20492#! $SHELL
20493# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000020494# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020495# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000020496# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000020497
Martin v. Löwis11437992002-04-12 09:54:03 +000020498debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000020499ac_cs_recheck=false
20500ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000020501SHELL=\${CONFIG_SHELL-$SHELL}
20502_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000020503
Martin v. Löwis11437992002-04-12 09:54:03 +000020504cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000020505## --------------------- ##
20506## M4sh Initialization. ##
20507## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000020508
Martin v. Löwis11437992002-04-12 09:54:03 +000020509# Be Bourne compatible
20510if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20511 emulate sh
20512 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000020513 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20514 # is contrary to our usage. Disable this feature.
20515 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000020516elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20517 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000020518fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020519DUALCASE=1; export DUALCASE # for MKS sh
Michael W. Hudson54241132001-12-07 15:38:26 +000020520
Martin v. Löwis11437992002-04-12 09:54:03 +000020521# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020522if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020523 as_unset=unset
20524else
20525 as_unset=false
20526fi
Michael W. Hudson54241132001-12-07 15:38:26 +000020527
Skip Montanaro6dead952003-09-25 14:50:04 +000020528
20529# Work around bugs in pre-3.0 UWIN ksh.
20530$as_unset ENV MAIL MAILPATH
20531PS1='$ '
20532PS2='> '
20533PS4='+ '
20534
20535# NLS nuisances.
20536for as_var in \
20537 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
20538 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
20539 LC_TELEPHONE LC_TIME
20540do
Skip Montanarof0d5f792004-08-15 14:08:23 +000020541 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000020542 eval $as_var=C; export $as_var
20543 else
20544 $as_unset $as_var
20545 fi
20546done
20547
20548# Required to use basename.
20549if expr a : '\(a\)' >/dev/null 2>&1; then
20550 as_expr=expr
20551else
20552 as_expr=false
20553fi
20554
20555if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
20556 as_basename=basename
20557else
20558 as_basename=false
20559fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020560
20561
20562# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000020563as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000020564$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20565 X"$0" : 'X\(//\)$' \| \
20566 X"$0" : 'X\(/\)$' \| \
20567 . : '\(.\)' 2>/dev/null ||
20568echo X/"$0" |
20569 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
20570 /^X\/\(\/\/\)$/{ s//\1/; q; }
20571 /^X\/\(\/\).*/{ s//\1/; q; }
20572 s/.*/./; q'`
20573
Skip Montanaro6dead952003-09-25 14:50:04 +000020574
Martin v. Löwis11437992002-04-12 09:54:03 +000020575# PATH needs CR, and LINENO needs CR and PATH.
20576# Avoid depending upon Character Ranges.
20577as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20578as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20579as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20580as_cr_digits='0123456789'
20581as_cr_alnum=$as_cr_Letters$as_cr_digits
20582
20583# The user is always right.
20584if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020585 echo "#! /bin/sh" >conf$$.sh
20586 echo "exit 0" >>conf$$.sh
20587 chmod +x conf$$.sh
20588 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020589 PATH_SEPARATOR=';'
20590 else
20591 PATH_SEPARATOR=:
20592 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000020593 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000020594fi
20595
20596
20597 as_lineno_1=$LINENO
20598 as_lineno_2=$LINENO
20599 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
20600 test "x$as_lineno_1" != "x$as_lineno_2" &&
20601 test "x$as_lineno_3" = "x$as_lineno_2" || {
20602 # Find who we are. Look in the path if we contain no path at all
20603 # relative or not.
20604 case $0 in
20605 *[\\/]* ) as_myself=$0 ;;
20606 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20607for as_dir in $PATH
20608do
20609 IFS=$as_save_IFS
20610 test -z "$as_dir" && as_dir=.
20611 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20612done
20613
20614 ;;
20615 esac
20616 # We did not find ourselves, most probably we were run as `sh COMMAND'
20617 # in which case we are not to be found in the path.
20618 if test "x$as_myself" = x; then
20619 as_myself=$0
20620 fi
20621 if test ! -f "$as_myself"; then
20622 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
20623echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
20624 { (exit 1); exit 1; }; }
20625 fi
20626 case $CONFIG_SHELL in
20627 '')
20628 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20629for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
20630do
20631 IFS=$as_save_IFS
20632 test -z "$as_dir" && as_dir=.
20633 for as_base in sh bash ksh sh5; do
20634 case $as_dir in
20635 /*)
20636 if ("$as_dir/$as_base" -c '
20637 as_lineno_1=$LINENO
20638 as_lineno_2=$LINENO
20639 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
20640 test "x$as_lineno_1" != "x$as_lineno_2" &&
20641 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020642 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
20643 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020644 CONFIG_SHELL=$as_dir/$as_base
20645 export CONFIG_SHELL
20646 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
20647 fi;;
20648 esac
20649 done
20650done
20651;;
Jack Jansendd19cf82001-12-06 22:36:17 +000020652 esac
20653
Martin v. Löwis11437992002-04-12 09:54:03 +000020654 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
20655 # uniformly replaced by the line number. The first 'sed' inserts a
20656 # line-number line before each line; the second 'sed' does the real
20657 # work. The second script uses 'N' to pair each line-number line
20658 # with the numbered line, and appends trailing '-' during
20659 # substitution so that $LINENO is not a special case at line end.
20660 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
20661 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
20662 sed '=' <$as_myself |
20663 sed '
20664 N
20665 s,$,-,
20666 : loop
20667 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
20668 t loop
20669 s,-$,,
20670 s,^['$as_cr_digits']*\n,,
20671 ' >$as_me.lineno &&
20672 chmod +x $as_me.lineno ||
20673 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
20674echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
20675 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020676
Martin v. Löwis11437992002-04-12 09:54:03 +000020677 # Don't try to exec as it changes $[0], causing all sort of problems
20678 # (the dirname of $[0] is not the place where we might find the
20679 # original and so on. Autoconf is especially sensible to this).
20680 . ./$as_me.lineno
20681 # Exit status is that of the last command.
20682 exit
20683}
20684
20685
20686case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
20687 *c*,-n*) ECHO_N= ECHO_C='
20688' ECHO_T=' ' ;;
20689 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
20690 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
20691esac
20692
20693if expr a : '\(a\)' >/dev/null 2>&1; then
20694 as_expr=expr
20695else
20696 as_expr=false
20697fi
20698
20699rm -f conf$$ conf$$.exe conf$$.file
20700echo >conf$$.file
20701if ln -s conf$$.file conf$$ 2>/dev/null; then
20702 # We could just check for DJGPP; but this test a) works b) is more generic
20703 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20704 if test -f conf$$.exe; then
20705 # Don't use ln at all; we don't have any links
20706 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020707 else
Martin v. Löwis11437992002-04-12 09:54:03 +000020708 as_ln_s='ln -s'
20709 fi
20710elif ln conf$$.file conf$$ 2>/dev/null; then
20711 as_ln_s=ln
20712else
20713 as_ln_s='cp -p'
20714fi
20715rm -f conf$$ conf$$.exe conf$$.file
20716
Skip Montanaro6dead952003-09-25 14:50:04 +000020717if mkdir -p . 2>/dev/null; then
20718 as_mkdir_p=:
20719else
Skip Montanarof0d5f792004-08-15 14:08:23 +000020720 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000020721 as_mkdir_p=false
20722fi
20723
Martin v. Löwis11437992002-04-12 09:54:03 +000020724as_executable_p="test -f"
20725
20726# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020727as_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 +000020728
20729# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020730as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000020731
20732
20733# IFS
20734# We need space, tab and new line, in precisely that order.
20735as_nl='
20736'
20737IFS=" $as_nl"
20738
20739# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000020740$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000020741
20742exec 6>&1
20743
20744# Open the log real soon, to keep \$[0] and so on meaningful, and to
20745# report actual input values of CONFIG_FILES etc. instead of their
20746# values after options handling. Logging --version etc. is OK.
20747exec 5>>config.log
20748{
20749 echo
20750 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20751## Running $as_me. ##
20752_ASBOX
20753} >&5
20754cat >&5 <<_CSEOF
20755
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +000020756This file was extended by python $as_me 2.5, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +000020757generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000020758
20759 CONFIG_FILES = $CONFIG_FILES
20760 CONFIG_HEADERS = $CONFIG_HEADERS
20761 CONFIG_LINKS = $CONFIG_LINKS
20762 CONFIG_COMMANDS = $CONFIG_COMMANDS
20763 $ $0 $@
20764
20765_CSEOF
20766echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
20767echo >&5
20768_ACEOF
20769
20770# Files that config.status was made for.
20771if test -n "$ac_config_files"; then
20772 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20773fi
20774
20775if test -n "$ac_config_headers"; then
20776 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20777fi
20778
20779if test -n "$ac_config_links"; then
20780 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20781fi
20782
20783if test -n "$ac_config_commands"; then
20784 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20785fi
20786
20787cat >>$CONFIG_STATUS <<\_ACEOF
20788
20789ac_cs_usage="\
20790\`$as_me' instantiates files from templates according to the
20791current configuration.
20792
20793Usage: $0 [OPTIONS] [FILE]...
20794
20795 -h, --help print this help, then exit
20796 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000020797 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000020798 -d, --debug don't remove temporary files
20799 --recheck update $as_me by reconfiguring in the same conditions
20800 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000020801 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000020802 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000020803 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000020804
20805Configuration files:
20806$config_files
20807
20808Configuration headers:
20809$config_headers
20810
20811Report bugs to <bug-autoconf@gnu.org>."
20812_ACEOF
20813
20814cat >>$CONFIG_STATUS <<_ACEOF
20815ac_cs_version="\\
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +000020816python config.status 2.5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020817configured by $0, generated by GNU Autoconf 2.59,
Martin v. Löwis11437992002-04-12 09:54:03 +000020818 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20819
Skip Montanarof0d5f792004-08-15 14:08:23 +000020820Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000020821This config.status script is free software; the Free Software Foundation
20822gives unlimited permission to copy, distribute and modify it."
20823srcdir=$srcdir
20824INSTALL="$INSTALL"
20825_ACEOF
20826
20827cat >>$CONFIG_STATUS <<\_ACEOF
20828# If no file are specified by the user, then we need to provide default
20829# value. By we need to know if files were specified by the user.
20830ac_need_defaults=:
20831while test $# != 0
20832do
20833 case $1 in
20834 --*=*)
20835 ac_option=`expr "x$1" : 'x\([^=]*\)='`
20836 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000020837 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000020838 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000020839 -*)
20840 ac_option=$1
20841 ac_optarg=$2
20842 ac_shift=shift
20843 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020844 *) # This is not an option, so the user has probably given explicit
20845 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000020846 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000020847 ac_need_defaults=false;;
20848 esac
20849
Skip Montanaro6dead952003-09-25 14:50:04 +000020850 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000020851 # Handling of the options.
20852_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020853cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020854 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20855 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020856 --version | --vers* | -V )
20857 echo "$ac_cs_version"; exit 0 ;;
20858 --he | --h)
20859 # Conflict between --help and --header
20860 { { echo "$as_me:$LINENO: error: ambiguous option: $1
20861Try \`$0 --help' for more information." >&5
20862echo "$as_me: error: ambiguous option: $1
20863Try \`$0 --help' for more information." >&2;}
20864 { (exit 1); exit 1; }; };;
20865 --help | --hel | -h )
20866 echo "$ac_cs_usage"; exit 0 ;;
20867 --debug | --d* | -d )
20868 debug=: ;;
20869 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000020870 $ac_shift
20871 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000020872 ac_need_defaults=false;;
20873 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000020874 $ac_shift
20875 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000020876 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000020877 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20878 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20879 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020880
20881 # This is an error.
20882 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
20883Try \`$0 --help' for more information." >&5
20884echo "$as_me: error: unrecognized option: $1
20885Try \`$0 --help' for more information." >&2;}
20886 { (exit 1); exit 1; }; } ;;
20887
20888 *) ac_config_targets="$ac_config_targets $1" ;;
20889
20890 esac
20891 shift
20892done
20893
Skip Montanaro6dead952003-09-25 14:50:04 +000020894ac_configure_extra_args=
20895
20896if $ac_cs_silent; then
20897 exec 6>/dev/null
20898 ac_configure_extra_args="$ac_configure_extra_args --silent"
20899fi
20900
20901_ACEOF
20902cat >>$CONFIG_STATUS <<_ACEOF
20903if \$ac_cs_recheck; then
20904 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
20905 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20906fi
20907
Martin v. Löwis11437992002-04-12 09:54:03 +000020908_ACEOF
20909
20910
20911
20912
20913
20914cat >>$CONFIG_STATUS <<\_ACEOF
20915for ac_config_target in $ac_config_targets
20916do
20917 case "$ac_config_target" in
20918 # Handling of arguments.
20919 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
20920 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
20921 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
20922 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
20923echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20924 { (exit 1); exit 1; }; };;
20925 esac
20926done
20927
20928# If the user did not use the arguments to specify the items to instantiate,
20929# then the envvar interface is used. Set only those that are not.
20930# We use the long form for the default assignment because of an extremely
20931# bizarre bug on SunOS 4.1.3.
20932if $ac_need_defaults; then
20933 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20934 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20935fi
20936
Skip Montanaro6dead952003-09-25 14:50:04 +000020937# Have a temporary directory for convenience. Make it in the build tree
20938# simply because there is no reason to put it here, and in addition,
20939# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000020940# Create a temporary directory, and hook for its removal unless debugging.
20941$debug ||
20942{
20943 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20944 trap '{ (exit 1); exit 1; }' 1 2 13 15
20945}
20946
20947# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000020948
Martin v. Löwis11437992002-04-12 09:54:03 +000020949{
Skip Montanaro6dead952003-09-25 14:50:04 +000020950 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000020951 test -n "$tmp" && test -d "$tmp"
20952} ||
20953{
Skip Montanaro6dead952003-09-25 14:50:04 +000020954 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000020955 (umask 077 && mkdir $tmp)
20956} ||
20957{
Skip Montanaro6dead952003-09-25 14:50:04 +000020958 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000020959 { (exit 1); exit 1; }
20960}
20961
20962_ACEOF
20963
20964cat >>$CONFIG_STATUS <<_ACEOF
20965
20966#
20967# CONFIG_FILES section.
20968#
20969
20970# No need to generate the scripts if there are no CONFIG_FILES.
20971# This happens for instance when ./config.status config.h
20972if test -n "\$CONFIG_FILES"; then
20973 # Protect against being on the right side of a sed subst in config.status.
20974 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20975 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20976s,@SHELL@,$SHELL,;t t
20977s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20978s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20979s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20980s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20981s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20982s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20983s,@exec_prefix@,$exec_prefix,;t t
20984s,@prefix@,$prefix,;t t
20985s,@program_transform_name@,$program_transform_name,;t t
20986s,@bindir@,$bindir,;t t
20987s,@sbindir@,$sbindir,;t t
20988s,@libexecdir@,$libexecdir,;t t
20989s,@datadir@,$datadir,;t t
20990s,@sysconfdir@,$sysconfdir,;t t
20991s,@sharedstatedir@,$sharedstatedir,;t t
20992s,@localstatedir@,$localstatedir,;t t
20993s,@libdir@,$libdir,;t t
20994s,@includedir@,$includedir,;t t
20995s,@oldincludedir@,$oldincludedir,;t t
20996s,@infodir@,$infodir,;t t
20997s,@mandir@,$mandir,;t t
20998s,@build_alias@,$build_alias,;t t
20999s,@host_alias@,$host_alias,;t t
21000s,@target_alias@,$target_alias,;t t
21001s,@DEFS@,$DEFS,;t t
21002s,@ECHO_C@,$ECHO_C,;t t
21003s,@ECHO_N@,$ECHO_N,;t t
21004s,@ECHO_T@,$ECHO_T,;t t
21005s,@LIBS@,$LIBS,;t t
21006s,@VERSION@,$VERSION,;t t
21007s,@SOVERSION@,$SOVERSION,;t t
21008s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
21009s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
21010s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
21011s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
21012s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
21013s,@MACHDEP@,$MACHDEP,;t t
21014s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000021015s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000021016s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Jack Jansen6b08a402004-06-03 12:41:45 +000021017s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021018s,@CXX@,$CXX,;t t
21019s,@MAINOBJ@,$MAINOBJ,;t t
21020s,@EXEEXT@,$EXEEXT,;t t
21021s,@CC@,$CC,;t t
21022s,@CFLAGS@,$CFLAGS,;t t
21023s,@LDFLAGS@,$LDFLAGS,;t t
21024s,@CPPFLAGS@,$CPPFLAGS,;t t
21025s,@ac_ct_CC@,$ac_ct_CC,;t t
21026s,@OBJEXT@,$OBJEXT,;t t
21027s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000021028s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021029s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
21030s,@LIBRARY@,$LIBRARY,;t t
21031s,@LDLIBRARY@,$LDLIBRARY,;t t
21032s,@DLLLIBRARY@,$DLLLIBRARY,;t t
21033s,@BLDLIBRARY@,$BLDLIBRARY,;t t
21034s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
21035s,@INSTSONAME@,$INSTSONAME,;t t
21036s,@RUNSHARED@,$RUNSHARED,;t t
21037s,@LINKCC@,$LINKCC,;t t
21038s,@RANLIB@,$RANLIB,;t t
21039s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
21040s,@AR@,$AR,;t t
21041s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21042s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21043s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21044s,@LN@,$LN,;t t
21045s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000021046s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021047s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
21048s,@SO@,$SO,;t t
21049s,@LDSHARED@,$LDSHARED,;t t
21050s,@BLDSHARED@,$BLDSHARED,;t t
21051s,@CCSHARED@,$CCSHARED,;t t
21052s,@LINKFORSHARED@,$LINKFORSHARED,;t t
21053s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000021054s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021055s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
21056s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
21057s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
21058s,@LDLAST@,$LDLAST,;t t
21059s,@THREADOBJ@,$THREADOBJ,;t t
21060s,@DLINCLDIR@,$DLINCLDIR,;t t
21061s,@DYNLOADFILE@,$DYNLOADFILE,;t t
21062s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000021063s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021064s,@LIBOBJS@,$LIBOBJS,;t t
21065s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
21066s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
21067s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
21068s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
21069s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
21070s,@LIBM@,$LIBM,;t t
21071s,@LIBC@,$LIBC,;t t
21072s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
21073s,@THREADHEADERS@,$THREADHEADERS,;t t
21074s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000021075s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000021076CEOF
21077
21078_ACEOF
21079
21080 cat >>$CONFIG_STATUS <<\_ACEOF
21081 # Split the substitutions into bite-sized pieces for seds with
21082 # small command number limits, like on Digital OSF/1 and HP-UX.
21083 ac_max_sed_lines=48
21084 ac_sed_frag=1 # Number of current file.
21085 ac_beg=1 # First line for current file.
21086 ac_end=$ac_max_sed_lines # Line after last line for current file.
21087 ac_more_lines=:
21088 ac_sed_cmds=
21089 while $ac_more_lines; do
21090 if test $ac_beg -gt 1; then
21091 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21092 else
21093 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21094 fi
21095 if test ! -s $tmp/subs.frag; then
21096 ac_more_lines=false
21097 else
21098 # The purpose of the label and of the branching condition is to
21099 # speed up the sed processing (if there are no `@' at all, there
21100 # is no need to browse any of the substitutions).
21101 # These are the two extra sed commands mentioned above.
21102 (echo ':t
21103 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21104 if test -z "$ac_sed_cmds"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000021105 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000021106 else
Skip Montanarof0d5f792004-08-15 14:08:23 +000021107 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000021108 fi
21109 ac_sed_frag=`expr $ac_sed_frag + 1`
21110 ac_beg=$ac_end
21111 ac_end=`expr $ac_end + $ac_max_sed_lines`
21112 fi
21113 done
21114 if test -z "$ac_sed_cmds"; then
21115 ac_sed_cmds=cat
21116 fi
21117fi # test -n "$CONFIG_FILES"
21118
21119_ACEOF
21120cat >>$CONFIG_STATUS <<\_ACEOF
21121for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21122 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21123 case $ac_file in
21124 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000021125 cat >$tmp/stdin
21126 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21127 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021128 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000021129 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021130 * ) ac_file_in=$ac_file.in ;;
21131 esac
21132
21133 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21134 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
21135$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021136 X"$ac_file" : 'X\(//\)[^/]' \| \
21137 X"$ac_file" : 'X\(//\)$' \| \
21138 X"$ac_file" : 'X\(/\)' \| \
21139 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021140echo X"$ac_file" |
21141 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21142 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21143 /^X\(\/\/\)$/{ s//\1/; q; }
21144 /^X\(\/\).*/{ s//\1/; q; }
21145 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021146 { if $as_mkdir_p; then
21147 mkdir -p "$ac_dir"
21148 else
21149 as_dir="$ac_dir"
21150 as_dirs=
21151 while test ! -d "$as_dir"; do
21152 as_dirs="$as_dir $as_dirs"
21153 as_dir=`(dirname "$as_dir") 2>/dev/null ||
21154$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021155 X"$as_dir" : 'X\(//\)[^/]' \| \
21156 X"$as_dir" : 'X\(//\)$' \| \
21157 X"$as_dir" : 'X\(/\)' \| \
21158 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000021159echo X"$as_dir" |
21160 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21161 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21162 /^X\(\/\/\)$/{ s//\1/; q; }
21163 /^X\(\/\).*/{ s//\1/; q; }
21164 s/.*/./; q'`
21165 done
21166 test ! -n "$as_dirs" || mkdir $as_dirs
21167 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21168echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21169 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021170
21171 ac_builddir=.
21172
21173if test "$ac_dir" != .; then
21174 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
21175 # A "../" for each directory in $ac_dir_suffix.
21176 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
21177else
21178 ac_dir_suffix= ac_top_builddir=
21179fi
21180
21181case $srcdir in
21182 .) # No --srcdir option. We are building in place.
21183 ac_srcdir=.
21184 if test -z "$ac_top_builddir"; then
21185 ac_top_srcdir=.
21186 else
21187 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
21188 fi ;;
21189 [\\/]* | ?:[\\/]* ) # Absolute path.
21190 ac_srcdir=$srcdir$ac_dir_suffix;
21191 ac_top_srcdir=$srcdir ;;
21192 *) # Relative path.
21193 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
21194 ac_top_srcdir=$ac_top_builddir$srcdir ;;
21195esac
Skip Montanarof0d5f792004-08-15 14:08:23 +000021196
21197# Do not use `cd foo && pwd` to compute absolute paths, because
21198# the directories may not exist.
21199case `pwd` in
21200.) ac_abs_builddir="$ac_dir";;
21201*)
21202 case "$ac_dir" in
21203 .) ac_abs_builddir=`pwd`;;
21204 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
21205 *) ac_abs_builddir=`pwd`/"$ac_dir";;
21206 esac;;
21207esac
21208case $ac_abs_builddir in
21209.) ac_abs_top_builddir=${ac_top_builddir}.;;
21210*)
21211 case ${ac_top_builddir}. in
21212 .) ac_abs_top_builddir=$ac_abs_builddir;;
21213 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
21214 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
21215 esac;;
21216esac
21217case $ac_abs_builddir in
21218.) ac_abs_srcdir=$ac_srcdir;;
21219*)
21220 case $ac_srcdir in
21221 .) ac_abs_srcdir=$ac_abs_builddir;;
21222 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
21223 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
21224 esac;;
21225esac
21226case $ac_abs_builddir in
21227.) ac_abs_top_srcdir=$ac_top_srcdir;;
21228*)
21229 case $ac_top_srcdir in
21230 .) ac_abs_top_srcdir=$ac_abs_builddir;;
21231 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
21232 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
21233 esac;;
21234esac
Martin v. Löwis11437992002-04-12 09:54:03 +000021235
21236
21237 case $INSTALL in
21238 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21239 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
21240 esac
21241
Brett Cannon43802422005-02-10 20:48:03 +000021242 if test x"$ac_file" != x-; then
21243 { echo "$as_me:$LINENO: creating $ac_file" >&5
21244echo "$as_me: creating $ac_file" >&6;}
21245 rm -f "$ac_file"
21246 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021247 # Let's still pretend it is `configure' which instantiates (i.e., don't
21248 # use $as_me), people would be surprised to read:
21249 # /* config.h. Generated by config.status. */
21250 if test x"$ac_file" = x-; then
21251 configure_input=
21252 else
21253 configure_input="$ac_file. "
21254 fi
21255 configure_input=$configure_input"Generated from `echo $ac_file_in |
Skip Montanarof0d5f792004-08-15 14:08:23 +000021256 sed 's,.*/,,'` by configure."
Martin v. Löwis11437992002-04-12 09:54:03 +000021257
21258 # First look for the input files in the build tree, otherwise in the
21259 # src tree.
21260 ac_file_inputs=`IFS=:
21261 for f in $ac_file_in; do
21262 case $f in
21263 -) echo $tmp/stdin ;;
21264 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000021265 # Absolute (can't be DOS-style, as IFS=:)
21266 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021267echo "$as_me: error: cannot find input file: $f" >&2;}
21268 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021269 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000021270 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000021271 if test -f "$f"; then
21272 # Build tree
21273 echo "$f"
21274 elif test -f "$srcdir/$f"; then
21275 # Source tree
21276 echo "$srcdir/$f"
21277 else
21278 # /dev/null tree
21279 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021280echo "$as_me: error: cannot find input file: $f" >&2;}
21281 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021282 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021283 esac
21284 done` || { (exit 1); exit 1; }
21285_ACEOF
21286cat >>$CONFIG_STATUS <<_ACEOF
21287 sed "$ac_vpsub
21288$extrasub
21289_ACEOF
21290cat >>$CONFIG_STATUS <<\_ACEOF
21291:t
21292/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21293s,@configure_input@,$configure_input,;t t
21294s,@srcdir@,$ac_srcdir,;t t
21295s,@abs_srcdir@,$ac_abs_srcdir,;t t
21296s,@top_srcdir@,$ac_top_srcdir,;t t
21297s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
21298s,@builddir@,$ac_builddir,;t t
21299s,@abs_builddir@,$ac_abs_builddir,;t t
21300s,@top_builddir@,$ac_top_builddir,;t t
21301s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
21302s,@INSTALL@,$ac_INSTALL,;t t
21303" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21304 rm -f $tmp/stdin
21305 if test x"$ac_file" != x-; then
21306 mv $tmp/out $ac_file
21307 else
21308 cat $tmp/out
21309 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021310 fi
21311
Martin v. Löwis11437992002-04-12 09:54:03 +000021312done
21313_ACEOF
21314cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021315
Martin v. Löwis11437992002-04-12 09:54:03 +000021316#
21317# CONFIG_HEADER section.
21318#
Guido van Rossum627b2d71993-12-24 10:39:16 +000021319
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021320# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21321# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000021322#
21323# ac_d sets the value in "#define NAME VALUE" lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021324ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
21325ac_dB='[ ].*$,\1#\2'
Martin v. Löwis11437992002-04-12 09:54:03 +000021326ac_dC=' '
21327ac_dD=',;t'
21328# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Skip Montanarof0d5f792004-08-15 14:08:23 +000021329ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
Martin v. Löwis11437992002-04-12 09:54:03 +000021330ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021331ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000021332ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021333
Martin v. Löwis11437992002-04-12 09:54:03 +000021334for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000021335 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000021336 case $ac_file in
21337 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000021338 cat >$tmp/stdin
21339 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21340 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021341 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000021342 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021343 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021344 esac
21345
Martin v. Löwis11437992002-04-12 09:54:03 +000021346 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
21347echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021348
Martin v. Löwis11437992002-04-12 09:54:03 +000021349 # First look for the input files in the build tree, otherwise in the
21350 # src tree.
21351 ac_file_inputs=`IFS=:
21352 for f in $ac_file_in; do
21353 case $f in
21354 -) echo $tmp/stdin ;;
21355 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000021356 # Absolute (can't be DOS-style, as IFS=:)
21357 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021358echo "$as_me: error: cannot find input file: $f" >&2;}
21359 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021360 # Do quote $f, to prevent DOS paths from being IFS'd.
21361 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000021362 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000021363 if test -f "$f"; then
21364 # Build tree
21365 echo "$f"
21366 elif test -f "$srcdir/$f"; then
21367 # Source tree
21368 echo "$srcdir/$f"
21369 else
21370 # /dev/null tree
21371 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021372echo "$as_me: error: cannot find input file: $f" >&2;}
21373 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021374 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021375 esac
21376 done` || { (exit 1); exit 1; }
21377 # Remove the trailing spaces.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021378 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021379
Martin v. Löwis11437992002-04-12 09:54:03 +000021380_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021381
Martin v. Löwis11437992002-04-12 09:54:03 +000021382# Transform confdefs.h into two sed scripts, `conftest.defines' and
21383# `conftest.undefs', that substitutes the proper values into
21384# config.h.in to produce config.h. The first handles `#define'
21385# templates, and the second `#undef' templates.
21386# And first: Protect against being on the right side of a sed subst in
21387# config.status. Protect against being in an unquoted here document
21388# in config.status.
21389rm -f conftest.defines conftest.undefs
21390# Using a here document instead of a string reduces the quoting nightmare.
21391# Putting comments in sed scripts is not portable.
21392#
21393# `end' is used to avoid that the second main sed command (meant for
21394# 0-ary CPP macros) applies to n-ary macro definitions.
21395# See the Autoconf documentation for `clear'.
21396cat >confdef2sed.sed <<\_ACEOF
21397s/[\\&,]/\\&/g
21398s,[\\$`],\\&,g
21399t clear
21400: clear
Skip Montanarof0d5f792004-08-15 14:08:23 +000021401s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000021402t end
Skip Montanarof0d5f792004-08-15 14:08:23 +000021403s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000021404: end
21405_ACEOF
21406# If some macros were called several times there might be several times
21407# the same #defines, which is useless. Nevertheless, we may not want to
21408# sort them, since we want the *last* AC-DEFINE to be honored.
21409uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
21410sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
21411rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021412
21413# This sed command replaces #undef with comments. This is necessary, for
21414# example, in the case of _POSIX_SOURCE, which is predefined and required
21415# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000021416cat >>conftest.undefs <<\_ACEOF
Skip Montanarof0d5f792004-08-15 14:08:23 +000021417s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
Martin v. Löwis11437992002-04-12 09:54:03 +000021418_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021419
Martin v. Löwis11437992002-04-12 09:54:03 +000021420# Break up conftest.defines because some shells have a limit on the size
21421# of here documents, and old seds have small limits too (100 cmds).
21422echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanarof0d5f792004-08-15 14:08:23 +000021423echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021424echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
21425echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000021426rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000021427while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000021428do
Martin v. Löwis11437992002-04-12 09:54:03 +000021429 # Write a limited-size here document to $tmp/defines.sed.
21430 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
21431 # Speed up: don't consider the non `#define' lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021432 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021433 # Work around the forget-to-reset-the-flag bug.
21434 echo 't clr' >>$CONFIG_STATUS
21435 echo ': clr' >>$CONFIG_STATUS
21436 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000021437 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000021438 sed -f $tmp/defines.sed $tmp/in >$tmp/out
21439 rm -f $tmp/in
21440 mv $tmp/out $tmp/in
21441' >>$CONFIG_STATUS
21442 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
21443 rm -f conftest.defines
21444 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000021445done
Martin v. Löwis11437992002-04-12 09:54:03 +000021446rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000021447echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021448echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000021449
Martin v. Löwis11437992002-04-12 09:54:03 +000021450# Break up conftest.undefs because some shells have a limit on the size
21451# of here documents, and old seds have small limits too (100 cmds).
21452echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
21453rm -f conftest.tail
21454while grep . conftest.undefs >/dev/null
21455do
21456 # Write a limited-size here document to $tmp/undefs.sed.
21457 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
21458 # Speed up: don't consider the non `#undef'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021459 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021460 # Work around the forget-to-reset-the-flag bug.
21461 echo 't clr' >>$CONFIG_STATUS
21462 echo ': clr' >>$CONFIG_STATUS
21463 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
21464 echo 'CEOF
21465 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
21466 rm -f $tmp/in
21467 mv $tmp/out $tmp/in
21468' >>$CONFIG_STATUS
21469 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
21470 rm -f conftest.undefs
21471 mv conftest.tail conftest.undefs
21472done
21473rm -f conftest.undefs
21474
21475cat >>$CONFIG_STATUS <<\_ACEOF
21476 # Let's still pretend it is `configure' which instantiates (i.e., don't
21477 # use $as_me), people would be surprised to read:
21478 # /* config.h. Generated by config.status. */
21479 if test x"$ac_file" = x-; then
21480 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000021481 else
Martin v. Löwis11437992002-04-12 09:54:03 +000021482 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000021483 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021484 cat $tmp/in >>$tmp/config.h
21485 rm -f $tmp/in
21486 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021487 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021488 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
21489echo "$as_me: $ac_file is unchanged" >&6;}
21490 else
21491 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
21492$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021493 X"$ac_file" : 'X\(//\)[^/]' \| \
21494 X"$ac_file" : 'X\(//\)$' \| \
21495 X"$ac_file" : 'X\(/\)' \| \
21496 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021497echo X"$ac_file" |
21498 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21499 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21500 /^X\(\/\/\)$/{ s//\1/; q; }
21501 /^X\(\/\).*/{ s//\1/; q; }
21502 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021503 { if $as_mkdir_p; then
21504 mkdir -p "$ac_dir"
21505 else
21506 as_dir="$ac_dir"
21507 as_dirs=
21508 while test ! -d "$as_dir"; do
21509 as_dirs="$as_dir $as_dirs"
21510 as_dir=`(dirname "$as_dir") 2>/dev/null ||
21511$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021512 X"$as_dir" : 'X\(//\)[^/]' \| \
21513 X"$as_dir" : 'X\(//\)$' \| \
21514 X"$as_dir" : 'X\(/\)' \| \
21515 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000021516echo X"$as_dir" |
21517 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21518 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21519 /^X\(\/\/\)$/{ s//\1/; q; }
21520 /^X\(\/\).*/{ s//\1/; q; }
21521 s/.*/./; q'`
21522 done
21523 test ! -n "$as_dirs" || mkdir $as_dirs
21524 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21525echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21526 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021527
Martin v. Löwis11437992002-04-12 09:54:03 +000021528 rm -f $ac_file
21529 mv $tmp/config.h $ac_file
21530 fi
21531 else
21532 cat $tmp/config.h
21533 rm -f $tmp/config.h
21534 fi
21535done
21536_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021537
Martin v. Löwis11437992002-04-12 09:54:03 +000021538cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021539
Martin v. Löwis11437992002-04-12 09:54:03 +000021540{ (exit 0); exit 0; }
21541_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021542chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021543ac_clean_files=$ac_clean_files_save
21544
21545
21546# configure is writing to config.log, and then calls config.status.
21547# config.status does its own redirection, appending to config.log.
21548# Unfortunately, on DOS this fails, as config.log is still kept open
21549# by configure, so config.status won't be able to write to it; its
21550# output is simply discarded. So we exec the FD to /dev/null,
21551# effectively closing config.log, so it can be properly (re)opened and
21552# appended to by config.status. When coming back to configure, we
21553# need to make the FD available again.
21554if test "$no_create" != yes; then
21555 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021556 ac_config_status_args=
21557 test "$silent" = yes &&
21558 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000021559 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000021560 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000021561 exec 5>>config.log
21562 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21563 # would make configure fail if this is the last instruction.
21564 $ac_cs_success || { (exit 1); exit 1; }
21565fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000021566
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000021567
21568echo "creating Setup"
21569if test ! -f Modules/Setup
21570then
21571 cp $srcdir/Modules/Setup.dist Modules/Setup
21572fi
21573
21574echo "creating Setup.local"
21575if test ! -f Modules/Setup.local
21576then
21577 echo "# Edit this file for local setup changes" >Modules/Setup.local
21578fi
21579
21580echo "creating Makefile"
21581$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
21582 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000021583 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000021584mv config.c Modules