blob: 8684b904c062f9c1268b14866049576f900b9f21 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Trent Mickc5625ba2004-08-25 23:59:39 +00002# From configure.in Revision: 1.467 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Skip Montanarof0d5f792004-08-15 14:08:23 +00004# Generated by GNU Autoconf 2.59 for python 2.4.
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'
Fred Drake9bd44622003-07-30 17:39:48 +0000271PACKAGE_VERSION='2.4'
272PACKAGE_STRING='python 2.4'
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
Fred Drake9bd44622003-07-30 17:39:48 +0000782\`configure' configures python 2.4 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
Fred Drake9bd44622003-07-30 17:39:48 +0000839 short | recursive ) echo "Configuration of python 2.4:";;
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
Trent Mickc5625ba2004-08-25 23:59:39 +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
Fred Drake9bd44622003-07-30 17:39:48 +0000986python configure 2.4
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
Fred Drake9bd44622003-07-30 17:39:48 +00001000It was created by python $as_me 2.4, 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
Fred Drake9bd44622003-07-30 17:39:48 +00001352VERSION=2.4
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.
1480 OpenBSD/2.* | OpenBSD/3.[01234])
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); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +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); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +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); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +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); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +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); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +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); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +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 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003395 Linux*|GNU*|NetBSD*)
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}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003399 INSTSONAME="$LDLIBRARY".$SOVERSION
3400 ;;
3401 hp*|HP*)
3402 LDLIBRARY='libpython$(VERSION).sl'
3403 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003404 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003405 ;;
3406 OSF*)
3407 LDLIBRARY='libpython$(VERSION).so'
3408 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003409 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003410 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003411 atheos*)
3412 LDLIBRARY='libpython$(VERSION).so'
3413 BLDLIBRARY='-L. -lpython$(VERSION)'
3414 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3415 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003416 esac
Jason Tishler30765592003-09-04 11:04:06 +00003417else # shared is disabled
3418 case $ac_sys_system in
3419 CYGWIN*)
3420 BLDLIBRARY='$(LIBRARY)'
3421 LDLIBRARY='libpython$(VERSION).dll.a'
3422 ;;
3423 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003424fi
3425
Martin v. Löwis11437992002-04-12 09:54:03 +00003426echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3427echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003428
Martin v. Löwis11437992002-04-12 09:54:03 +00003429if test -n "$ac_tool_prefix"; then
3430 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3431set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3432echo "$as_me:$LINENO: checking for $ac_word" >&5
3433echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3434if test "${ac_cv_prog_RANLIB+set}" = set; then
3435 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003436else
3437 if test -n "$RANLIB"; then
3438 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3439else
Martin v. Löwis11437992002-04-12 09:54:03 +00003440as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3441for as_dir in $PATH
3442do
3443 IFS=$as_save_IFS
3444 test -z "$as_dir" && as_dir=.
3445 for ac_exec_ext in '' $ac_executable_extensions; do
3446 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3447 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3448 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3449 break 2
3450 fi
3451done
3452done
3453
Guido van Rossum627b2d71993-12-24 10:39:16 +00003454fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003455fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003456RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003457if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003458 echo "$as_me:$LINENO: result: $RANLIB" >&5
3459echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003460else
Martin v. Löwis11437992002-04-12 09:54:03 +00003461 echo "$as_me:$LINENO: result: no" >&5
3462echo "${ECHO_T}no" >&6
3463fi
3464
3465fi
3466if test -z "$ac_cv_prog_RANLIB"; then
3467 ac_ct_RANLIB=$RANLIB
3468 # Extract the first word of "ranlib", so it can be a program name with args.
3469set dummy ranlib; ac_word=$2
3470echo "$as_me:$LINENO: checking for $ac_word" >&5
3471echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3472if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3473 echo $ECHO_N "(cached) $ECHO_C" >&6
3474else
3475 if test -n "$ac_ct_RANLIB"; then
3476 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3477else
3478as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3479for as_dir in $PATH
3480do
3481 IFS=$as_save_IFS
3482 test -z "$as_dir" && as_dir=.
3483 for ac_exec_ext in '' $ac_executable_extensions; do
3484 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3485 ac_cv_prog_ac_ct_RANLIB="ranlib"
3486 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3487 break 2
3488 fi
3489done
3490done
3491
3492 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3493fi
3494fi
3495ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3496if test -n "$ac_ct_RANLIB"; then
3497 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3498echo "${ECHO_T}$ac_ct_RANLIB" >&6
3499else
3500 echo "$as_me:$LINENO: result: no" >&5
3501echo "${ECHO_T}no" >&6
3502fi
3503
3504 RANLIB=$ac_ct_RANLIB
3505else
3506 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003507fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003508
3509
Guido van Rossum7f43da71994-08-01 12:15:30 +00003510for ac_prog in ar aal
3511do
Martin v. Löwis11437992002-04-12 09:54:03 +00003512 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003513set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003514echo "$as_me:$LINENO: checking for $ac_word" >&5
3515echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3516if test "${ac_cv_prog_AR+set}" = set; then
3517 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003518else
3519 if test -n "$AR"; then
3520 ac_cv_prog_AR="$AR" # Let the user override the test.
3521else
Martin v. Löwis11437992002-04-12 09:54:03 +00003522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3523for as_dir in $PATH
3524do
3525 IFS=$as_save_IFS
3526 test -z "$as_dir" && as_dir=.
3527 for ac_exec_ext in '' $ac_executable_extensions; do
3528 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3529 ac_cv_prog_AR="$ac_prog"
3530 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3531 break 2
3532 fi
3533done
3534done
3535
Guido van Rossum7f43da71994-08-01 12:15:30 +00003536fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003537fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003538AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003539if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003540 echo "$as_me:$LINENO: result: $AR" >&5
3541echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003542else
Martin v. Löwis11437992002-04-12 09:54:03 +00003543 echo "$as_me:$LINENO: result: no" >&5
3544echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003545fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003546
Martin v. Löwis11437992002-04-12 09:54:03 +00003547 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003548done
3549test -n "$AR" || AR="ar"
3550
Michael W. Hudson54241132001-12-07 15:38:26 +00003551
Neil Schemenauera42c8272001-03-31 00:01:55 +00003552case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003553bsdos*|hp*|HP*)
3554 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003555 if test -z "$INSTALL"
3556 then
3557 INSTALL="${srcdir}/install-sh -c"
3558 fi
3559esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003560ac_aux_dir=
3561for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3562 if test -f $ac_dir/install-sh; then
3563 ac_aux_dir=$ac_dir
3564 ac_install_sh="$ac_aux_dir/install-sh -c"
3565 break
3566 elif test -f $ac_dir/install.sh; then
3567 ac_aux_dir=$ac_dir
3568 ac_install_sh="$ac_aux_dir/install.sh -c"
3569 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003570 elif test -f $ac_dir/shtool; then
3571 ac_aux_dir=$ac_dir
3572 ac_install_sh="$ac_aux_dir/shtool install -c"
3573 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003574 fi
3575done
3576if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003577 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3578echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3579 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003580fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003581ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3582ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3583ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003584
3585# Find a good install program. We prefer a C program (faster),
3586# so one script is as good as another. But avoid the broken or
3587# incompatible versions:
3588# SysV /etc/install, /usr/sbin/install
3589# SunOS /usr/etc/install
3590# IRIX /sbin/install
3591# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003592# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003593# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3594# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3595# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00003596# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003597# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003598echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3599echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003600if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003601if test "${ac_cv_path_install+set}" = set; then
3602 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003603else
Martin v. Löwis11437992002-04-12 09:54:03 +00003604 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3605for as_dir in $PATH
3606do
3607 IFS=$as_save_IFS
3608 test -z "$as_dir" && as_dir=.
3609 # Account for people who put trailing slashes in PATH elements.
3610case $as_dir/ in
3611 ./ | .// | /cC/* | \
3612 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00003613 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00003614 /usr/ucb/* ) ;;
3615 *)
3616 # OSF1 and SCO ODT 3.0 have their own names for install.
3617 # Don't use installbsd from OSF since it installs stuff as root
3618 # by default.
3619 for ac_prog in ginstall scoinst install; do
3620 for ac_exec_ext in '' $ac_executable_extensions; do
Skip Montanarof0d5f792004-08-15 14:08:23 +00003621 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3622 if test $ac_prog = install &&
3623 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3624 # AIX install. It has an incompatible calling convention.
3625 :
3626 elif test $ac_prog = install &&
3627 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3628 # program-specific install script used by HP pwplus--don't use.
3629 :
3630 else
3631 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3632 break 3
3633 fi
3634 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003635 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003636 done
3637 ;;
3638esac
3639done
3640
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003641
3642fi
3643 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003644 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003645 else
3646 # As a last resort, use the slow shell script. We don't cache a
3647 # path for INSTALL within a source directory, because that will
3648 # break other packages using the cache if that directory is
3649 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003650 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003651 fi
3652fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003653echo "$as_me:$LINENO: result: $INSTALL" >&5
3654echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003655
3656# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3657# It thinks the first close brace ends the variable substitution.
3658test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3659
Martin v. Löwis11437992002-04-12 09:54:03 +00003660test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003661
3662test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3663
Michael W. Hudson54241132001-12-07 15:38:26 +00003664
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003665# Not every filesystem supports hard links
3666
3667if test -z "$LN" ; then
3668 case $ac_sys_system in
3669 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003670 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003671 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003672 *) LN=ln;;
3673 esac
3674fi
3675
Fred Drake109d9862001-07-11 06:27:56 +00003676# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003677echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3678echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3679
Fred Drake109d9862001-07-11 06:27:56 +00003680# Check whether --with-pydebug or --without-pydebug was given.
3681if test "${with_pydebug+set}" = set; then
3682 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003683
Fred Drake109d9862001-07-11 06:27:56 +00003684if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003685then
3686
3687cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003688#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003689_ACEOF
3690
3691 echo "$as_me:$LINENO: result: yes" >&5
3692echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003693 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003694else echo "$as_me:$LINENO: result: no" >&5
3695echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003696fi
3697else
Martin v. Löwis11437992002-04-12 09:54:03 +00003698 echo "$as_me:$LINENO: result: no" >&5
3699echo "${ECHO_T}no" >&6
3700fi;
Fred Drake109d9862001-07-11 06:27:56 +00003701
Skip Montanarodecc6a42003-01-01 20:07:49 +00003702# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3703# merged with this chunk of code?
3704
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003705# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003706# ------------------------
3707# (The following bit of code is complicated enough - please keep things
3708# indented properly. Just pretend you're editing Python code. ;-)
3709
3710# There are two parallel sets of case statements below, one that checks to
3711# see if OPT was set and one that does BASECFLAGS setting based upon
3712# compiler and platform. BASECFLAGS tweaks need to be made even if the
3713# user set OPT.
3714
3715# tweak OPT based on compiler and platform, only if the user didn't set
3716# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003717
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003718if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003719then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003720 case $GCC in
3721 yes)
3722 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003723 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003724 if test "$Py_DEBUG" = 'true' ; then
3725 # Optimization messes up debuggers, so turn it off for
3726 # debug builds.
3727 OPT="-g -Wall -Wstrict-prototypes"
3728 else
3729 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003730 fi
3731 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003732 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003733 OPT="-O3 -Wall -Wstrict-prototypes"
3734 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003735 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003736 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003737 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3738 ;;
3739 esac
Fred Drake109d9862001-07-11 06:27:56 +00003740 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003741
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003742 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003743 OPT="-O"
3744 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003745 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003746
3747 # The current (beta) Monterey compiler dies with optimizations
3748 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003749 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003750 Monterey*)
3751 OPT=""
3752 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003753 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003754
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003755fi
3756
Skip Montanarodecc6a42003-01-01 20:07:49 +00003757
3758# tweak BASECFLAGS based on compiler and platform
3759case $GCC in
3760yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003761 # Python violates C99 rules, by casting between incompatible
3762 # pointer types. GCC may generate bad code as a result of that,
3763 # so use -fno-strict-aliasing if supported.
3764 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3765echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3766 ac_save_cc="$CC"
3767 CC="$CC -fno-strict-aliasing"
3768 if test "$cross_compiling" = yes; then
3769 ac_cv_no_strict_aliasing_ok=no
3770else
3771 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003772/* confdefs.h. */
3773_ACEOF
3774cat confdefs.h >>conftest.$ac_ext
3775cat >>conftest.$ac_ext <<_ACEOF
3776/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003777int main() { return 0; }
3778_ACEOF
3779rm -f conftest$ac_exeext
3780if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3781 (eval $ac_link) 2>&5
3782 ac_status=$?
3783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3784 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3786 (eval $ac_try) 2>&5
3787 ac_status=$?
3788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3789 (exit $ac_status); }; }; then
3790 ac_cv_no_strict_aliasing_ok=yes
3791else
3792 echo "$as_me: program exited with status $ac_status" >&5
3793echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003794sed 's/^/| /' conftest.$ac_ext >&5
3795
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003796( exit $ac_status )
3797ac_cv_no_strict_aliasing_ok=no
3798fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003799rm -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 +00003800fi
3801 CC="$ac_save_cc"
3802 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3803echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3804 if test $ac_cv_no_strict_aliasing_ok = yes
3805 then
3806 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3807 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003808 case $ac_sys_system in
3809 SCO_SV*)
3810 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3811 ;;
3812 # is there any other compiler on Darwin besides gcc?
3813 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003814 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003815 ;;
3816 esac
3817 ;;
3818
3819*)
3820 case $ac_sys_system in
3821 OpenUNIX*|UnixWare*)
3822 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3823 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003824 OSF*)
3825 BASECFLAGS="$BASECFLAGS -ieee -std"
3826 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003827 SCO_SV*)
3828 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3829 ;;
3830 esac
3831 ;;
3832esac
3833
Fred Drakee1ceaa02001-12-04 20:55:47 +00003834if test "$Py_DEBUG" = 'true'; then
3835 :
3836else
3837 OPT="-DNDEBUG $OPT"
3838fi
3839
Guido van Rossum563e7081996-09-10 18:20:48 +00003840if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003841then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003842 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003843fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003844
Martin v. Löwis11437992002-04-12 09:54:03 +00003845echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3846echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3847if test "${ac_cv_opt_olimit_ok+set}" = set; then
3848 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003849else
3850 ac_save_cc="$CC"
3851CC="$CC -OPT:Olimit=0"
3852if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003853 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003854else
Martin v. Löwis11437992002-04-12 09:54:03 +00003855 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003856/* confdefs.h. */
3857_ACEOF
3858cat confdefs.h >>conftest.$ac_ext
3859cat >>conftest.$ac_ext <<_ACEOF
3860/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003861int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003862_ACEOF
3863rm -f conftest$ac_exeext
3864if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3865 (eval $ac_link) 2>&5
3866 ac_status=$?
3867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3868 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3870 (eval $ac_try) 2>&5
3871 ac_status=$?
3872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3873 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003874 ac_cv_opt_olimit_ok=yes
3875else
Martin v. Löwis11437992002-04-12 09:54:03 +00003876 echo "$as_me: program exited with status $ac_status" >&5
3877echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003878sed 's/^/| /' conftest.$ac_ext >&5
3879
Martin v. Löwis11437992002-04-12 09:54:03 +00003880( exit $ac_status )
3881ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003882fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003883rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003884fi
Guido van Rossum91922671997-10-09 20:24:13 +00003885CC="$ac_save_cc"
3886fi
3887
Martin v. Löwis11437992002-04-12 09:54:03 +00003888echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3889echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003890if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003891 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003892 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3893 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3894 # environment?
3895 Darwin*)
3896 ;;
3897 *)
3898 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3899 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003900 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003901else
Martin v. Löwis11437992002-04-12 09:54:03 +00003902 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3903echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3904 if test "${ac_cv_olimit_ok+set}" = set; then
3905 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003906else
3907 ac_save_cc="$CC"
3908 CC="$CC -Olimit 1500"
3909 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003910 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003911else
Martin v. Löwis11437992002-04-12 09:54:03 +00003912 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003913/* confdefs.h. */
3914_ACEOF
3915cat confdefs.h >>conftest.$ac_ext
3916cat >>conftest.$ac_ext <<_ACEOF
3917/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003918int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003919_ACEOF
3920rm -f conftest$ac_exeext
3921if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3922 (eval $ac_link) 2>&5
3923 ac_status=$?
3924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3925 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3926 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3927 (eval $ac_try) 2>&5
3928 ac_status=$?
3929 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3930 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003931 ac_cv_olimit_ok=yes
3932else
Martin v. Löwis11437992002-04-12 09:54:03 +00003933 echo "$as_me: program exited with status $ac_status" >&5
3934echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003935sed 's/^/| /' conftest.$ac_ext >&5
3936
Martin v. Löwis11437992002-04-12 09:54:03 +00003937( exit $ac_status )
3938ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003939fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00003940rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003941fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003942 CC="$ac_save_cc"
3943fi
3944
Martin v. Löwis11437992002-04-12 09:54:03 +00003945 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3946echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003947 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003948 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003949 fi
3950fi
3951
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003952# On some compilers, pthreads are available without further options
3953# (e.g. MacOS X). On some of these systems, the compiler will not
3954# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3955# So we have to see first whether pthreads are available without
3956# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003957echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3958echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3959if test "${ac_cv_pthread_is_default+set}" = set; then
3960 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003961else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003962 if test "$cross_compiling" = yes; then
3963 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003964else
Martin v. Löwis11437992002-04-12 09:54:03 +00003965 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003966/* confdefs.h. */
3967_ACEOF
3968cat confdefs.h >>conftest.$ac_ext
3969cat >>conftest.$ac_ext <<_ACEOF
3970/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003971
Martin v. Löwis130fb172001-07-19 11:00:41 +00003972#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003973
3974void* routine(void* p){return NULL;}
3975
3976int main(){
3977 pthread_t p;
3978 if(pthread_create(&p,NULL,routine,NULL)!=0)
3979 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003980 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003981 return 0;
3982}
3983
Martin v. Löwis11437992002-04-12 09:54:03 +00003984_ACEOF
3985rm -f conftest$ac_exeext
3986if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3987 (eval $ac_link) 2>&5
3988 ac_status=$?
3989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3990 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3992 (eval $ac_try) 2>&5
3993 ac_status=$?
3994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3995 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00003996
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003997 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00003998 ac_cv_kthread=no
3999 ac_cv_pthread=no
4000
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004001else
Martin v. Löwis11437992002-04-12 09:54:03 +00004002 echo "$as_me: program exited with status $ac_status" >&5
4003echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004004sed 's/^/| /' conftest.$ac_ext >&5
4005
Martin v. Löwis11437992002-04-12 09:54:03 +00004006( exit $ac_status )
4007ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004008fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004009rm -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 +00004010fi
4011
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004012fi
4013
Martin v. Löwis11437992002-04-12 09:54:03 +00004014echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
4015echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004016
Michael W. Hudson54241132001-12-07 15:38:26 +00004017
Martin v. Löwis11437992002-04-12 09:54:03 +00004018if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004019then
4020 ac_cv_kpthread=no
4021else
4022# -Kpthread, if available, provides the right #defines
4023# and linker options to make pthread_create available
4024# Some compilers won't report that they do not support -Kpthread,
4025# so we need to run a program to see whether it really made the
4026# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00004027echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
4028echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
4029if test "${ac_cv_kpthread+set}" = set; then
4030 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004031else
4032 ac_save_cc="$CC"
4033CC="$CC -Kpthread"
4034if test "$cross_compiling" = yes; then
4035 ac_cv_kpthread=no
4036else
Martin v. Löwis11437992002-04-12 09:54:03 +00004037 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004038/* confdefs.h. */
4039_ACEOF
4040cat confdefs.h >>conftest.$ac_ext
4041cat >>conftest.$ac_ext <<_ACEOF
4042/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004043
4044#include <pthread.h>
4045
4046void* routine(void* p){return NULL;}
4047
4048int main(){
4049 pthread_t p;
4050 if(pthread_create(&p,NULL,routine,NULL)!=0)
4051 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00004052 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004053 return 0;
4054}
4055
Martin v. Löwis11437992002-04-12 09:54:03 +00004056_ACEOF
4057rm -f conftest$ac_exeext
4058if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4059 (eval $ac_link) 2>&5
4060 ac_status=$?
4061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4062 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4064 (eval $ac_try) 2>&5
4065 ac_status=$?
4066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4067 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00004068 ac_cv_kpthread=yes
4069else
Martin v. Löwis11437992002-04-12 09:54:03 +00004070 echo "$as_me: program exited with status $ac_status" >&5
4071echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004072sed 's/^/| /' conftest.$ac_ext >&5
4073
Martin v. Löwis11437992002-04-12 09:54:03 +00004074( exit $ac_status )
4075ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00004076fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004077rm -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 +00004078fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004079CC="$ac_save_cc"
4080fi
4081
Martin v. Löwis11437992002-04-12 09:54:03 +00004082echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
4083echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00004084fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00004085
Skip Montanarod8d39a02003-07-10 20:44:10 +00004086if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004087then
4088# -Kthread, if available, provides the right #defines
4089# and linker options to make pthread_create available
4090# Some compilers won't report that they do not support -Kthread,
4091# so we need to run a program to see whether it really made the
4092# function available.
4093echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
4094echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
4095if test "${ac_cv_kthread+set}" = set; then
4096 echo $ECHO_N "(cached) $ECHO_C" >&6
4097else
4098 ac_save_cc="$CC"
4099CC="$CC -Kthread"
4100if test "$cross_compiling" = yes; then
4101 ac_cv_kthread=no
4102else
4103 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004104/* confdefs.h. */
4105_ACEOF
4106cat confdefs.h >>conftest.$ac_ext
4107cat >>conftest.$ac_ext <<_ACEOF
4108/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004109
4110#include <pthread.h>
4111
4112void* routine(void* p){return NULL;}
4113
4114int main(){
4115 pthread_t p;
4116 if(pthread_create(&p,NULL,routine,NULL)!=0)
4117 return 1;
4118 (void)pthread_detach(p);
4119 return 0;
4120}
4121
4122_ACEOF
4123rm -f conftest$ac_exeext
4124if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4125 (eval $ac_link) 2>&5
4126 ac_status=$?
4127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4128 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4129 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4130 (eval $ac_try) 2>&5
4131 ac_status=$?
4132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4133 (exit $ac_status); }; }; then
4134 ac_cv_kthread=yes
4135else
4136 echo "$as_me: program exited with status $ac_status" >&5
4137echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004138sed 's/^/| /' conftest.$ac_ext >&5
4139
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004140( exit $ac_status )
4141ac_cv_kthread=no
4142fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004143rm -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 +00004144fi
4145CC="$ac_save_cc"
4146fi
4147
4148echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4149echo "${ECHO_T}$ac_cv_kthread" >&6
4150fi
4151
Skip Montanarod8d39a02003-07-10 20:44:10 +00004152if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004153then
4154# -pthread, if available, provides the right #defines
4155# and linker options to make pthread_create available
4156# Some compilers won't report that they do not support -pthread,
4157# so we need to run a program to see whether it really made the
4158# function available.
4159echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4160echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4161if test "${ac_cv_thread+set}" = set; then
4162 echo $ECHO_N "(cached) $ECHO_C" >&6
4163else
4164 ac_save_cc="$CC"
4165CC="$CC -pthread"
4166if test "$cross_compiling" = yes; then
4167 ac_cv_pthread=no
4168else
4169 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004170/* confdefs.h. */
4171_ACEOF
4172cat confdefs.h >>conftest.$ac_ext
4173cat >>conftest.$ac_ext <<_ACEOF
4174/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004175
4176#include <pthread.h>
4177
4178void* routine(void* p){return NULL;}
4179
4180int main(){
4181 pthread_t p;
4182 if(pthread_create(&p,NULL,routine,NULL)!=0)
4183 return 1;
4184 (void)pthread_detach(p);
4185 return 0;
4186}
4187
4188_ACEOF
4189rm -f conftest$ac_exeext
4190if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4191 (eval $ac_link) 2>&5
4192 ac_status=$?
4193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4194 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4196 (eval $ac_try) 2>&5
4197 ac_status=$?
4198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4199 (exit $ac_status); }; }; then
4200 ac_cv_pthread=yes
4201else
4202 echo "$as_me: program exited with status $ac_status" >&5
4203echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004204sed 's/^/| /' conftest.$ac_ext >&5
4205
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004206( exit $ac_status )
4207ac_cv_pthread=no
4208fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004209rm -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 +00004210fi
4211CC="$ac_save_cc"
4212fi
4213
4214echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4215echo "${ECHO_T}$ac_cv_pthread" >&6
4216fi
4217
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004218# If we have set a CC compiler flag for thread support then
4219# check if it works for CXX, too.
4220ac_cv_cxx_thread=no
4221if test ! -z "$CXX"
4222then
4223echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4224echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4225ac_save_cxx="$CXX"
4226
4227if test "$ac_cv_kpthread" = "yes"
4228then
4229 CXX="$CXX -Kpthread"
4230 ac_cv_cxx_thread=yes
4231elif test "$ac_cv_kthread" = "yes"
4232then
4233 CXX="$CXX -Kthread"
4234 ac_cv_cxx_thread=yes
4235elif test "$ac_cv_pthread" = "yes"
4236then
4237 CXX="$CXX -pthread"
4238 ac_cv_cxx_thread=yes
4239fi
4240
4241if test $ac_cv_cxx_thread = yes
4242then
4243 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4244 $CXX -c conftest.$ac_ext 2>&5
4245 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4246 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4247 then
4248 ac_cv_cxx_thread=yes
4249 else
4250 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004251 fi
4252 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004253fi
4254fi
Martin v. Löwis519adae2003-09-20 10:47:47 +00004255CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004256echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4257echo "${ECHO_T}$ac_cv_cxx_thread" >&6
4258
Michael W. Hudson54241132001-12-07 15:38:26 +00004259
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004260# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004261echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4262echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4263if test "${ac_cv_header_stdc+set}" = set; then
4264 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004265else
Martin v. Löwis11437992002-04-12 09:54:03 +00004266 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004267/* confdefs.h. */
4268_ACEOF
4269cat confdefs.h >>conftest.$ac_ext
4270cat >>conftest.$ac_ext <<_ACEOF
4271/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004272#include <stdlib.h>
4273#include <stdarg.h>
4274#include <string.h>
4275#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004276
Skip Montanaro6dead952003-09-25 14:50:04 +00004277int
4278main ()
4279{
4280
4281 ;
4282 return 0;
4283}
Martin v. Löwis11437992002-04-12 09:54:03 +00004284_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004285rm -f conftest.$ac_objext
4286if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004287 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004288 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004289 grep -v '^ *+' conftest.er1 >conftest.err
4290 rm -f conftest.er1
4291 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004292 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004293 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00004294 { ac_try='test -z "$ac_c_werror_flag"
4295 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004296 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4297 (eval $ac_try) 2>&5
4298 ac_status=$?
4299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4300 (exit $ac_status); }; } &&
4301 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00004302 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4303 (eval $ac_try) 2>&5
4304 ac_status=$?
4305 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4306 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004307 ac_cv_header_stdc=yes
4308else
Martin v. Löwis11437992002-04-12 09:54:03 +00004309 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004310sed 's/^/| /' conftest.$ac_ext >&5
4311
4312ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004313fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004314rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004315
4316if test $ac_cv_header_stdc = yes; then
4317 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004318 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004319/* confdefs.h. */
4320_ACEOF
4321cat confdefs.h >>conftest.$ac_ext
4322cat >>conftest.$ac_ext <<_ACEOF
4323/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004324#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004325
4326_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004327if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004328 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004329 :
4330else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004331 ac_cv_header_stdc=no
4332fi
4333rm -f conftest*
4334
4335fi
4336
4337if test $ac_cv_header_stdc = yes; then
4338 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004339 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004340/* confdefs.h. */
4341_ACEOF
4342cat confdefs.h >>conftest.$ac_ext
4343cat >>conftest.$ac_ext <<_ACEOF
4344/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004345#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004346
4347_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004348if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004349 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004350 :
4351else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004352 ac_cv_header_stdc=no
4353fi
4354rm -f conftest*
4355
4356fi
4357
4358if test $ac_cv_header_stdc = yes; then
4359 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004360 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004361 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004362else
Martin v. Löwis11437992002-04-12 09:54:03 +00004363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004364/* confdefs.h. */
4365_ACEOF
4366cat confdefs.h >>conftest.$ac_ext
4367cat >>conftest.$ac_ext <<_ACEOF
4368/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004369#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004370#if ((' ' & 0x0FF) == 0x020)
4371# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4372# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4373#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004374# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004375 (('a' <= (c) && (c) <= 'i') \
4376 || ('j' <= (c) && (c) <= 'r') \
4377 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00004378# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4379#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004380
Martin v. Löwis11437992002-04-12 09:54:03 +00004381#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4382int
4383main ()
4384{
4385 int i;
4386 for (i = 0; i < 256; i++)
4387 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00004388 || toupper (i) != TOUPPER (i))
Martin v. Löwis11437992002-04-12 09:54:03 +00004389 exit(2);
4390 exit (0);
4391}
4392_ACEOF
4393rm -f conftest$ac_exeext
4394if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4395 (eval $ac_link) 2>&5
4396 ac_status=$?
4397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4398 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4399 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4400 (eval $ac_try) 2>&5
4401 ac_status=$?
4402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4403 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004404 :
4405else
Martin v. Löwis11437992002-04-12 09:54:03 +00004406 echo "$as_me: program exited with status $ac_status" >&5
4407echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004408sed 's/^/| /' conftest.$ac_ext >&5
4409
Martin v. Löwis11437992002-04-12 09:54:03 +00004410( exit $ac_status )
4411ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004412fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004413rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004414fi
4415fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004416fi
4417echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4418echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004419if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004420
4421cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004422#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004423_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004424
4425fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004426
Skip Montanarob9820a32004-01-17 00:16:12 +00004427# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004438 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00004439do
4440as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4441echo "$as_me:$LINENO: checking for $ac_header" >&5
4442echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4443if eval "test \"\${$as_ac_Header+set}\" = set"; then
4444 echo $ECHO_N "(cached) $ECHO_C" >&6
4445else
4446 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00004447/* confdefs.h. */
4448_ACEOF
4449cat confdefs.h >>conftest.$ac_ext
4450cat >>conftest.$ac_ext <<_ACEOF
4451/* end confdefs.h. */
4452$ac_includes_default
4453
4454#include <$ac_header>
4455_ACEOF
4456rm -f conftest.$ac_objext
4457if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004458 (eval $ac_compile) 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00004459 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004460 grep -v '^ *+' conftest.er1 >conftest.err
4461 rm -f conftest.er1
4462 cat conftest.err >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00004463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4464 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00004465 { ac_try='test -z "$ac_c_werror_flag"
4466 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004467 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4468 (eval $ac_try) 2>&5
4469 ac_status=$?
4470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4471 (exit $ac_status); }; } &&
4472 { ac_try='test -s conftest.$ac_objext'
Skip Montanarob9820a32004-01-17 00:16:12 +00004473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4474 (eval $ac_try) 2>&5
4475 ac_status=$?
4476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4477 (exit $ac_status); }; }; then
4478 eval "$as_ac_Header=yes"
4479else
4480 echo "$as_me: failed program was:" >&5
4481sed 's/^/| /' conftest.$ac_ext >&5
4482
4483eval "$as_ac_Header=no"
4484fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004485rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00004486fi
4487echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4488echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4489if test `eval echo '${'$as_ac_Header'}'` = yes; then
4490 cat >>confdefs.h <<_ACEOF
4491#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4492_ACEOF
4493
4494fi
4495
4496done
4497
4498
Martin v. Löwis11437992002-04-12 09:54:03 +00004499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
Skip Montanaro7befb992004-02-10 16:50:21 +00004535for ac_header in dlfcn.h fcntl.h grp.h langinfo.h \
4536libintl.h ncurses.h poll.h pthread.h \
4537stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004538unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004539sys/audioio.h sys/bsdtty.h sys/file.h sys/lock.h sys/mkdev.h sys/modem.h \
Andrew M. Kuchling881fd902001-07-14 20:55:52 +00004540sys/param.h sys/poll.h sys/select.h sys/socket.h sys/time.h sys/times.h \
Martin v. Löwisa5f09072002-10-11 05:37:59 +00004541sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004542sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4543bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004544do
Martin v. Löwis11437992002-04-12 09:54:03 +00004545as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4546if eval "test \"\${$as_ac_Header+set}\" = set"; then
4547 echo "$as_me:$LINENO: checking for $ac_header" >&5
4548echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4549if eval "test \"\${$as_ac_Header+set}\" = set"; then
4550 echo $ECHO_N "(cached) $ECHO_C" >&6
4551fi
4552echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4553echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004554else
Martin v. Löwis11437992002-04-12 09:54:03 +00004555 # Is the header compilable?
4556echo "$as_me:$LINENO: checking $ac_header usability" >&5
4557echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4558cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004559/* confdefs.h. */
4560_ACEOF
4561cat confdefs.h >>conftest.$ac_ext
4562cat >>conftest.$ac_ext <<_ACEOF
4563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004564$ac_includes_default
4565#include <$ac_header>
4566_ACEOF
4567rm -f conftest.$ac_objext
4568if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004569 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004570 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004571 grep -v '^ *+' conftest.er1 >conftest.err
4572 rm -f conftest.er1
4573 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4575 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00004576 { ac_try='test -z "$ac_c_werror_flag"
4577 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004578 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4579 (eval $ac_try) 2>&5
4580 ac_status=$?
4581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4582 (exit $ac_status); }; } &&
4583 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004584 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4585 (eval $ac_try) 2>&5
4586 ac_status=$?
4587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4588 (exit $ac_status); }; }; then
4589 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004590else
Martin v. Löwis11437992002-04-12 09:54:03 +00004591 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004592sed 's/^/| /' conftest.$ac_ext >&5
4593
Martin v. Löwis11437992002-04-12 09:54:03 +00004594ac_header_compiler=no
4595fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004596rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004597echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4598echo "${ECHO_T}$ac_header_compiler" >&6
4599
4600# Is the header present?
4601echo "$as_me:$LINENO: checking $ac_header presence" >&5
4602echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4603cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004604/* confdefs.h. */
4605_ACEOF
4606cat confdefs.h >>conftest.$ac_ext
4607cat >>conftest.$ac_ext <<_ACEOF
4608/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004609#include <$ac_header>
4610_ACEOF
4611if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4612 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4613 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004614 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004615 rm -f conftest.er1
4616 cat conftest.err >&5
4617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4618 (exit $ac_status); } >/dev/null; then
4619 if test -s conftest.err; then
4620 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00004621 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +00004622 else
4623 ac_cpp_err=
4624 fi
4625else
4626 ac_cpp_err=yes
4627fi
4628if test -z "$ac_cpp_err"; then
4629 ac_header_preproc=yes
4630else
4631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004632sed 's/^/| /' conftest.$ac_ext >&5
4633
Martin v. Löwis11437992002-04-12 09:54:03 +00004634 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004635fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004636rm -f conftest.err conftest.$ac_ext
4637echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4638echo "${ECHO_T}$ac_header_preproc" >&6
4639
4640# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004641case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4642 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +00004643 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4644echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004645 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
4646echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
4647 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004648 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00004649 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004650 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4651echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004652 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4653echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4654 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
4655echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
4656 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
4657echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004658 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4659echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00004660 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
4661echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004662 (
4663 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +00004664## --------------------------------- ##
4665## Report this to the python lists. ##
4666## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00004667_ASBOX
4668 ) |
4669 sed "s/^/$as_me: WARNING: /" >&2
4670 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004671esac
4672echo "$as_me:$LINENO: checking for $ac_header" >&5
4673echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4674if eval "test \"\${$as_ac_Header+set}\" = set"; then
4675 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004676else
Skip Montanarof0d5f792004-08-15 14:08:23 +00004677 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004678fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004679echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4680echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4681
4682fi
4683if test `eval echo '${'$as_ac_Header'}'` = yes; then
4684 cat >>confdefs.h <<_ACEOF
4685#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4686_ACEOF
4687
4688fi
4689
Guido van Rossum627b2d71993-12-24 10:39:16 +00004690done
4691
Martin v. Löwis11437992002-04-12 09:54:03 +00004692
4693
4694
4695
4696
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004697ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004698for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4699 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4700echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4701echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4702if eval "test \"\${$as_ac_Header+set}\" = set"; then
4703 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004704else
Martin v. Löwis11437992002-04-12 09:54:03 +00004705 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004706/* confdefs.h. */
4707_ACEOF
4708cat confdefs.h >>conftest.$ac_ext
4709cat >>conftest.$ac_ext <<_ACEOF
4710/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004711#include <sys/types.h>
4712#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004713
Martin v. Löwis11437992002-04-12 09:54:03 +00004714int
4715main ()
4716{
4717if ((DIR *) 0)
4718return 0;
4719 ;
4720 return 0;
4721}
4722_ACEOF
4723rm -f conftest.$ac_objext
4724if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004725 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004727 grep -v '^ *+' conftest.er1 >conftest.err
4728 rm -f conftest.er1
4729 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004730 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4731 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00004732 { ac_try='test -z "$ac_c_werror_flag"
4733 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004734 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4735 (eval $ac_try) 2>&5
4736 ac_status=$?
4737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4738 (exit $ac_status); }; } &&
4739 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4741 (eval $ac_try) 2>&5
4742 ac_status=$?
4743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4744 (exit $ac_status); }; }; then
4745 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004746else
Martin v. Löwis11437992002-04-12 09:54:03 +00004747 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004748sed 's/^/| /' conftest.$ac_ext >&5
4749
Martin v. Löwis11437992002-04-12 09:54:03 +00004750eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004751fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004752rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004753fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004754echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4755echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4756if test `eval echo '${'$as_ac_Header'}'` = yes; then
4757 cat >>confdefs.h <<_ACEOF
4758#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4759_ACEOF
4760
4761ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004762fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004763
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004764done
4765# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4766if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004767 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4768echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4769if test "${ac_cv_search_opendir+set}" = set; then
4770 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004771else
Martin v. Löwis11437992002-04-12 09:54:03 +00004772 ac_func_search_save_LIBS=$LIBS
4773ac_cv_search_opendir=no
4774cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004775/* confdefs.h. */
4776_ACEOF
4777cat confdefs.h >>conftest.$ac_ext
4778cat >>conftest.$ac_ext <<_ACEOF
4779/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004780
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004781/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004782#ifdef __cplusplus
4783extern "C"
4784#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004785/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004786 builtin and then its argument prototype would still apply. */
4787char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004788int
4789main ()
4790{
4791opendir ();
4792 ;
4793 return 0;
4794}
4795_ACEOF
4796rm -f conftest.$ac_objext conftest$ac_exeext
4797if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004798 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004799 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004800 grep -v '^ *+' conftest.er1 >conftest.err
4801 rm -f conftest.er1
4802 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4804 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00004805 { ac_try='test -z "$ac_c_werror_flag"
4806 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4808 (eval $ac_try) 2>&5
4809 ac_status=$?
4810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4811 (exit $ac_status); }; } &&
4812 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004813 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4814 (eval $ac_try) 2>&5
4815 ac_status=$?
4816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4817 (exit $ac_status); }; }; then
4818 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004819else
Martin v. Löwis11437992002-04-12 09:54:03 +00004820 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004821sed 's/^/| /' conftest.$ac_ext >&5
4822
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004823fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004824rm -f conftest.err conftest.$ac_objext \
4825 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004826if test "$ac_cv_search_opendir" = no; then
4827 for ac_lib in dir; do
4828 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4829 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004830/* confdefs.h. */
4831_ACEOF
4832cat confdefs.h >>conftest.$ac_ext
4833cat >>conftest.$ac_ext <<_ACEOF
4834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004835
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004836/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004837#ifdef __cplusplus
4838extern "C"
4839#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004840/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004841 builtin and then its argument prototype would still apply. */
4842char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004843int
4844main ()
4845{
4846opendir ();
4847 ;
4848 return 0;
4849}
4850_ACEOF
4851rm -f conftest.$ac_objext conftest$ac_exeext
4852if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004853 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004855 grep -v '^ *+' conftest.er1 >conftest.err
4856 rm -f conftest.er1
4857 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4859 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00004860 { ac_try='test -z "$ac_c_werror_flag"
4861 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004862 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4863 (eval $ac_try) 2>&5
4864 ac_status=$?
4865 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4866 (exit $ac_status); }; } &&
4867 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004868 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4869 (eval $ac_try) 2>&5
4870 ac_status=$?
4871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4872 (exit $ac_status); }; }; then
4873 ac_cv_search_opendir="-l$ac_lib"
4874break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004875else
Martin v. Löwis11437992002-04-12 09:54:03 +00004876 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004877sed 's/^/| /' conftest.$ac_ext >&5
4878
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004879fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004880rm -f conftest.err conftest.$ac_objext \
4881 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004882 done
4883fi
4884LIBS=$ac_func_search_save_LIBS
4885fi
4886echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4887echo "${ECHO_T}$ac_cv_search_opendir" >&6
4888if test "$ac_cv_search_opendir" != no; then
4889 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004890
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004891fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004892
Michael W. Hudson54241132001-12-07 15:38:26 +00004893else
Martin v. Löwis11437992002-04-12 09:54:03 +00004894 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4895echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4896if test "${ac_cv_search_opendir+set}" = set; then
4897 echo $ECHO_N "(cached) $ECHO_C" >&6
4898else
4899 ac_func_search_save_LIBS=$LIBS
4900ac_cv_search_opendir=no
4901cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004902/* confdefs.h. */
4903_ACEOF
4904cat confdefs.h >>conftest.$ac_ext
4905cat >>conftest.$ac_ext <<_ACEOF
4906/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004907
4908/* Override any gcc2 internal prototype to avoid an error. */
4909#ifdef __cplusplus
4910extern "C"
4911#endif
4912/* We use char because int might match the return type of a gcc2
4913 builtin and then its argument prototype would still apply. */
4914char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004915int
4916main ()
4917{
4918opendir ();
4919 ;
4920 return 0;
4921}
4922_ACEOF
4923rm -f conftest.$ac_objext conftest$ac_exeext
4924if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004925 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004926 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004927 grep -v '^ *+' conftest.er1 >conftest.err
4928 rm -f conftest.er1
4929 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004930 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4931 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00004932 { ac_try='test -z "$ac_c_werror_flag"
4933 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004934 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4935 (eval $ac_try) 2>&5
4936 ac_status=$?
4937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4938 (exit $ac_status); }; } &&
4939 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4941 (eval $ac_try) 2>&5
4942 ac_status=$?
4943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4944 (exit $ac_status); }; }; then
4945 ac_cv_search_opendir="none required"
4946else
4947 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004948sed 's/^/| /' conftest.$ac_ext >&5
4949
Martin v. Löwis11437992002-04-12 09:54:03 +00004950fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00004951rm -f conftest.err conftest.$ac_objext \
4952 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004953if test "$ac_cv_search_opendir" = no; then
4954 for ac_lib in x; do
4955 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004957/* confdefs.h. */
4958_ACEOF
4959cat confdefs.h >>conftest.$ac_ext
4960cat >>conftest.$ac_ext <<_ACEOF
4961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004962
4963/* Override any gcc2 internal prototype to avoid an error. */
4964#ifdef __cplusplus
4965extern "C"
4966#endif
4967/* We use char because int might match the return type of a gcc2
4968 builtin and then its argument prototype would still apply. */
4969char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004970int
4971main ()
4972{
4973opendir ();
4974 ;
4975 return 0;
4976}
4977_ACEOF
4978rm -f conftest.$ac_objext conftest$ac_exeext
4979if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00004980 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00004981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004982 grep -v '^ *+' conftest.er1 >conftest.err
4983 rm -f conftest.er1
4984 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4986 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00004987 { ac_try='test -z "$ac_c_werror_flag"
4988 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00004989 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4990 (eval $ac_try) 2>&5
4991 ac_status=$?
4992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4993 (exit $ac_status); }; } &&
4994 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4996 (eval $ac_try) 2>&5
4997 ac_status=$?
4998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4999 (exit $ac_status); }; }; then
5000 ac_cv_search_opendir="-l$ac_lib"
5001break
5002else
5003 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005004sed 's/^/| /' conftest.$ac_ext >&5
5005
Martin v. Löwis11437992002-04-12 09:54:03 +00005006fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005007rm -f conftest.err conftest.$ac_objext \
5008 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005009 done
5010fi
5011LIBS=$ac_func_search_save_LIBS
5012fi
5013echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
5014echo "${ECHO_T}$ac_cv_search_opendir" >&6
5015if test "$ac_cv_search_opendir" != no; then
5016 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
5017
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005018fi
5019
5020fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005021
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005022echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
5023echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
5024if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
5025 echo $ECHO_N "(cached) $ECHO_C" >&6
5026else
5027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005028/* confdefs.h. */
5029_ACEOF
5030cat confdefs.h >>conftest.$ac_ext
5031cat >>conftest.$ac_ext <<_ACEOF
5032/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005033#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005034int
5035main ()
5036{
5037return makedev(0, 0);
5038 ;
5039 return 0;
5040}
5041_ACEOF
5042rm -f conftest.$ac_objext conftest$ac_exeext
5043if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005044 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005045 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005046 grep -v '^ *+' conftest.er1 >conftest.err
5047 rm -f conftest.er1
5048 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5050 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005051 { ac_try='test -z "$ac_c_werror_flag"
5052 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5054 (eval $ac_try) 2>&5
5055 ac_status=$?
5056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5057 (exit $ac_status); }; } &&
5058 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005059 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5060 (eval $ac_try) 2>&5
5061 ac_status=$?
5062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5063 (exit $ac_status); }; }; then
5064 ac_cv_header_sys_types_h_makedev=yes
5065else
5066 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005067sed 's/^/| /' conftest.$ac_ext >&5
5068
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005069ac_cv_header_sys_types_h_makedev=no
5070fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005071rm -f conftest.err conftest.$ac_objext \
5072 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005073
5074fi
5075echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
5076echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
5077
5078if test $ac_cv_header_sys_types_h_makedev = no; then
5079if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5080 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5081echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5082if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5083 echo $ECHO_N "(cached) $ECHO_C" >&6
5084fi
5085echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5086echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5087else
5088 # Is the header compilable?
5089echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
5090echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
5091cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005092/* confdefs.h. */
5093_ACEOF
5094cat confdefs.h >>conftest.$ac_ext
5095cat >>conftest.$ac_ext <<_ACEOF
5096/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005097$ac_includes_default
5098#include <sys/mkdev.h>
5099_ACEOF
5100rm -f conftest.$ac_objext
5101if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005102 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005103 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005104 grep -v '^ *+' conftest.er1 >conftest.err
5105 rm -f conftest.er1
5106 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5108 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005109 { ac_try='test -z "$ac_c_werror_flag"
5110 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005111 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5112 (eval $ac_try) 2>&5
5113 ac_status=$?
5114 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5115 (exit $ac_status); }; } &&
5116 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005117 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5118 (eval $ac_try) 2>&5
5119 ac_status=$?
5120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5121 (exit $ac_status); }; }; then
5122 ac_header_compiler=yes
5123else
5124 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005125sed 's/^/| /' conftest.$ac_ext >&5
5126
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005127ac_header_compiler=no
5128fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005129rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005130echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5131echo "${ECHO_T}$ac_header_compiler" >&6
5132
5133# Is the header present?
5134echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
5135echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
5136cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005137/* confdefs.h. */
5138_ACEOF
5139cat confdefs.h >>conftest.$ac_ext
5140cat >>conftest.$ac_ext <<_ACEOF
5141/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005142#include <sys/mkdev.h>
5143_ACEOF
5144if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5145 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5146 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005147 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005148 rm -f conftest.er1
5149 cat conftest.err >&5
5150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5151 (exit $ac_status); } >/dev/null; then
5152 if test -s conftest.err; then
5153 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005154 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005155 else
5156 ac_cpp_err=
5157 fi
5158else
5159 ac_cpp_err=yes
5160fi
5161if test -z "$ac_cpp_err"; then
5162 ac_header_preproc=yes
5163else
5164 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005165sed 's/^/| /' conftest.$ac_ext >&5
5166
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005167 ac_header_preproc=no
5168fi
5169rm -f conftest.err conftest.$ac_ext
5170echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5171echo "${ECHO_T}$ac_header_preproc" >&6
5172
5173# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005174case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5175 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005176 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
5177echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005178 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
5179echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
5180 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005181 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005182 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005183 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
5184echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005185 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
5186echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
5187 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
5188echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
5189 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
5190echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005191 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
5192echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005193 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
5194echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005195 (
5196 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +00005197## --------------------------------- ##
5198## Report this to the python lists. ##
5199## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005200_ASBOX
5201 ) |
5202 sed "s/^/$as_me: WARNING: /" >&2
5203 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005204esac
5205echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5206echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5207if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5208 echo $ECHO_N "(cached) $ECHO_C" >&6
5209else
5210 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5211fi
5212echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5213echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5214
5215fi
5216if test $ac_cv_header_sys_mkdev_h = yes; then
5217
5218cat >>confdefs.h <<\_ACEOF
5219#define MAJOR_IN_MKDEV 1
5220_ACEOF
5221
5222fi
5223
5224
5225
5226 if test $ac_cv_header_sys_mkdev_h = no; then
5227 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5228 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5229echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5230if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5231 echo $ECHO_N "(cached) $ECHO_C" >&6
5232fi
5233echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5234echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5235else
5236 # Is the header compilable?
5237echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5238echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
5239cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005240/* confdefs.h. */
5241_ACEOF
5242cat confdefs.h >>conftest.$ac_ext
5243cat >>conftest.$ac_ext <<_ACEOF
5244/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005245$ac_includes_default
5246#include <sys/sysmacros.h>
5247_ACEOF
5248rm -f conftest.$ac_objext
5249if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005250 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005251 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005252 grep -v '^ *+' conftest.er1 >conftest.err
5253 rm -f conftest.er1
5254 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5256 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005257 { ac_try='test -z "$ac_c_werror_flag"
5258 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005259 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5260 (eval $ac_try) 2>&5
5261 ac_status=$?
5262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5263 (exit $ac_status); }; } &&
5264 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5266 (eval $ac_try) 2>&5
5267 ac_status=$?
5268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5269 (exit $ac_status); }; }; then
5270 ac_header_compiler=yes
5271else
5272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005273sed 's/^/| /' conftest.$ac_ext >&5
5274
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005275ac_header_compiler=no
5276fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005277rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005278echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5279echo "${ECHO_T}$ac_header_compiler" >&6
5280
5281# Is the header present?
5282echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5283echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5284cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005285/* confdefs.h. */
5286_ACEOF
5287cat confdefs.h >>conftest.$ac_ext
5288cat >>conftest.$ac_ext <<_ACEOF
5289/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005290#include <sys/sysmacros.h>
5291_ACEOF
5292if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5293 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5294 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005295 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005296 rm -f conftest.er1
5297 cat conftest.err >&5
5298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5299 (exit $ac_status); } >/dev/null; then
5300 if test -s conftest.err; then
5301 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +00005302 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005303 else
5304 ac_cpp_err=
5305 fi
5306else
5307 ac_cpp_err=yes
5308fi
5309if test -z "$ac_cpp_err"; then
5310 ac_header_preproc=yes
5311else
5312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005313sed 's/^/| /' conftest.$ac_ext >&5
5314
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005315 ac_header_preproc=no
5316fi
5317rm -f conftest.err conftest.$ac_ext
5318echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5319echo "${ECHO_T}$ac_header_preproc" >&6
5320
5321# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005322case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5323 yes:no: )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005324 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5325echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005326 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
5327echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
5328 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005329 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005330 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005331 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5332echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005333 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5334echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5335 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
5336echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
5337 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
5338echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005339 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
5340echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005341 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
5342echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005343 (
5344 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +00005345## --------------------------------- ##
5346## Report this to the python lists. ##
5347## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005348_ASBOX
5349 ) |
5350 sed "s/^/$as_me: WARNING: /" >&2
5351 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005352esac
5353echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5354echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5355if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5356 echo $ECHO_N "(cached) $ECHO_C" >&6
5357else
5358 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5359fi
5360echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5361echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5362
5363fi
5364if test $ac_cv_header_sys_sysmacros_h = yes; then
5365
5366cat >>confdefs.h <<\_ACEOF
5367#define MAJOR_IN_SYSMACROS 1
5368_ACEOF
5369
5370fi
5371
5372
5373 fi
5374fi
5375
Michael W. Hudson54241132001-12-07 15:38:26 +00005376
Guido van Rossum627b2d71993-12-24 10:39:16 +00005377# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005378was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005379echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5380echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5381cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005382/* confdefs.h. */
5383_ACEOF
5384cat confdefs.h >>conftest.$ac_ext
5385cat >>conftest.$ac_ext <<_ACEOF
5386/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005387#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005388
5389_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005390if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005391 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005392 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005393else
Martin v. Löwis11437992002-04-12 09:54:03 +00005394
5395
5396cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005397#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005398_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005399
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005400
Guido van Rossum627b2d71993-12-24 10:39:16 +00005401fi
5402rm -f conftest*
5403
Martin v. Löwis11437992002-04-12 09:54:03 +00005404echo "$as_me:$LINENO: result: $was_it_defined" >&5
5405echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005406
Neal Norwitz11690112002-07-30 01:08:28 +00005407# Check whether using makedev requires defining _OSF_SOURCE
5408echo "$as_me:$LINENO: checking for makedev" >&5
5409echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5410cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005411/* confdefs.h. */
5412_ACEOF
5413cat confdefs.h >>conftest.$ac_ext
5414cat >>conftest.$ac_ext <<_ACEOF
5415/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005416#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005417int
5418main ()
5419{
5420 makedev(0, 0)
5421 ;
5422 return 0;
5423}
5424_ACEOF
5425rm -f conftest.$ac_objext conftest$ac_exeext
5426if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005427 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005428 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005429 grep -v '^ *+' conftest.er1 >conftest.err
5430 rm -f conftest.er1
5431 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5433 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005434 { ac_try='test -z "$ac_c_werror_flag"
5435 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5437 (eval $ac_try) 2>&5
5438 ac_status=$?
5439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5440 (exit $ac_status); }; } &&
5441 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005442 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5443 (eval $ac_try) 2>&5
5444 ac_status=$?
5445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5446 (exit $ac_status); }; }; then
5447 ac_cv_has_makedev=yes
5448else
5449 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005450sed 's/^/| /' conftest.$ac_ext >&5
5451
Neal Norwitz11690112002-07-30 01:08:28 +00005452ac_cv_has_makedev=no
5453fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005454rm -f conftest.err conftest.$ac_objext \
5455 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005456if test "$ac_cv_has_makedev" = "no"; then
5457 # we didn't link, try if _OSF_SOURCE will allow us to link
5458 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005459/* confdefs.h. */
5460_ACEOF
5461cat confdefs.h >>conftest.$ac_ext
5462cat >>conftest.$ac_ext <<_ACEOF
5463/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005464
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005465#define _OSF_SOURCE 1
5466#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005467
Neal Norwitz11690112002-07-30 01:08:28 +00005468int
5469main ()
5470{
5471 makedev(0, 0)
5472 ;
5473 return 0;
5474}
5475_ACEOF
5476rm -f conftest.$ac_objext conftest$ac_exeext
5477if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005478 (eval $ac_link) 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00005479 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005480 grep -v '^ *+' conftest.er1 >conftest.err
5481 rm -f conftest.er1
5482 cat conftest.err >&5
Neal Norwitz11690112002-07-30 01:08:28 +00005483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5484 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005485 { ac_try='test -z "$ac_c_werror_flag"
5486 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5488 (eval $ac_try) 2>&5
5489 ac_status=$?
5490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5491 (exit $ac_status); }; } &&
5492 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5494 (eval $ac_try) 2>&5
5495 ac_status=$?
5496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5497 (exit $ac_status); }; }; then
5498 ac_cv_has_makedev=yes
5499else
5500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005501sed 's/^/| /' conftest.$ac_ext >&5
5502
Neal Norwitz11690112002-07-30 01:08:28 +00005503ac_cv_has_makedev=no
5504fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005505rm -f conftest.err conftest.$ac_objext \
5506 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005507 if test "$ac_cv_has_makedev" = "yes"; then
5508
5509cat >>confdefs.h <<\_ACEOF
5510#define _OSF_SOURCE 1
5511_ACEOF
5512
5513 fi
5514fi
5515echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5516echo "${ECHO_T}$ac_cv_has_makedev" >&6
5517if test "$ac_cv_has_makedev" = "yes"; then
5518
5519cat >>confdefs.h <<\_ACEOF
5520#define HAVE_MAKEDEV 1
5521_ACEOF
5522
5523fi
5524
Martin v. Löwis399a6892002-10-04 10:22:02 +00005525# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5526# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5527# defined, but the compiler does not support pragma redefine_extname,
5528# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5529# structures (such as rlimit64) without declaring them. As a
5530# work-around, disable LFS on such configurations
5531
5532use_lfs=yes
5533echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5534echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5535cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005536/* confdefs.h. */
5537_ACEOF
5538cat confdefs.h >>conftest.$ac_ext
5539cat >>conftest.$ac_ext <<_ACEOF
5540/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005541
5542#define _LARGEFILE_SOURCE 1
5543#define _FILE_OFFSET_BITS 64
5544#include <sys/resource.h>
5545
Martin v. Löwis399a6892002-10-04 10:22:02 +00005546int
5547main ()
5548{
5549struct rlimit foo;
5550 ;
5551 return 0;
5552}
5553_ACEOF
5554rm -f conftest.$ac_objext
5555if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005556 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00005557 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005558 grep -v '^ *+' conftest.er1 >conftest.err
5559 rm -f conftest.er1
5560 cat conftest.err >&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00005561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5562 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005563 { ac_try='test -z "$ac_c_werror_flag"
5564 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5566 (eval $ac_try) 2>&5
5567 ac_status=$?
5568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5569 (exit $ac_status); }; } &&
5570 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis399a6892002-10-04 10:22:02 +00005571 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5572 (eval $ac_try) 2>&5
5573 ac_status=$?
5574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5575 (exit $ac_status); }; }; then
5576 sol_lfs_bug=no
5577else
5578 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005579sed 's/^/| /' conftest.$ac_ext >&5
5580
Martin v. Löwis399a6892002-10-04 10:22:02 +00005581sol_lfs_bug=yes
5582fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005583rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis399a6892002-10-04 10:22:02 +00005584echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5585echo "${ECHO_T}$sol_lfs_bug" >&6
5586if test "$sol_lfs_bug" = "yes"; then
5587 use_lfs=no
5588fi
5589
5590if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005591# Two defines needed to enable largefile support on various platforms
5592# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005593
Martin v. Löwis11437992002-04-12 09:54:03 +00005594cat >>confdefs.h <<\_ACEOF
5595#define _LARGEFILE_SOURCE 1
5596_ACEOF
5597
5598
5599cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005600#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005601_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005602
Martin v. Löwis399a6892002-10-04 10:22:02 +00005603fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005604
Guido van Rossum84e7b241996-08-19 21:59:00 +00005605# Add some code to confdefs.h so that the test for off_t works on SCO
5606cat >> confdefs.h <<\EOF
5607#if defined(SCO_DS)
5608#undef _OFF_T
5609#endif
5610EOF
5611
Guido van Rossumef2255b2000-03-10 22:30:29 +00005612# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005613echo "$as_me:$LINENO: checking for mode_t" >&5
5614echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5615if test "${ac_cv_type_mode_t+set}" = set; then
5616 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005617else
Martin v. Löwis11437992002-04-12 09:54:03 +00005618 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005619/* confdefs.h. */
5620_ACEOF
5621cat confdefs.h >>conftest.$ac_ext
5622cat >>conftest.$ac_ext <<_ACEOF
5623/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005624$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005625int
5626main ()
5627{
5628if ((mode_t *) 0)
5629 return 0;
5630if (sizeof (mode_t))
5631 return 0;
5632 ;
5633 return 0;
5634}
5635_ACEOF
5636rm -f conftest.$ac_objext
5637if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005638 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005639 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005640 grep -v '^ *+' conftest.er1 >conftest.err
5641 rm -f conftest.er1
5642 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5644 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005645 { ac_try='test -z "$ac_c_werror_flag"
5646 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005647 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5648 (eval $ac_try) 2>&5
5649 ac_status=$?
5650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5651 (exit $ac_status); }; } &&
5652 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005653 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5654 (eval $ac_try) 2>&5
5655 ac_status=$?
5656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5657 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005658 ac_cv_type_mode_t=yes
5659else
Martin v. Löwis11437992002-04-12 09:54:03 +00005660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005661sed 's/^/| /' conftest.$ac_ext >&5
5662
Martin v. Löwis11437992002-04-12 09:54:03 +00005663ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005664fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005665rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005666fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005667echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5668echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5669if test $ac_cv_type_mode_t = yes; then
5670 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005671else
Martin v. Löwis11437992002-04-12 09:54:03 +00005672
5673cat >>confdefs.h <<_ACEOF
5674#define mode_t int
5675_ACEOF
5676
5677fi
5678
5679echo "$as_me:$LINENO: checking for off_t" >&5
5680echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5681if test "${ac_cv_type_off_t+set}" = set; then
5682 echo $ECHO_N "(cached) $ECHO_C" >&6
5683else
5684 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005685/* confdefs.h. */
5686_ACEOF
5687cat confdefs.h >>conftest.$ac_ext
5688cat >>conftest.$ac_ext <<_ACEOF
5689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005690$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005691int
5692main ()
5693{
5694if ((off_t *) 0)
5695 return 0;
5696if (sizeof (off_t))
5697 return 0;
5698 ;
5699 return 0;
5700}
5701_ACEOF
5702rm -f conftest.$ac_objext
5703if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005704 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005706 grep -v '^ *+' conftest.er1 >conftest.err
5707 rm -f conftest.er1
5708 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5710 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005711 { ac_try='test -z "$ac_c_werror_flag"
5712 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5714 (eval $ac_try) 2>&5
5715 ac_status=$?
5716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5717 (exit $ac_status); }; } &&
5718 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5720 (eval $ac_try) 2>&5
5721 ac_status=$?
5722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5723 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005724 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005725else
Martin v. Löwis11437992002-04-12 09:54:03 +00005726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005727sed 's/^/| /' conftest.$ac_ext >&5
5728
Martin v. Löwis11437992002-04-12 09:54:03 +00005729ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005730fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005731rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005732fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005733echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5734echo "${ECHO_T}$ac_cv_type_off_t" >&6
5735if test $ac_cv_type_off_t = yes; then
5736 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005737else
Martin v. Löwis11437992002-04-12 09:54:03 +00005738
5739cat >>confdefs.h <<_ACEOF
5740#define off_t long
5741_ACEOF
5742
5743fi
5744
5745echo "$as_me:$LINENO: checking for pid_t" >&5
5746echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5747if test "${ac_cv_type_pid_t+set}" = set; then
5748 echo $ECHO_N "(cached) $ECHO_C" >&6
5749else
5750 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005751/* confdefs.h. */
5752_ACEOF
5753cat confdefs.h >>conftest.$ac_ext
5754cat >>conftest.$ac_ext <<_ACEOF
5755/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005756$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005757int
5758main ()
5759{
5760if ((pid_t *) 0)
5761 return 0;
5762if (sizeof (pid_t))
5763 return 0;
5764 ;
5765 return 0;
5766}
5767_ACEOF
5768rm -f conftest.$ac_objext
5769if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005770 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005772 grep -v '^ *+' conftest.er1 >conftest.err
5773 rm -f conftest.er1
5774 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5776 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005777 { ac_try='test -z "$ac_c_werror_flag"
5778 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005779 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5780 (eval $ac_try) 2>&5
5781 ac_status=$?
5782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5783 (exit $ac_status); }; } &&
5784 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005785 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5786 (eval $ac_try) 2>&5
5787 ac_status=$?
5788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5789 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005790 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005791else
Martin v. Löwis11437992002-04-12 09:54:03 +00005792 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005793sed 's/^/| /' conftest.$ac_ext >&5
5794
Martin v. Löwis11437992002-04-12 09:54:03 +00005795ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005796fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005797rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005798fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005799echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5800echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5801if test $ac_cv_type_pid_t = yes; then
5802 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005803else
Martin v. Löwis11437992002-04-12 09:54:03 +00005804
5805cat >>confdefs.h <<_ACEOF
5806#define pid_t int
5807_ACEOF
5808
5809fi
5810
5811echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5812echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5813if test "${ac_cv_type_signal+set}" = set; then
5814 echo $ECHO_N "(cached) $ECHO_C" >&6
5815else
5816 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005817/* confdefs.h. */
5818_ACEOF
5819cat confdefs.h >>conftest.$ac_ext
5820cat >>conftest.$ac_ext <<_ACEOF
5821/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005822#include <sys/types.h>
5823#include <signal.h>
5824#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005825# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005826#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005827#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005828extern "C" void (*signal (int, void (*)(int)))(int);
5829#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005830void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005831#endif
5832
Martin v. Löwis11437992002-04-12 09:54:03 +00005833int
5834main ()
5835{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005836int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005837 ;
5838 return 0;
5839}
5840_ACEOF
5841rm -f conftest.$ac_objext
5842if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005843 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005845 grep -v '^ *+' conftest.er1 >conftest.err
5846 rm -f conftest.er1
5847 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5849 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005850 { ac_try='test -z "$ac_c_werror_flag"
5851 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5853 (eval $ac_try) 2>&5
5854 ac_status=$?
5855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5856 (exit $ac_status); }; } &&
5857 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005858 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5859 (eval $ac_try) 2>&5
5860 ac_status=$?
5861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5862 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005863 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005864else
Martin v. Löwis11437992002-04-12 09:54:03 +00005865 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005866sed 's/^/| /' conftest.$ac_ext >&5
5867
Martin v. Löwis11437992002-04-12 09:54:03 +00005868ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005869fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005870rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005871fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005872echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5873echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005874
Martin v. Löwis11437992002-04-12 09:54:03 +00005875cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005876#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005877_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005878
Michael W. Hudson54241132001-12-07 15:38:26 +00005879
Martin v. Löwis11437992002-04-12 09:54:03 +00005880echo "$as_me:$LINENO: checking for size_t" >&5
5881echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5882if test "${ac_cv_type_size_t+set}" = set; then
5883 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005884else
Martin v. Löwis11437992002-04-12 09:54:03 +00005885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005886/* confdefs.h. */
5887_ACEOF
5888cat confdefs.h >>conftest.$ac_ext
5889cat >>conftest.$ac_ext <<_ACEOF
5890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005891$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005892int
5893main ()
5894{
5895if ((size_t *) 0)
5896 return 0;
5897if (sizeof (size_t))
5898 return 0;
5899 ;
5900 return 0;
5901}
5902_ACEOF
5903rm -f conftest.$ac_objext
5904if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00005905 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005906 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005907 grep -v '^ *+' conftest.er1 >conftest.err
5908 rm -f conftest.er1
5909 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5911 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00005912 { ac_try='test -z "$ac_c_werror_flag"
5913 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00005914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5915 (eval $ac_try) 2>&5
5916 ac_status=$?
5917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5918 (exit $ac_status); }; } &&
5919 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5921 (eval $ac_try) 2>&5
5922 ac_status=$?
5923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5924 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005925 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005926else
Martin v. Löwis11437992002-04-12 09:54:03 +00005927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005928sed 's/^/| /' conftest.$ac_ext >&5
5929
Martin v. Löwis11437992002-04-12 09:54:03 +00005930ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005931fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005932rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005933fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005934echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5935echo "${ECHO_T}$ac_cv_type_size_t" >&6
5936if test $ac_cv_type_size_t = yes; then
5937 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005938else
Martin v. Löwis11437992002-04-12 09:54:03 +00005939
5940cat >>confdefs.h <<_ACEOF
5941#define size_t unsigned
5942_ACEOF
5943
5944fi
5945
5946echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5947echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5948if test "${ac_cv_type_uid_t+set}" = set; then
5949 echo $ECHO_N "(cached) $ECHO_C" >&6
5950else
5951 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005952/* confdefs.h. */
5953_ACEOF
5954cat confdefs.h >>conftest.$ac_ext
5955cat >>conftest.$ac_ext <<_ACEOF
5956/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005957#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005958
5959_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005961 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005962 ac_cv_type_uid_t=yes
5963else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005964 ac_cv_type_uid_t=no
5965fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005966rm -f conftest*
5967
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005968fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005969echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5970echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005971if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005972
Martin v. Löwis11437992002-04-12 09:54:03 +00005973cat >>confdefs.h <<\_ACEOF
5974#define uid_t int
5975_ACEOF
5976
5977
5978cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005979#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005980_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005981
5982fi
5983
Jack Jansendd19cf82001-12-06 22:36:17 +00005984
Michael W. Hudson54241132001-12-07 15:38:26 +00005985# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00005986# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00005987echo "$as_me:$LINENO: checking for int" >&5
5988echo $ECHO_N "checking for int... $ECHO_C" >&6
5989if test "${ac_cv_type_int+set}" = set; then
5990 echo $ECHO_N "(cached) $ECHO_C" >&6
5991else
5992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005993/* confdefs.h. */
5994_ACEOF
5995cat confdefs.h >>conftest.$ac_ext
5996cat >>conftest.$ac_ext <<_ACEOF
5997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005998$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005999int
6000main ()
6001{
6002if ((int *) 0)
6003 return 0;
6004if (sizeof (int))
6005 return 0;
6006 ;
6007 return 0;
6008}
6009_ACEOF
6010rm -f conftest.$ac_objext
6011if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006012 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006013 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006014 grep -v '^ *+' conftest.er1 >conftest.err
6015 rm -f conftest.er1
6016 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6018 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006019 { ac_try='test -z "$ac_c_werror_flag"
6020 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006021 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6022 (eval $ac_try) 2>&5
6023 ac_status=$?
6024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6025 (exit $ac_status); }; } &&
6026 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6028 (eval $ac_try) 2>&5
6029 ac_status=$?
6030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6031 (exit $ac_status); }; }; then
6032 ac_cv_type_int=yes
6033else
6034 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006035sed 's/^/| /' conftest.$ac_ext >&5
6036
Martin v. Löwis11437992002-04-12 09:54:03 +00006037ac_cv_type_int=no
6038fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006039rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006040fi
6041echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
6042echo "${ECHO_T}$ac_cv_type_int" >&6
6043
6044echo "$as_me:$LINENO: checking size of int" >&5
6045echo $ECHO_N "checking size of int... $ECHO_C" >&6
6046if test "${ac_cv_sizeof_int+set}" = set; then
6047 echo $ECHO_N "(cached) $ECHO_C" >&6
6048else
6049 if test "$ac_cv_type_int" = yes; then
6050 # The cast to unsigned long works around a bug in the HP C Compiler
6051 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6052 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6053 # This bug is HP SR number 8606223364.
6054 if test "$cross_compiling" = yes; then
6055 # Depending upon the size, compute the lo and hi bounds.
6056cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006057/* confdefs.h. */
6058_ACEOF
6059cat confdefs.h >>conftest.$ac_ext
6060cat >>conftest.$ac_ext <<_ACEOF
6061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006062$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006063int
6064main ()
6065{
6066static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
6067test_array [0] = 0
6068
6069 ;
6070 return 0;
6071}
6072_ACEOF
6073rm -f conftest.$ac_objext
6074if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006075 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006077 grep -v '^ *+' conftest.er1 >conftest.err
6078 rm -f conftest.er1
6079 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6081 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006082 { ac_try='test -z "$ac_c_werror_flag"
6083 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006084 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6085 (eval $ac_try) 2>&5
6086 ac_status=$?
6087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6088 (exit $ac_status); }; } &&
6089 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6091 (eval $ac_try) 2>&5
6092 ac_status=$?
6093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6094 (exit $ac_status); }; }; then
6095 ac_lo=0 ac_mid=0
6096 while :; do
6097 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006098/* confdefs.h. */
6099_ACEOF
6100cat confdefs.h >>conftest.$ac_ext
6101cat >>conftest.$ac_ext <<_ACEOF
6102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006103$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006104int
6105main ()
6106{
6107static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6108test_array [0] = 0
6109
6110 ;
6111 return 0;
6112}
6113_ACEOF
6114rm -f conftest.$ac_objext
6115if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006116 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006117 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006118 grep -v '^ *+' conftest.er1 >conftest.err
6119 rm -f conftest.er1
6120 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6122 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006123 { ac_try='test -z "$ac_c_werror_flag"
6124 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6126 (eval $ac_try) 2>&5
6127 ac_status=$?
6128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6129 (exit $ac_status); }; } &&
6130 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6132 (eval $ac_try) 2>&5
6133 ac_status=$?
6134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6135 (exit $ac_status); }; }; then
6136 ac_hi=$ac_mid; break
6137else
6138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006139sed 's/^/| /' conftest.$ac_ext >&5
6140
Martin v. Löwis11437992002-04-12 09:54:03 +00006141ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006142 if test $ac_lo -le $ac_mid; then
6143 ac_lo= ac_hi=
6144 break
6145 fi
6146 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006147fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006148rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006149 done
6150else
6151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006152sed 's/^/| /' conftest.$ac_ext >&5
6153
Martin v. Löwis11437992002-04-12 09:54:03 +00006154cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006155/* confdefs.h. */
6156_ACEOF
6157cat confdefs.h >>conftest.$ac_ext
6158cat >>conftest.$ac_ext <<_ACEOF
6159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006160$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006161int
6162main ()
6163{
6164static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
6165test_array [0] = 0
6166
6167 ;
6168 return 0;
6169}
6170_ACEOF
6171rm -f conftest.$ac_objext
6172if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006173 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006174 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006175 grep -v '^ *+' conftest.er1 >conftest.err
6176 rm -f conftest.er1
6177 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6179 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006180 { ac_try='test -z "$ac_c_werror_flag"
6181 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6183 (eval $ac_try) 2>&5
6184 ac_status=$?
6185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6186 (exit $ac_status); }; } &&
6187 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6189 (eval $ac_try) 2>&5
6190 ac_status=$?
6191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6192 (exit $ac_status); }; }; then
6193 ac_hi=-1 ac_mid=-1
6194 while :; do
6195 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006196/* confdefs.h. */
6197_ACEOF
6198cat confdefs.h >>conftest.$ac_ext
6199cat >>conftest.$ac_ext <<_ACEOF
6200/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006201$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006202int
6203main ()
6204{
6205static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
6206test_array [0] = 0
6207
6208 ;
6209 return 0;
6210}
6211_ACEOF
6212rm -f conftest.$ac_objext
6213if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006214 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006215 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006216 grep -v '^ *+' conftest.er1 >conftest.err
6217 rm -f conftest.er1
6218 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6220 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006221 { ac_try='test -z "$ac_c_werror_flag"
6222 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6224 (eval $ac_try) 2>&5
6225 ac_status=$?
6226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6227 (exit $ac_status); }; } &&
6228 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006229 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6230 (eval $ac_try) 2>&5
6231 ac_status=$?
6232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6233 (exit $ac_status); }; }; then
6234 ac_lo=$ac_mid; break
6235else
6236 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006237sed 's/^/| /' conftest.$ac_ext >&5
6238
Martin v. Löwis11437992002-04-12 09:54:03 +00006239ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006240 if test $ac_mid -le $ac_hi; then
6241 ac_lo= ac_hi=
6242 break
6243 fi
6244 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006245fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006246rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006247 done
6248else
6249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006250sed 's/^/| /' conftest.$ac_ext >&5
6251
Martin v. Löwis11437992002-04-12 09:54:03 +00006252ac_lo= ac_hi=
6253fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006254rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006255fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006256rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006257# Binary search between lo and hi bounds.
6258while test "x$ac_lo" != "x$ac_hi"; do
6259 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6260 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006261/* confdefs.h. */
6262_ACEOF
6263cat confdefs.h >>conftest.$ac_ext
6264cat >>conftest.$ac_ext <<_ACEOF
6265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006266$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006267int
6268main ()
6269{
6270static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
6271test_array [0] = 0
6272
6273 ;
6274 return 0;
6275}
6276_ACEOF
6277rm -f conftest.$ac_objext
6278if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006279 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006281 grep -v '^ *+' conftest.er1 >conftest.err
6282 rm -f conftest.er1
6283 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6285 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006286 { ac_try='test -z "$ac_c_werror_flag"
6287 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6289 (eval $ac_try) 2>&5
6290 ac_status=$?
6291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6292 (exit $ac_status); }; } &&
6293 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6295 (eval $ac_try) 2>&5
6296 ac_status=$?
6297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6298 (exit $ac_status); }; }; then
6299 ac_hi=$ac_mid
6300else
6301 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006302sed 's/^/| /' conftest.$ac_ext >&5
6303
Martin v. Löwis11437992002-04-12 09:54:03 +00006304ac_lo=`expr '(' $ac_mid ')' + 1`
6305fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006306rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006307done
6308case $ac_lo in
6309?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006310'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6311See \`config.log' for more details." >&5
6312echo "$as_me: error: cannot compute sizeof (int), 77
6313See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006314 { (exit 1); exit 1; }; } ;;
6315esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006316else
6317 if test "$cross_compiling" = yes; then
Trent Mickc5625ba2004-08-25 23:59:39 +00006318 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6319See \`config.log' for more details." >&5
6320echo "$as_me: error: cannot run test program while cross compiling
6321See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006322 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006323else
Martin v. Löwis11437992002-04-12 09:54:03 +00006324 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006325/* confdefs.h. */
6326_ACEOF
6327cat confdefs.h >>conftest.$ac_ext
6328cat >>conftest.$ac_ext <<_ACEOF
6329/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006330$ac_includes_default
6331long longval () { return (long) (sizeof (int)); }
6332unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006333#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006334#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006335int
6336main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006337{
Martin v. Löwis11437992002-04-12 09:54:03 +00006338
6339 FILE *f = fopen ("conftest.val", "w");
6340 if (! f)
6341 exit (1);
6342 if (((long) (sizeof (int))) < 0)
6343 {
6344 long i = longval ();
6345 if (i != ((long) (sizeof (int))))
6346 exit (1);
6347 fprintf (f, "%ld\n", i);
6348 }
6349 else
6350 {
6351 unsigned long i = ulongval ();
6352 if (i != ((long) (sizeof (int))))
6353 exit (1);
6354 fprintf (f, "%lu\n", i);
6355 }
6356 exit (ferror (f) || fclose (f) != 0);
6357
6358 ;
6359 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006360}
Martin v. Löwis11437992002-04-12 09:54:03 +00006361_ACEOF
6362rm -f conftest$ac_exeext
6363if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6364 (eval $ac_link) 2>&5
6365 ac_status=$?
6366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6367 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6368 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6369 (eval $ac_try) 2>&5
6370 ac_status=$?
6371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6372 (exit $ac_status); }; }; then
6373 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006374else
Martin v. Löwis11437992002-04-12 09:54:03 +00006375 echo "$as_me: program exited with status $ac_status" >&5
6376echo "$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 +00006379( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006380{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6381See \`config.log' for more details." >&5
6382echo "$as_me: error: cannot compute sizeof (int), 77
6383See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006384 { (exit 1); exit 1; }; }
6385fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006386rm -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 +00006387fi
6388fi
6389rm -f conftest.val
6390else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006391 ac_cv_sizeof_int=0
6392fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006393fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006394echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6395echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6396cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006397#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006398_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006399
6400
Martin v. Löwis11437992002-04-12 09:54:03 +00006401echo "$as_me:$LINENO: checking for long" >&5
6402echo $ECHO_N "checking for long... $ECHO_C" >&6
6403if test "${ac_cv_type_long+set}" = set; then
6404 echo $ECHO_N "(cached) $ECHO_C" >&6
6405else
6406 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006407/* confdefs.h. */
6408_ACEOF
6409cat confdefs.h >>conftest.$ac_ext
6410cat >>conftest.$ac_ext <<_ACEOF
6411/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006412$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006413int
6414main ()
6415{
6416if ((long *) 0)
6417 return 0;
6418if (sizeof (long))
6419 return 0;
6420 ;
6421 return 0;
6422}
6423_ACEOF
6424rm -f conftest.$ac_objext
6425if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006426 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006427 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006428 grep -v '^ *+' conftest.er1 >conftest.err
6429 rm -f conftest.er1
6430 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6432 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006433 { ac_try='test -z "$ac_c_werror_flag"
6434 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6436 (eval $ac_try) 2>&5
6437 ac_status=$?
6438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6439 (exit $ac_status); }; } &&
6440 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6442 (eval $ac_try) 2>&5
6443 ac_status=$?
6444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6445 (exit $ac_status); }; }; then
6446 ac_cv_type_long=yes
6447else
6448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006449sed 's/^/| /' conftest.$ac_ext >&5
6450
Martin v. Löwis11437992002-04-12 09:54:03 +00006451ac_cv_type_long=no
6452fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006453rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006454fi
6455echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6456echo "${ECHO_T}$ac_cv_type_long" >&6
6457
6458echo "$as_me:$LINENO: checking size of long" >&5
6459echo $ECHO_N "checking size of long... $ECHO_C" >&6
6460if test "${ac_cv_sizeof_long+set}" = set; then
6461 echo $ECHO_N "(cached) $ECHO_C" >&6
6462else
6463 if test "$ac_cv_type_long" = yes; then
6464 # The cast to unsigned long works around a bug in the HP C Compiler
6465 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6466 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6467 # This bug is HP SR number 8606223364.
6468 if test "$cross_compiling" = yes; then
6469 # Depending upon the size, compute the lo and hi bounds.
6470cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006471/* confdefs.h. */
6472_ACEOF
6473cat confdefs.h >>conftest.$ac_ext
6474cat >>conftest.$ac_ext <<_ACEOF
6475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006476$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006477int
6478main ()
6479{
6480static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6481test_array [0] = 0
6482
6483 ;
6484 return 0;
6485}
6486_ACEOF
6487rm -f conftest.$ac_objext
6488if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006489 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006491 grep -v '^ *+' conftest.er1 >conftest.err
6492 rm -f conftest.er1
6493 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6495 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006496 { ac_try='test -z "$ac_c_werror_flag"
6497 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006498 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6499 (eval $ac_try) 2>&5
6500 ac_status=$?
6501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6502 (exit $ac_status); }; } &&
6503 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006504 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6505 (eval $ac_try) 2>&5
6506 ac_status=$?
6507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6508 (exit $ac_status); }; }; then
6509 ac_lo=0 ac_mid=0
6510 while :; do
6511 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006512/* confdefs.h. */
6513_ACEOF
6514cat confdefs.h >>conftest.$ac_ext
6515cat >>conftest.$ac_ext <<_ACEOF
6516/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006517$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006518int
6519main ()
6520{
6521static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6522test_array [0] = 0
6523
6524 ;
6525 return 0;
6526}
6527_ACEOF
6528rm -f conftest.$ac_objext
6529if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006530 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006532 grep -v '^ *+' conftest.er1 >conftest.err
6533 rm -f conftest.er1
6534 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6536 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006537 { ac_try='test -z "$ac_c_werror_flag"
6538 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006539 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6540 (eval $ac_try) 2>&5
6541 ac_status=$?
6542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6543 (exit $ac_status); }; } &&
6544 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006545 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6546 (eval $ac_try) 2>&5
6547 ac_status=$?
6548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6549 (exit $ac_status); }; }; then
6550 ac_hi=$ac_mid; break
6551else
6552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006553sed 's/^/| /' conftest.$ac_ext >&5
6554
Martin v. Löwis11437992002-04-12 09:54:03 +00006555ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006556 if test $ac_lo -le $ac_mid; then
6557 ac_lo= ac_hi=
6558 break
6559 fi
6560 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006561fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006562rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006563 done
6564else
6565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006566sed 's/^/| /' conftest.$ac_ext >&5
6567
Martin v. Löwis11437992002-04-12 09:54:03 +00006568cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006569/* confdefs.h. */
6570_ACEOF
6571cat confdefs.h >>conftest.$ac_ext
6572cat >>conftest.$ac_ext <<_ACEOF
6573/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006574$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006575int
6576main ()
6577{
6578static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6579test_array [0] = 0
6580
6581 ;
6582 return 0;
6583}
6584_ACEOF
6585rm -f conftest.$ac_objext
6586if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006587 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006589 grep -v '^ *+' conftest.er1 >conftest.err
6590 rm -f conftest.er1
6591 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6593 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006594 { ac_try='test -z "$ac_c_werror_flag"
6595 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006596 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6597 (eval $ac_try) 2>&5
6598 ac_status=$?
6599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6600 (exit $ac_status); }; } &&
6601 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6603 (eval $ac_try) 2>&5
6604 ac_status=$?
6605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6606 (exit $ac_status); }; }; then
6607 ac_hi=-1 ac_mid=-1
6608 while :; do
6609 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006610/* confdefs.h. */
6611_ACEOF
6612cat confdefs.h >>conftest.$ac_ext
6613cat >>conftest.$ac_ext <<_ACEOF
6614/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006615$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006616int
6617main ()
6618{
6619static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6620test_array [0] = 0
6621
6622 ;
6623 return 0;
6624}
6625_ACEOF
6626rm -f conftest.$ac_objext
6627if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006628 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006630 grep -v '^ *+' conftest.er1 >conftest.err
6631 rm -f conftest.er1
6632 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6634 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006635 { ac_try='test -z "$ac_c_werror_flag"
6636 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6638 (eval $ac_try) 2>&5
6639 ac_status=$?
6640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6641 (exit $ac_status); }; } &&
6642 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006643 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6644 (eval $ac_try) 2>&5
6645 ac_status=$?
6646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6647 (exit $ac_status); }; }; then
6648 ac_lo=$ac_mid; break
6649else
6650 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006651sed 's/^/| /' conftest.$ac_ext >&5
6652
Martin v. Löwis11437992002-04-12 09:54:03 +00006653ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006654 if test $ac_mid -le $ac_hi; then
6655 ac_lo= ac_hi=
6656 break
6657 fi
6658 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006659fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006660rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006661 done
6662else
6663 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006664sed 's/^/| /' conftest.$ac_ext >&5
6665
Martin v. Löwis11437992002-04-12 09:54:03 +00006666ac_lo= ac_hi=
6667fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006668rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006669fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006670rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006671# Binary search between lo and hi bounds.
6672while test "x$ac_lo" != "x$ac_hi"; do
6673 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6674 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006675/* confdefs.h. */
6676_ACEOF
6677cat confdefs.h >>conftest.$ac_ext
6678cat >>conftest.$ac_ext <<_ACEOF
6679/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006680$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006681int
6682main ()
6683{
6684static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6685test_array [0] = 0
6686
6687 ;
6688 return 0;
6689}
6690_ACEOF
6691rm -f conftest.$ac_objext
6692if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006693 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006694 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006695 grep -v '^ *+' conftest.er1 >conftest.err
6696 rm -f conftest.er1
6697 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006698 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6699 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006700 { ac_try='test -z "$ac_c_werror_flag"
6701 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006702 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6703 (eval $ac_try) 2>&5
6704 ac_status=$?
6705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6706 (exit $ac_status); }; } &&
6707 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6709 (eval $ac_try) 2>&5
6710 ac_status=$?
6711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6712 (exit $ac_status); }; }; then
6713 ac_hi=$ac_mid
6714else
6715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006716sed 's/^/| /' conftest.$ac_ext >&5
6717
Martin v. Löwis11437992002-04-12 09:54:03 +00006718ac_lo=`expr '(' $ac_mid ')' + 1`
6719fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006720rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006721done
6722case $ac_lo in
6723?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006724'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6725See \`config.log' for more details." >&5
6726echo "$as_me: error: cannot compute sizeof (long), 77
6727See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006728 { (exit 1); exit 1; }; } ;;
6729esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006730else
6731 if test "$cross_compiling" = yes; then
Trent Mickc5625ba2004-08-25 23:59:39 +00006732 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6733See \`config.log' for more details." >&5
6734echo "$as_me: error: cannot run test program while cross compiling
6735See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006736 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006737else
Martin v. Löwis11437992002-04-12 09:54:03 +00006738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006739/* confdefs.h. */
6740_ACEOF
6741cat confdefs.h >>conftest.$ac_ext
6742cat >>conftest.$ac_ext <<_ACEOF
6743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006744$ac_includes_default
6745long longval () { return (long) (sizeof (long)); }
6746unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006747#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006748#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006749int
6750main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006751{
Martin v. Löwis11437992002-04-12 09:54:03 +00006752
6753 FILE *f = fopen ("conftest.val", "w");
6754 if (! f)
6755 exit (1);
6756 if (((long) (sizeof (long))) < 0)
6757 {
6758 long i = longval ();
6759 if (i != ((long) (sizeof (long))))
6760 exit (1);
6761 fprintf (f, "%ld\n", i);
6762 }
6763 else
6764 {
6765 unsigned long i = ulongval ();
6766 if (i != ((long) (sizeof (long))))
6767 exit (1);
6768 fprintf (f, "%lu\n", i);
6769 }
6770 exit (ferror (f) || fclose (f) != 0);
6771
6772 ;
6773 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006774}
Martin v. Löwis11437992002-04-12 09:54:03 +00006775_ACEOF
6776rm -f conftest$ac_exeext
6777if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6778 (eval $ac_link) 2>&5
6779 ac_status=$?
6780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6781 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6783 (eval $ac_try) 2>&5
6784 ac_status=$?
6785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6786 (exit $ac_status); }; }; then
6787 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006788else
Martin v. Löwis11437992002-04-12 09:54:03 +00006789 echo "$as_me: program exited with status $ac_status" >&5
6790echo "$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 +00006793( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006794{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6795See \`config.log' for more details." >&5
6796echo "$as_me: error: cannot compute sizeof (long), 77
6797See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006798 { (exit 1); exit 1; }; }
6799fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006800rm -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 +00006801fi
6802fi
6803rm -f conftest.val
6804else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006805 ac_cv_sizeof_long=0
6806fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006807fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006808echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6809echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6810cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006811#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006812_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006813
6814
Martin v. Löwis11437992002-04-12 09:54:03 +00006815echo "$as_me:$LINENO: checking for void *" >&5
6816echo $ECHO_N "checking for void *... $ECHO_C" >&6
6817if test "${ac_cv_type_void_p+set}" = set; then
6818 echo $ECHO_N "(cached) $ECHO_C" >&6
6819else
6820 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006821/* confdefs.h. */
6822_ACEOF
6823cat confdefs.h >>conftest.$ac_ext
6824cat >>conftest.$ac_ext <<_ACEOF
6825/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006826$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006827int
6828main ()
6829{
6830if ((void * *) 0)
6831 return 0;
6832if (sizeof (void *))
6833 return 0;
6834 ;
6835 return 0;
6836}
6837_ACEOF
6838rm -f conftest.$ac_objext
6839if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006840 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006841 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006842 grep -v '^ *+' conftest.er1 >conftest.err
6843 rm -f conftest.er1
6844 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6846 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006847 { ac_try='test -z "$ac_c_werror_flag"
6848 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006849 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6850 (eval $ac_try) 2>&5
6851 ac_status=$?
6852 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6853 (exit $ac_status); }; } &&
6854 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6856 (eval $ac_try) 2>&5
6857 ac_status=$?
6858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6859 (exit $ac_status); }; }; then
6860 ac_cv_type_void_p=yes
6861else
6862 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006863sed 's/^/| /' conftest.$ac_ext >&5
6864
Martin v. Löwis11437992002-04-12 09:54:03 +00006865ac_cv_type_void_p=no
6866fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006867rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006868fi
6869echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6870echo "${ECHO_T}$ac_cv_type_void_p" >&6
6871
6872echo "$as_me:$LINENO: checking size of void *" >&5
6873echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6874if test "${ac_cv_sizeof_void_p+set}" = set; then
6875 echo $ECHO_N "(cached) $ECHO_C" >&6
6876else
6877 if test "$ac_cv_type_void_p" = yes; then
6878 # The cast to unsigned long works around a bug in the HP C Compiler
6879 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6880 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6881 # This bug is HP SR number 8606223364.
6882 if test "$cross_compiling" = yes; then
6883 # Depending upon the size, compute the lo and hi bounds.
6884cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006885/* confdefs.h. */
6886_ACEOF
6887cat confdefs.h >>conftest.$ac_ext
6888cat >>conftest.$ac_ext <<_ACEOF
6889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006890$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006891int
6892main ()
6893{
6894static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6895test_array [0] = 0
6896
6897 ;
6898 return 0;
6899}
6900_ACEOF
6901rm -f conftest.$ac_objext
6902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006903 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006905 grep -v '^ *+' conftest.er1 >conftest.err
6906 rm -f conftest.er1
6907 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006908 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6909 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006910 { ac_try='test -z "$ac_c_werror_flag"
6911 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006912 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6913 (eval $ac_try) 2>&5
6914 ac_status=$?
6915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6916 (exit $ac_status); }; } &&
6917 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006918 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6919 (eval $ac_try) 2>&5
6920 ac_status=$?
6921 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6922 (exit $ac_status); }; }; then
6923 ac_lo=0 ac_mid=0
6924 while :; do
6925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006926/* confdefs.h. */
6927_ACEOF
6928cat confdefs.h >>conftest.$ac_ext
6929cat >>conftest.$ac_ext <<_ACEOF
6930/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006931$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006932int
6933main ()
6934{
6935static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6936test_array [0] = 0
6937
6938 ;
6939 return 0;
6940}
6941_ACEOF
6942rm -f conftest.$ac_objext
6943if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00006944 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006945 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006946 grep -v '^ *+' conftest.er1 >conftest.err
6947 rm -f conftest.er1
6948 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6950 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00006951 { ac_try='test -z "$ac_c_werror_flag"
6952 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00006953 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6954 (eval $ac_try) 2>&5
6955 ac_status=$?
6956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6957 (exit $ac_status); }; } &&
6958 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006959 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6960 (eval $ac_try) 2>&5
6961 ac_status=$?
6962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6963 (exit $ac_status); }; }; then
6964 ac_hi=$ac_mid; break
6965else
6966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006967sed 's/^/| /' conftest.$ac_ext >&5
6968
Martin v. Löwis11437992002-04-12 09:54:03 +00006969ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00006970 if test $ac_lo -le $ac_mid; then
6971 ac_lo= ac_hi=
6972 break
6973 fi
6974 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006975fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00006976rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006977 done
6978else
6979 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006980sed 's/^/| /' conftest.$ac_ext >&5
6981
Martin v. Löwis11437992002-04-12 09:54:03 +00006982cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006983/* confdefs.h. */
6984_ACEOF
6985cat confdefs.h >>conftest.$ac_ext
6986cat >>conftest.$ac_ext <<_ACEOF
6987/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006988$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006989int
6990main ()
6991{
6992static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6993test_array [0] = 0
6994
6995 ;
6996 return 0;
6997}
6998_ACEOF
6999rm -f conftest.$ac_objext
7000if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007001 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007002 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007003 grep -v '^ *+' conftest.er1 >conftest.err
7004 rm -f conftest.er1
7005 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007006 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7007 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007008 { ac_try='test -z "$ac_c_werror_flag"
7009 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7011 (eval $ac_try) 2>&5
7012 ac_status=$?
7013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7014 (exit $ac_status); }; } &&
7015 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007016 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7017 (eval $ac_try) 2>&5
7018 ac_status=$?
7019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7020 (exit $ac_status); }; }; then
7021 ac_hi=-1 ac_mid=-1
7022 while :; do
7023 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007024/* confdefs.h. */
7025_ACEOF
7026cat confdefs.h >>conftest.$ac_ext
7027cat >>conftest.$ac_ext <<_ACEOF
7028/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007029$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007030int
7031main ()
7032{
7033static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
7034test_array [0] = 0
7035
7036 ;
7037 return 0;
7038}
7039_ACEOF
7040rm -f conftest.$ac_objext
7041if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007042 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007044 grep -v '^ *+' conftest.er1 >conftest.err
7045 rm -f conftest.er1
7046 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7048 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007049 { ac_try='test -z "$ac_c_werror_flag"
7050 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007051 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7052 (eval $ac_try) 2>&5
7053 ac_status=$?
7054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7055 (exit $ac_status); }; } &&
7056 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007057 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7058 (eval $ac_try) 2>&5
7059 ac_status=$?
7060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7061 (exit $ac_status); }; }; then
7062 ac_lo=$ac_mid; break
7063else
7064 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007065sed 's/^/| /' conftest.$ac_ext >&5
7066
Martin v. Löwis11437992002-04-12 09:54:03 +00007067ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007068 if test $ac_mid -le $ac_hi; then
7069 ac_lo= ac_hi=
7070 break
7071 fi
7072 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007073fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007074rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007075 done
7076else
7077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007078sed 's/^/| /' conftest.$ac_ext >&5
7079
Martin v. Löwis11437992002-04-12 09:54:03 +00007080ac_lo= ac_hi=
7081fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007082rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007083fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007084rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007085# Binary search between lo and hi bounds.
7086while test "x$ac_lo" != "x$ac_hi"; do
7087 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007089/* confdefs.h. */
7090_ACEOF
7091cat confdefs.h >>conftest.$ac_ext
7092cat >>conftest.$ac_ext <<_ACEOF
7093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007094$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007095int
7096main ()
7097{
7098static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
7099test_array [0] = 0
7100
7101 ;
7102 return 0;
7103}
7104_ACEOF
7105rm -f conftest.$ac_objext
7106if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007107 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007109 grep -v '^ *+' conftest.er1 >conftest.err
7110 rm -f conftest.er1
7111 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7113 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007114 { ac_try='test -z "$ac_c_werror_flag"
7115 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007116 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7117 (eval $ac_try) 2>&5
7118 ac_status=$?
7119 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7120 (exit $ac_status); }; } &&
7121 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007122 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7123 (eval $ac_try) 2>&5
7124 ac_status=$?
7125 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7126 (exit $ac_status); }; }; then
7127 ac_hi=$ac_mid
7128else
7129 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007130sed 's/^/| /' conftest.$ac_ext >&5
7131
Martin v. Löwis11437992002-04-12 09:54:03 +00007132ac_lo=`expr '(' $ac_mid ')' + 1`
7133fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007134rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007135done
7136case $ac_lo in
7137?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007138'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7139See \`config.log' for more details." >&5
7140echo "$as_me: error: cannot compute sizeof (void *), 77
7141See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007142 { (exit 1); exit 1; }; } ;;
7143esac
Guido van Rossumad678af1998-10-02 14:42:15 +00007144else
7145 if test "$cross_compiling" = yes; then
Trent Mickc5625ba2004-08-25 23:59:39 +00007146 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7147See \`config.log' for more details." >&5
7148echo "$as_me: error: cannot run test program while cross compiling
7149See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007150 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00007151else
Martin v. Löwis11437992002-04-12 09:54:03 +00007152 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007153/* confdefs.h. */
7154_ACEOF
7155cat confdefs.h >>conftest.$ac_ext
7156cat >>conftest.$ac_ext <<_ACEOF
7157/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007158$ac_includes_default
7159long longval () { return (long) (sizeof (void *)); }
7160unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007161#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007162#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007163int
7164main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00007165{
Martin v. Löwis11437992002-04-12 09:54:03 +00007166
7167 FILE *f = fopen ("conftest.val", "w");
7168 if (! f)
7169 exit (1);
7170 if (((long) (sizeof (void *))) < 0)
7171 {
7172 long i = longval ();
7173 if (i != ((long) (sizeof (void *))))
7174 exit (1);
7175 fprintf (f, "%ld\n", i);
7176 }
7177 else
7178 {
7179 unsigned long i = ulongval ();
7180 if (i != ((long) (sizeof (void *))))
7181 exit (1);
7182 fprintf (f, "%lu\n", i);
7183 }
7184 exit (ferror (f) || fclose (f) != 0);
7185
7186 ;
7187 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00007188}
Martin v. Löwis11437992002-04-12 09:54:03 +00007189_ACEOF
7190rm -f conftest$ac_exeext
7191if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7192 (eval $ac_link) 2>&5
7193 ac_status=$?
7194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7195 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7196 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7197 (eval $ac_try) 2>&5
7198 ac_status=$?
7199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7200 (exit $ac_status); }; }; then
7201 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00007202else
Martin v. Löwis11437992002-04-12 09:54:03 +00007203 echo "$as_me: program exited with status $ac_status" >&5
7204echo "$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 +00007207( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007208{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
7209See \`config.log' for more details." >&5
7210echo "$as_me: error: cannot compute sizeof (void *), 77
7211See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007212 { (exit 1); exit 1; }; }
7213fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007214rm -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 +00007215fi
7216fi
7217rm -f conftest.val
7218else
Guido van Rossumad678af1998-10-02 14:42:15 +00007219 ac_cv_sizeof_void_p=0
7220fi
Guido van Rossumad678af1998-10-02 14:42:15 +00007221fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007222echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
7223echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
7224cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007225#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00007226_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00007227
7228
Martin v. Löwis11437992002-04-12 09:54:03 +00007229echo "$as_me:$LINENO: checking for short" >&5
7230echo $ECHO_N "checking for short... $ECHO_C" >&6
7231if test "${ac_cv_type_short+set}" = set; then
7232 echo $ECHO_N "(cached) $ECHO_C" >&6
7233else
7234 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007235/* confdefs.h. */
7236_ACEOF
7237cat confdefs.h >>conftest.$ac_ext
7238cat >>conftest.$ac_ext <<_ACEOF
7239/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007240$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007241int
7242main ()
7243{
7244if ((short *) 0)
7245 return 0;
7246if (sizeof (short))
7247 return 0;
7248 ;
7249 return 0;
7250}
7251_ACEOF
7252rm -f conftest.$ac_objext
7253if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007254 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007255 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007256 grep -v '^ *+' conftest.er1 >conftest.err
7257 rm -f conftest.er1
7258 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7260 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007261 { ac_try='test -z "$ac_c_werror_flag"
7262 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7264 (eval $ac_try) 2>&5
7265 ac_status=$?
7266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7267 (exit $ac_status); }; } &&
7268 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007269 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7270 (eval $ac_try) 2>&5
7271 ac_status=$?
7272 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7273 (exit $ac_status); }; }; then
7274 ac_cv_type_short=yes
7275else
7276 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007277sed 's/^/| /' conftest.$ac_ext >&5
7278
Martin v. Löwis11437992002-04-12 09:54:03 +00007279ac_cv_type_short=no
7280fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007281rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007282fi
7283echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
7284echo "${ECHO_T}$ac_cv_type_short" >&6
7285
7286echo "$as_me:$LINENO: checking size of short" >&5
7287echo $ECHO_N "checking size of short... $ECHO_C" >&6
7288if test "${ac_cv_sizeof_short+set}" = set; then
7289 echo $ECHO_N "(cached) $ECHO_C" >&6
7290else
7291 if test "$ac_cv_type_short" = yes; then
7292 # The cast to unsigned long works around a bug in the HP C Compiler
7293 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7294 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7295 # This bug is HP SR number 8606223364.
7296 if test "$cross_compiling" = yes; then
7297 # Depending upon the size, compute the lo and hi bounds.
7298cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007299/* confdefs.h. */
7300_ACEOF
7301cat confdefs.h >>conftest.$ac_ext
7302cat >>conftest.$ac_ext <<_ACEOF
7303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007304$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007305int
7306main ()
7307{
7308static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
7309test_array [0] = 0
7310
7311 ;
7312 return 0;
7313}
7314_ACEOF
7315rm -f conftest.$ac_objext
7316if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007317 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007319 grep -v '^ *+' conftest.er1 >conftest.err
7320 rm -f conftest.er1
7321 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7323 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007324 { ac_try='test -z "$ac_c_werror_flag"
7325 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7327 (eval $ac_try) 2>&5
7328 ac_status=$?
7329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7330 (exit $ac_status); }; } &&
7331 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7333 (eval $ac_try) 2>&5
7334 ac_status=$?
7335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7336 (exit $ac_status); }; }; then
7337 ac_lo=0 ac_mid=0
7338 while :; do
7339 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007340/* confdefs.h. */
7341_ACEOF
7342cat confdefs.h >>conftest.$ac_ext
7343cat >>conftest.$ac_ext <<_ACEOF
7344/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007345$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007346int
7347main ()
7348{
7349static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7350test_array [0] = 0
7351
7352 ;
7353 return 0;
7354}
7355_ACEOF
7356rm -f conftest.$ac_objext
7357if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007358 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007359 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007360 grep -v '^ *+' conftest.er1 >conftest.err
7361 rm -f conftest.er1
7362 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7364 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007365 { ac_try='test -z "$ac_c_werror_flag"
7366 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7368 (eval $ac_try) 2>&5
7369 ac_status=$?
7370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7371 (exit $ac_status); }; } &&
7372 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7374 (eval $ac_try) 2>&5
7375 ac_status=$?
7376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7377 (exit $ac_status); }; }; then
7378 ac_hi=$ac_mid; break
7379else
7380 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007381sed 's/^/| /' conftest.$ac_ext >&5
7382
Martin v. Löwis11437992002-04-12 09:54:03 +00007383ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007384 if test $ac_lo -le $ac_mid; then
7385 ac_lo= ac_hi=
7386 break
7387 fi
7388 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007389fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007390rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007391 done
7392else
7393 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007394sed 's/^/| /' conftest.$ac_ext >&5
7395
Martin v. Löwis11437992002-04-12 09:54:03 +00007396cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007397/* confdefs.h. */
7398_ACEOF
7399cat confdefs.h >>conftest.$ac_ext
7400cat >>conftest.$ac_ext <<_ACEOF
7401/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007402$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007403int
7404main ()
7405{
7406static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
7407test_array [0] = 0
7408
7409 ;
7410 return 0;
7411}
7412_ACEOF
7413rm -f conftest.$ac_objext
7414if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007415 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007417 grep -v '^ *+' conftest.er1 >conftest.err
7418 rm -f conftest.er1
7419 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007420 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7421 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007422 { ac_try='test -z "$ac_c_werror_flag"
7423 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7425 (eval $ac_try) 2>&5
7426 ac_status=$?
7427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7428 (exit $ac_status); }; } &&
7429 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7431 (eval $ac_try) 2>&5
7432 ac_status=$?
7433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7434 (exit $ac_status); }; }; then
7435 ac_hi=-1 ac_mid=-1
7436 while :; do
7437 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007438/* confdefs.h. */
7439_ACEOF
7440cat confdefs.h >>conftest.$ac_ext
7441cat >>conftest.$ac_ext <<_ACEOF
7442/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007443$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007444int
7445main ()
7446{
7447static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
7448test_array [0] = 0
7449
7450 ;
7451 return 0;
7452}
7453_ACEOF
7454rm -f conftest.$ac_objext
7455if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007456 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007457 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007458 grep -v '^ *+' conftest.er1 >conftest.err
7459 rm -f conftest.er1
7460 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007461 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7462 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007463 { ac_try='test -z "$ac_c_werror_flag"
7464 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7466 (eval $ac_try) 2>&5
7467 ac_status=$?
7468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7469 (exit $ac_status); }; } &&
7470 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007471 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7472 (eval $ac_try) 2>&5
7473 ac_status=$?
7474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7475 (exit $ac_status); }; }; then
7476 ac_lo=$ac_mid; break
7477else
7478 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007479sed 's/^/| /' conftest.$ac_ext >&5
7480
Martin v. Löwis11437992002-04-12 09:54:03 +00007481ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007482 if test $ac_mid -le $ac_hi; then
7483 ac_lo= ac_hi=
7484 break
7485 fi
7486 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007487fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007488rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007489 done
7490else
7491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007492sed 's/^/| /' conftest.$ac_ext >&5
7493
Martin v. Löwis11437992002-04-12 09:54:03 +00007494ac_lo= ac_hi=
7495fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007496rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007497fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007498rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007499# Binary search between lo and hi bounds.
7500while test "x$ac_lo" != "x$ac_hi"; do
7501 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7502 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007503/* confdefs.h. */
7504_ACEOF
7505cat confdefs.h >>conftest.$ac_ext
7506cat >>conftest.$ac_ext <<_ACEOF
7507/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007508$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007509int
7510main ()
7511{
7512static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7513test_array [0] = 0
7514
7515 ;
7516 return 0;
7517}
7518_ACEOF
7519rm -f conftest.$ac_objext
7520if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007521 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007522 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007523 grep -v '^ *+' conftest.er1 >conftest.err
7524 rm -f conftest.er1
7525 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7527 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007528 { ac_try='test -z "$ac_c_werror_flag"
7529 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007530 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7531 (eval $ac_try) 2>&5
7532 ac_status=$?
7533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7534 (exit $ac_status); }; } &&
7535 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007536 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7537 (eval $ac_try) 2>&5
7538 ac_status=$?
7539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7540 (exit $ac_status); }; }; then
7541 ac_hi=$ac_mid
7542else
7543 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007544sed 's/^/| /' conftest.$ac_ext >&5
7545
Martin v. Löwis11437992002-04-12 09:54:03 +00007546ac_lo=`expr '(' $ac_mid ')' + 1`
7547fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007548rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007549done
7550case $ac_lo in
7551?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007552'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7553See \`config.log' for more details." >&5
7554echo "$as_me: error: cannot compute sizeof (short), 77
7555See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007556 { (exit 1); exit 1; }; } ;;
7557esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007558else
7559 if test "$cross_compiling" = yes; then
Trent Mickc5625ba2004-08-25 23:59:39 +00007560 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7561See \`config.log' for more details." >&5
7562echo "$as_me: error: cannot run test program while cross compiling
7563See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007564 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007565else
Martin v. Löwis11437992002-04-12 09:54:03 +00007566 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007567/* confdefs.h. */
7568_ACEOF
7569cat confdefs.h >>conftest.$ac_ext
7570cat >>conftest.$ac_ext <<_ACEOF
7571/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007572$ac_includes_default
7573long longval () { return (long) (sizeof (short)); }
7574unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007575#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007576#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007577int
7578main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007579{
Martin v. Löwis11437992002-04-12 09:54:03 +00007580
7581 FILE *f = fopen ("conftest.val", "w");
7582 if (! f)
7583 exit (1);
7584 if (((long) (sizeof (short))) < 0)
7585 {
7586 long i = longval ();
7587 if (i != ((long) (sizeof (short))))
7588 exit (1);
7589 fprintf (f, "%ld\n", i);
7590 }
7591 else
7592 {
7593 unsigned long i = ulongval ();
7594 if (i != ((long) (sizeof (short))))
7595 exit (1);
7596 fprintf (f, "%lu\n", i);
7597 }
7598 exit (ferror (f) || fclose (f) != 0);
7599
7600 ;
7601 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007602}
Martin v. Löwis11437992002-04-12 09:54:03 +00007603_ACEOF
7604rm -f conftest$ac_exeext
7605if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7606 (eval $ac_link) 2>&5
7607 ac_status=$?
7608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7609 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7611 (eval $ac_try) 2>&5
7612 ac_status=$?
7613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7614 (exit $ac_status); }; }; then
7615 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007616else
Martin v. Löwis11437992002-04-12 09:54:03 +00007617 echo "$as_me: program exited with status $ac_status" >&5
7618echo "$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 +00007621( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007622{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7623See \`config.log' for more details." >&5
7624echo "$as_me: error: cannot compute sizeof (short), 77
7625See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007626 { (exit 1); exit 1; }; }
7627fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007628rm -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 +00007629fi
7630fi
7631rm -f conftest.val
7632else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007633 ac_cv_sizeof_short=0
7634fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007635fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007636echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7637echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7638cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007639#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007640_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007641
7642
Martin v. Löwis11437992002-04-12 09:54:03 +00007643echo "$as_me:$LINENO: checking for float" >&5
7644echo $ECHO_N "checking for float... $ECHO_C" >&6
7645if test "${ac_cv_type_float+set}" = set; then
7646 echo $ECHO_N "(cached) $ECHO_C" >&6
7647else
7648 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007649/* confdefs.h. */
7650_ACEOF
7651cat confdefs.h >>conftest.$ac_ext
7652cat >>conftest.$ac_ext <<_ACEOF
7653/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007654$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007655int
7656main ()
7657{
7658if ((float *) 0)
7659 return 0;
7660if (sizeof (float))
7661 return 0;
7662 ;
7663 return 0;
7664}
7665_ACEOF
7666rm -f conftest.$ac_objext
7667if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007668 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007669 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007670 grep -v '^ *+' conftest.er1 >conftest.err
7671 rm -f conftest.er1
7672 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7674 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007675 { ac_try='test -z "$ac_c_werror_flag"
7676 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7678 (eval $ac_try) 2>&5
7679 ac_status=$?
7680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7681 (exit $ac_status); }; } &&
7682 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7684 (eval $ac_try) 2>&5
7685 ac_status=$?
7686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7687 (exit $ac_status); }; }; then
7688 ac_cv_type_float=yes
7689else
7690 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007691sed 's/^/| /' conftest.$ac_ext >&5
7692
Martin v. Löwis11437992002-04-12 09:54:03 +00007693ac_cv_type_float=no
7694fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007695rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007696fi
7697echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7698echo "${ECHO_T}$ac_cv_type_float" >&6
7699
7700echo "$as_me:$LINENO: checking size of float" >&5
7701echo $ECHO_N "checking size of float... $ECHO_C" >&6
7702if test "${ac_cv_sizeof_float+set}" = set; then
7703 echo $ECHO_N "(cached) $ECHO_C" >&6
7704else
7705 if test "$ac_cv_type_float" = yes; then
7706 # The cast to unsigned long works around a bug in the HP C Compiler
7707 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7708 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7709 # This bug is HP SR number 8606223364.
7710 if test "$cross_compiling" = yes; then
7711 # Depending upon the size, compute the lo and hi bounds.
7712cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007713/* confdefs.h. */
7714_ACEOF
7715cat confdefs.h >>conftest.$ac_ext
7716cat >>conftest.$ac_ext <<_ACEOF
7717/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007718$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007719int
7720main ()
7721{
7722static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7723test_array [0] = 0
7724
7725 ;
7726 return 0;
7727}
7728_ACEOF
7729rm -f conftest.$ac_objext
7730if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007731 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007733 grep -v '^ *+' conftest.er1 >conftest.err
7734 rm -f conftest.er1
7735 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7737 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007738 { ac_try='test -z "$ac_c_werror_flag"
7739 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007740 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7741 (eval $ac_try) 2>&5
7742 ac_status=$?
7743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7744 (exit $ac_status); }; } &&
7745 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007746 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7747 (eval $ac_try) 2>&5
7748 ac_status=$?
7749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7750 (exit $ac_status); }; }; then
7751 ac_lo=0 ac_mid=0
7752 while :; do
7753 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007754/* confdefs.h. */
7755_ACEOF
7756cat confdefs.h >>conftest.$ac_ext
7757cat >>conftest.$ac_ext <<_ACEOF
7758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007759$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007760int
7761main ()
7762{
7763static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7764test_array [0] = 0
7765
7766 ;
7767 return 0;
7768}
7769_ACEOF
7770rm -f conftest.$ac_objext
7771if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007772 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007774 grep -v '^ *+' conftest.er1 >conftest.err
7775 rm -f conftest.er1
7776 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7778 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007779 { ac_try='test -z "$ac_c_werror_flag"
7780 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7782 (eval $ac_try) 2>&5
7783 ac_status=$?
7784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7785 (exit $ac_status); }; } &&
7786 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007787 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7788 (eval $ac_try) 2>&5
7789 ac_status=$?
7790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7791 (exit $ac_status); }; }; then
7792 ac_hi=$ac_mid; break
7793else
7794 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007795sed 's/^/| /' conftest.$ac_ext >&5
7796
Martin v. Löwis11437992002-04-12 09:54:03 +00007797ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007798 if test $ac_lo -le $ac_mid; then
7799 ac_lo= ac_hi=
7800 break
7801 fi
7802 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007803fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007804rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007805 done
7806else
7807 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007808sed 's/^/| /' conftest.$ac_ext >&5
7809
Martin v. Löwis11437992002-04-12 09:54:03 +00007810cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007811/* confdefs.h. */
7812_ACEOF
7813cat confdefs.h >>conftest.$ac_ext
7814cat >>conftest.$ac_ext <<_ACEOF
7815/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007816$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007817int
7818main ()
7819{
7820static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7821test_array [0] = 0
7822
7823 ;
7824 return 0;
7825}
7826_ACEOF
7827rm -f conftest.$ac_objext
7828if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007829 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007830 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007831 grep -v '^ *+' conftest.er1 >conftest.err
7832 rm -f conftest.er1
7833 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007834 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7835 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007836 { ac_try='test -z "$ac_c_werror_flag"
7837 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007838 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7839 (eval $ac_try) 2>&5
7840 ac_status=$?
7841 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7842 (exit $ac_status); }; } &&
7843 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007844 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7845 (eval $ac_try) 2>&5
7846 ac_status=$?
7847 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7848 (exit $ac_status); }; }; then
7849 ac_hi=-1 ac_mid=-1
7850 while :; do
7851 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007852/* confdefs.h. */
7853_ACEOF
7854cat confdefs.h >>conftest.$ac_ext
7855cat >>conftest.$ac_ext <<_ACEOF
7856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007857$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007858int
7859main ()
7860{
7861static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7862test_array [0] = 0
7863
7864 ;
7865 return 0;
7866}
7867_ACEOF
7868rm -f conftest.$ac_objext
7869if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007870 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007871 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007872 grep -v '^ *+' conftest.er1 >conftest.err
7873 rm -f conftest.er1
7874 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7876 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007877 { ac_try='test -z "$ac_c_werror_flag"
7878 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007879 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7880 (eval $ac_try) 2>&5
7881 ac_status=$?
7882 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7883 (exit $ac_status); }; } &&
7884 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007885 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7886 (eval $ac_try) 2>&5
7887 ac_status=$?
7888 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7889 (exit $ac_status); }; }; then
7890 ac_lo=$ac_mid; break
7891else
7892 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007893sed 's/^/| /' conftest.$ac_ext >&5
7894
Martin v. Löwis11437992002-04-12 09:54:03 +00007895ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00007896 if test $ac_mid -le $ac_hi; then
7897 ac_lo= ac_hi=
7898 break
7899 fi
7900 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007901fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007902rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007903 done
7904else
7905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007906sed 's/^/| /' conftest.$ac_ext >&5
7907
Martin v. Löwis11437992002-04-12 09:54:03 +00007908ac_lo= ac_hi=
7909fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007910rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007911fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007912rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007913# Binary search between lo and hi bounds.
7914while test "x$ac_lo" != "x$ac_hi"; do
7915 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7916 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007917/* confdefs.h. */
7918_ACEOF
7919cat confdefs.h >>conftest.$ac_ext
7920cat >>conftest.$ac_ext <<_ACEOF
7921/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007922$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007923int
7924main ()
7925{
7926static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7927test_array [0] = 0
7928
7929 ;
7930 return 0;
7931}
7932_ACEOF
7933rm -f conftest.$ac_objext
7934if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00007935 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007937 grep -v '^ *+' conftest.er1 >conftest.err
7938 rm -f conftest.er1
7939 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7941 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00007942 { ac_try='test -z "$ac_c_werror_flag"
7943 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00007944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7945 (eval $ac_try) 2>&5
7946 ac_status=$?
7947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7948 (exit $ac_status); }; } &&
7949 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7951 (eval $ac_try) 2>&5
7952 ac_status=$?
7953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7954 (exit $ac_status); }; }; then
7955 ac_hi=$ac_mid
7956else
7957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007958sed 's/^/| /' conftest.$ac_ext >&5
7959
Martin v. Löwis11437992002-04-12 09:54:03 +00007960ac_lo=`expr '(' $ac_mid ')' + 1`
7961fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00007962rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007963done
7964case $ac_lo in
7965?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007966'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7967See \`config.log' for more details." >&5
7968echo "$as_me: error: cannot compute sizeof (float), 77
7969See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007970 { (exit 1); exit 1; }; } ;;
7971esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007972else
7973 if test "$cross_compiling" = yes; then
Trent Mickc5625ba2004-08-25 23:59:39 +00007974 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7975See \`config.log' for more details." >&5
7976echo "$as_me: error: cannot run test program while cross compiling
7977See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007978 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007979else
Martin v. Löwis11437992002-04-12 09:54:03 +00007980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007981/* confdefs.h. */
7982_ACEOF
7983cat confdefs.h >>conftest.$ac_ext
7984cat >>conftest.$ac_ext <<_ACEOF
7985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007986$ac_includes_default
7987long longval () { return (long) (sizeof (float)); }
7988unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007989#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007990#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007991int
7992main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007993{
Martin v. Löwis11437992002-04-12 09:54:03 +00007994
7995 FILE *f = fopen ("conftest.val", "w");
7996 if (! f)
7997 exit (1);
7998 if (((long) (sizeof (float))) < 0)
7999 {
8000 long i = longval ();
8001 if (i != ((long) (sizeof (float))))
8002 exit (1);
8003 fprintf (f, "%ld\n", i);
8004 }
8005 else
8006 {
8007 unsigned long i = ulongval ();
8008 if (i != ((long) (sizeof (float))))
8009 exit (1);
8010 fprintf (f, "%lu\n", i);
8011 }
8012 exit (ferror (f) || fclose (f) != 0);
8013
8014 ;
8015 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008016}
Martin v. Löwis11437992002-04-12 09:54:03 +00008017_ACEOF
8018rm -f conftest$ac_exeext
8019if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8020 (eval $ac_link) 2>&5
8021 ac_status=$?
8022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8023 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8024 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8025 (eval $ac_try) 2>&5
8026 ac_status=$?
8027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8028 (exit $ac_status); }; }; then
8029 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008030else
Martin v. Löwis11437992002-04-12 09:54:03 +00008031 echo "$as_me: program exited with status $ac_status" >&5
8032echo "$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 +00008035( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008036{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
8037See \`config.log' for more details." >&5
8038echo "$as_me: error: cannot compute sizeof (float), 77
8039See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008040 { (exit 1); exit 1; }; }
8041fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008042rm -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 +00008043fi
8044fi
8045rm -f conftest.val
8046else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008047 ac_cv_sizeof_float=0
8048fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008049fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008050echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
8051echo "${ECHO_T}$ac_cv_sizeof_float" >&6
8052cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008053#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00008054_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008055
8056
Martin v. Löwis11437992002-04-12 09:54:03 +00008057echo "$as_me:$LINENO: checking for double" >&5
8058echo $ECHO_N "checking for double... $ECHO_C" >&6
8059if test "${ac_cv_type_double+set}" = set; then
8060 echo $ECHO_N "(cached) $ECHO_C" >&6
8061else
8062 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008063/* confdefs.h. */
8064_ACEOF
8065cat confdefs.h >>conftest.$ac_ext
8066cat >>conftest.$ac_ext <<_ACEOF
8067/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008068$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008069int
8070main ()
8071{
8072if ((double *) 0)
8073 return 0;
8074if (sizeof (double))
8075 return 0;
8076 ;
8077 return 0;
8078}
8079_ACEOF
8080rm -f conftest.$ac_objext
8081if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008082 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008083 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008084 grep -v '^ *+' conftest.er1 >conftest.err
8085 rm -f conftest.er1
8086 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8088 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008089 { ac_try='test -z "$ac_c_werror_flag"
8090 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008091 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8092 (eval $ac_try) 2>&5
8093 ac_status=$?
8094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8095 (exit $ac_status); }; } &&
8096 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008097 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8098 (eval $ac_try) 2>&5
8099 ac_status=$?
8100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8101 (exit $ac_status); }; }; then
8102 ac_cv_type_double=yes
8103else
8104 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008105sed 's/^/| /' conftest.$ac_ext >&5
8106
Martin v. Löwis11437992002-04-12 09:54:03 +00008107ac_cv_type_double=no
8108fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008109rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008110fi
8111echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
8112echo "${ECHO_T}$ac_cv_type_double" >&6
8113
8114echo "$as_me:$LINENO: checking size of double" >&5
8115echo $ECHO_N "checking size of double... $ECHO_C" >&6
8116if test "${ac_cv_sizeof_double+set}" = set; then
8117 echo $ECHO_N "(cached) $ECHO_C" >&6
8118else
8119 if test "$ac_cv_type_double" = yes; then
8120 # The cast to unsigned long works around a bug in the HP C Compiler
8121 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8122 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8123 # This bug is HP SR number 8606223364.
8124 if test "$cross_compiling" = yes; then
8125 # Depending upon the size, compute the lo and hi bounds.
8126cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008127/* confdefs.h. */
8128_ACEOF
8129cat confdefs.h >>conftest.$ac_ext
8130cat >>conftest.$ac_ext <<_ACEOF
8131/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008132$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008133int
8134main ()
8135{
8136static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
8137test_array [0] = 0
8138
8139 ;
8140 return 0;
8141}
8142_ACEOF
8143rm -f conftest.$ac_objext
8144if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008145 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008147 grep -v '^ *+' conftest.er1 >conftest.err
8148 rm -f conftest.er1
8149 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8151 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008152 { ac_try='test -z "$ac_c_werror_flag"
8153 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008154 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8155 (eval $ac_try) 2>&5
8156 ac_status=$?
8157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8158 (exit $ac_status); }; } &&
8159 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8161 (eval $ac_try) 2>&5
8162 ac_status=$?
8163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8164 (exit $ac_status); }; }; then
8165 ac_lo=0 ac_mid=0
8166 while :; do
8167 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008168/* confdefs.h. */
8169_ACEOF
8170cat confdefs.h >>conftest.$ac_ext
8171cat >>conftest.$ac_ext <<_ACEOF
8172/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008173$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008174int
8175main ()
8176{
8177static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8178test_array [0] = 0
8179
8180 ;
8181 return 0;
8182}
8183_ACEOF
8184rm -f conftest.$ac_objext
8185if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008186 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008187 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008188 grep -v '^ *+' conftest.er1 >conftest.err
8189 rm -f conftest.er1
8190 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8192 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008193 { ac_try='test -z "$ac_c_werror_flag"
8194 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8196 (eval $ac_try) 2>&5
8197 ac_status=$?
8198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8199 (exit $ac_status); }; } &&
8200 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008201 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8202 (eval $ac_try) 2>&5
8203 ac_status=$?
8204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8205 (exit $ac_status); }; }; then
8206 ac_hi=$ac_mid; break
8207else
8208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008209sed 's/^/| /' conftest.$ac_ext >&5
8210
Martin v. Löwis11437992002-04-12 09:54:03 +00008211ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008212 if test $ac_lo -le $ac_mid; then
8213 ac_lo= ac_hi=
8214 break
8215 fi
8216 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008217fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008218rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008219 done
8220else
8221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008222sed 's/^/| /' conftest.$ac_ext >&5
8223
Martin v. Löwis11437992002-04-12 09:54:03 +00008224cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008225/* confdefs.h. */
8226_ACEOF
8227cat confdefs.h >>conftest.$ac_ext
8228cat >>conftest.$ac_ext <<_ACEOF
8229/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008230$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008231int
8232main ()
8233{
8234static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
8235test_array [0] = 0
8236
8237 ;
8238 return 0;
8239}
8240_ACEOF
8241rm -f conftest.$ac_objext
8242if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008243 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008245 grep -v '^ *+' conftest.er1 >conftest.err
8246 rm -f conftest.er1
8247 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008248 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8249 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008250 { ac_try='test -z "$ac_c_werror_flag"
8251 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008252 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8253 (eval $ac_try) 2>&5
8254 ac_status=$?
8255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8256 (exit $ac_status); }; } &&
8257 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8259 (eval $ac_try) 2>&5
8260 ac_status=$?
8261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8262 (exit $ac_status); }; }; then
8263 ac_hi=-1 ac_mid=-1
8264 while :; do
8265 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008266/* confdefs.h. */
8267_ACEOF
8268cat confdefs.h >>conftest.$ac_ext
8269cat >>conftest.$ac_ext <<_ACEOF
8270/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008271$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008272int
8273main ()
8274{
8275static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
8276test_array [0] = 0
8277
8278 ;
8279 return 0;
8280}
8281_ACEOF
8282rm -f conftest.$ac_objext
8283if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008284 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008285 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008286 grep -v '^ *+' conftest.er1 >conftest.err
8287 rm -f conftest.er1
8288 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8290 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008291 { ac_try='test -z "$ac_c_werror_flag"
8292 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008293 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8294 (eval $ac_try) 2>&5
8295 ac_status=$?
8296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8297 (exit $ac_status); }; } &&
8298 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008299 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8300 (eval $ac_try) 2>&5
8301 ac_status=$?
8302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8303 (exit $ac_status); }; }; then
8304 ac_lo=$ac_mid; break
8305else
8306 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008307sed 's/^/| /' conftest.$ac_ext >&5
8308
Martin v. Löwis11437992002-04-12 09:54:03 +00008309ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008310 if test $ac_mid -le $ac_hi; then
8311 ac_lo= ac_hi=
8312 break
8313 fi
8314 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008315fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008316rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008317 done
8318else
8319 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008320sed 's/^/| /' conftest.$ac_ext >&5
8321
Martin v. Löwis11437992002-04-12 09:54:03 +00008322ac_lo= ac_hi=
8323fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008324rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008325fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008326rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008327# Binary search between lo and hi bounds.
8328while test "x$ac_lo" != "x$ac_hi"; do
8329 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8330 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008331/* confdefs.h. */
8332_ACEOF
8333cat confdefs.h >>conftest.$ac_ext
8334cat >>conftest.$ac_ext <<_ACEOF
8335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008336$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008337int
8338main ()
8339{
8340static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
8341test_array [0] = 0
8342
8343 ;
8344 return 0;
8345}
8346_ACEOF
8347rm -f conftest.$ac_objext
8348if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008349 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008350 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008351 grep -v '^ *+' conftest.er1 >conftest.err
8352 rm -f conftest.er1
8353 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8355 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008356 { ac_try='test -z "$ac_c_werror_flag"
8357 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008358 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8359 (eval $ac_try) 2>&5
8360 ac_status=$?
8361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8362 (exit $ac_status); }; } &&
8363 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008364 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8365 (eval $ac_try) 2>&5
8366 ac_status=$?
8367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8368 (exit $ac_status); }; }; then
8369 ac_hi=$ac_mid
8370else
8371 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008372sed 's/^/| /' conftest.$ac_ext >&5
8373
Martin v. Löwis11437992002-04-12 09:54:03 +00008374ac_lo=`expr '(' $ac_mid ')' + 1`
8375fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008376rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008377done
8378case $ac_lo in
8379?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008380'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8381See \`config.log' for more details." >&5
8382echo "$as_me: error: cannot compute sizeof (double), 77
8383See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008384 { (exit 1); exit 1; }; } ;;
8385esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00008386else
8387 if test "$cross_compiling" = yes; then
Trent Mickc5625ba2004-08-25 23:59:39 +00008388 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8389See \`config.log' for more details." >&5
8390echo "$as_me: error: cannot run test program while cross compiling
8391See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008392 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00008393else
Martin v. Löwis11437992002-04-12 09:54:03 +00008394 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008395/* confdefs.h. */
8396_ACEOF
8397cat confdefs.h >>conftest.$ac_ext
8398cat >>conftest.$ac_ext <<_ACEOF
8399/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008400$ac_includes_default
8401long longval () { return (long) (sizeof (double)); }
8402unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008403#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008404#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008405int
8406main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00008407{
Martin v. Löwis11437992002-04-12 09:54:03 +00008408
8409 FILE *f = fopen ("conftest.val", "w");
8410 if (! f)
8411 exit (1);
8412 if (((long) (sizeof (double))) < 0)
8413 {
8414 long i = longval ();
8415 if (i != ((long) (sizeof (double))))
8416 exit (1);
8417 fprintf (f, "%ld\n", i);
8418 }
8419 else
8420 {
8421 unsigned long i = ulongval ();
8422 if (i != ((long) (sizeof (double))))
8423 exit (1);
8424 fprintf (f, "%lu\n", i);
8425 }
8426 exit (ferror (f) || fclose (f) != 0);
8427
8428 ;
8429 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00008430}
Martin v. Löwis11437992002-04-12 09:54:03 +00008431_ACEOF
8432rm -f conftest$ac_exeext
8433if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8434 (eval $ac_link) 2>&5
8435 ac_status=$?
8436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8437 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8439 (eval $ac_try) 2>&5
8440 ac_status=$?
8441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8442 (exit $ac_status); }; }; then
8443 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00008444else
Martin v. Löwis11437992002-04-12 09:54:03 +00008445 echo "$as_me: program exited with status $ac_status" >&5
8446echo "$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 +00008449( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008450{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
8451See \`config.log' for more details." >&5
8452echo "$as_me: error: cannot compute sizeof (double), 77
8453See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008454 { (exit 1); exit 1; }; }
8455fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008456rm -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 +00008457fi
8458fi
8459rm -f conftest.val
8460else
Guido van Rossumef2255b2000-03-10 22:30:29 +00008461 ac_cv_sizeof_double=0
8462fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00008463fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008464echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
8465echo "${ECHO_T}$ac_cv_sizeof_double" >&6
8466cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008467#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00008468_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00008469
8470
Martin v. Löwis11437992002-04-12 09:54:03 +00008471echo "$as_me:$LINENO: checking for fpos_t" >&5
8472echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
8473if test "${ac_cv_type_fpos_t+set}" = set; then
8474 echo $ECHO_N "(cached) $ECHO_C" >&6
8475else
8476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008477/* confdefs.h. */
8478_ACEOF
8479cat confdefs.h >>conftest.$ac_ext
8480cat >>conftest.$ac_ext <<_ACEOF
8481/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008482$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008483int
8484main ()
8485{
8486if ((fpos_t *) 0)
8487 return 0;
8488if (sizeof (fpos_t))
8489 return 0;
8490 ;
8491 return 0;
8492}
8493_ACEOF
8494rm -f conftest.$ac_objext
8495if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008496 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008497 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008498 grep -v '^ *+' conftest.er1 >conftest.err
8499 rm -f conftest.er1
8500 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8502 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008503 { ac_try='test -z "$ac_c_werror_flag"
8504 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8506 (eval $ac_try) 2>&5
8507 ac_status=$?
8508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8509 (exit $ac_status); }; } &&
8510 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8512 (eval $ac_try) 2>&5
8513 ac_status=$?
8514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8515 (exit $ac_status); }; }; then
8516 ac_cv_type_fpos_t=yes
8517else
8518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008519sed 's/^/| /' conftest.$ac_ext >&5
8520
Martin v. Löwis11437992002-04-12 09:54:03 +00008521ac_cv_type_fpos_t=no
8522fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008523rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008524fi
8525echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
8526echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
8527
8528echo "$as_me:$LINENO: checking size of fpos_t" >&5
8529echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
8530if test "${ac_cv_sizeof_fpos_t+set}" = set; then
8531 echo $ECHO_N "(cached) $ECHO_C" >&6
8532else
8533 if test "$ac_cv_type_fpos_t" = yes; then
8534 # The cast to unsigned long works around a bug in the HP C Compiler
8535 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8536 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8537 # This bug is HP SR number 8606223364.
8538 if test "$cross_compiling" = yes; then
8539 # Depending upon the size, compute the lo and hi bounds.
8540cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008541/* confdefs.h. */
8542_ACEOF
8543cat confdefs.h >>conftest.$ac_ext
8544cat >>conftest.$ac_ext <<_ACEOF
8545/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008546$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008547int
8548main ()
8549{
8550static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
8551test_array [0] = 0
8552
8553 ;
8554 return 0;
8555}
8556_ACEOF
8557rm -f conftest.$ac_objext
8558if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008559 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008561 grep -v '^ *+' conftest.er1 >conftest.err
8562 rm -f conftest.er1
8563 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8565 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008566 { ac_try='test -z "$ac_c_werror_flag"
8567 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008568 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8569 (eval $ac_try) 2>&5
8570 ac_status=$?
8571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8572 (exit $ac_status); }; } &&
8573 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008574 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8575 (eval $ac_try) 2>&5
8576 ac_status=$?
8577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8578 (exit $ac_status); }; }; then
8579 ac_lo=0 ac_mid=0
8580 while :; do
8581 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008582/* confdefs.h. */
8583_ACEOF
8584cat confdefs.h >>conftest.$ac_ext
8585cat >>conftest.$ac_ext <<_ACEOF
8586/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008587$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008588int
8589main ()
8590{
8591static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8592test_array [0] = 0
8593
8594 ;
8595 return 0;
8596}
8597_ACEOF
8598rm -f conftest.$ac_objext
8599if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008600 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008602 grep -v '^ *+' conftest.er1 >conftest.err
8603 rm -f conftest.er1
8604 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8606 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008607 { ac_try='test -z "$ac_c_werror_flag"
8608 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8610 (eval $ac_try) 2>&5
8611 ac_status=$?
8612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8613 (exit $ac_status); }; } &&
8614 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8616 (eval $ac_try) 2>&5
8617 ac_status=$?
8618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8619 (exit $ac_status); }; }; then
8620 ac_hi=$ac_mid; break
8621else
8622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008623sed 's/^/| /' conftest.$ac_ext >&5
8624
Martin v. Löwis11437992002-04-12 09:54:03 +00008625ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008626 if test $ac_lo -le $ac_mid; then
8627 ac_lo= ac_hi=
8628 break
8629 fi
8630 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008631fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008632rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008633 done
8634else
8635 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008636sed 's/^/| /' conftest.$ac_ext >&5
8637
Martin v. Löwis11437992002-04-12 09:54:03 +00008638cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008639/* confdefs.h. */
8640_ACEOF
8641cat confdefs.h >>conftest.$ac_ext
8642cat >>conftest.$ac_ext <<_ACEOF
8643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008644$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008645int
8646main ()
8647{
8648static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8649test_array [0] = 0
8650
8651 ;
8652 return 0;
8653}
8654_ACEOF
8655rm -f conftest.$ac_objext
8656if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008657 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008659 grep -v '^ *+' conftest.er1 >conftest.err
8660 rm -f conftest.er1
8661 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8663 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008664 { ac_try='test -z "$ac_c_werror_flag"
8665 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8667 (eval $ac_try) 2>&5
8668 ac_status=$?
8669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8670 (exit $ac_status); }; } &&
8671 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8673 (eval $ac_try) 2>&5
8674 ac_status=$?
8675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8676 (exit $ac_status); }; }; then
8677 ac_hi=-1 ac_mid=-1
8678 while :; do
8679 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008680/* confdefs.h. */
8681_ACEOF
8682cat confdefs.h >>conftest.$ac_ext
8683cat >>conftest.$ac_ext <<_ACEOF
8684/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008685$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008686int
8687main ()
8688{
8689static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8690test_array [0] = 0
8691
8692 ;
8693 return 0;
8694}
8695_ACEOF
8696rm -f conftest.$ac_objext
8697if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008698 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008699 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008700 grep -v '^ *+' conftest.er1 >conftest.err
8701 rm -f conftest.er1
8702 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8704 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008705 { ac_try='test -z "$ac_c_werror_flag"
8706 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008707 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8708 (eval $ac_try) 2>&5
8709 ac_status=$?
8710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8711 (exit $ac_status); }; } &&
8712 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008713 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8714 (eval $ac_try) 2>&5
8715 ac_status=$?
8716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8717 (exit $ac_status); }; }; then
8718 ac_lo=$ac_mid; break
8719else
8720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008721sed 's/^/| /' conftest.$ac_ext >&5
8722
Martin v. Löwis11437992002-04-12 09:54:03 +00008723ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00008724 if test $ac_mid -le $ac_hi; then
8725 ac_lo= ac_hi=
8726 break
8727 fi
8728 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008729fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008730rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008731 done
8732else
8733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008734sed 's/^/| /' conftest.$ac_ext >&5
8735
Martin v. Löwis11437992002-04-12 09:54:03 +00008736ac_lo= ac_hi=
8737fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008738rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008739fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008740rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008741# Binary search between lo and hi bounds.
8742while test "x$ac_lo" != "x$ac_hi"; do
8743 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8744 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008745/* confdefs.h. */
8746_ACEOF
8747cat confdefs.h >>conftest.$ac_ext
8748cat >>conftest.$ac_ext <<_ACEOF
8749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008750$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008751int
8752main ()
8753{
8754static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8755test_array [0] = 0
8756
8757 ;
8758 return 0;
8759}
8760_ACEOF
8761rm -f conftest.$ac_objext
8762if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008763 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008765 grep -v '^ *+' conftest.er1 >conftest.err
8766 rm -f conftest.er1
8767 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008768 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8769 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008770 { ac_try='test -z "$ac_c_werror_flag"
8771 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8773 (eval $ac_try) 2>&5
8774 ac_status=$?
8775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8776 (exit $ac_status); }; } &&
8777 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008778 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8779 (eval $ac_try) 2>&5
8780 ac_status=$?
8781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8782 (exit $ac_status); }; }; then
8783 ac_hi=$ac_mid
8784else
8785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008786sed 's/^/| /' conftest.$ac_ext >&5
8787
Martin v. Löwis11437992002-04-12 09:54:03 +00008788ac_lo=`expr '(' $ac_mid ')' + 1`
8789fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008790rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008791done
8792case $ac_lo in
8793?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008794'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8795See \`config.log' for more details." >&5
8796echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8797See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008798 { (exit 1); exit 1; }; } ;;
8799esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008800else
8801 if test "$cross_compiling" = yes; then
Trent Mickc5625ba2004-08-25 23:59:39 +00008802 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8803See \`config.log' for more details." >&5
8804echo "$as_me: error: cannot run test program while cross compiling
8805See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008806 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008807else
Martin v. Löwis11437992002-04-12 09:54:03 +00008808 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008809/* confdefs.h. */
8810_ACEOF
8811cat confdefs.h >>conftest.$ac_ext
8812cat >>conftest.$ac_ext <<_ACEOF
8813/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008814$ac_includes_default
8815long longval () { return (long) (sizeof (fpos_t)); }
8816unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008817#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008818#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008819int
8820main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008821{
Martin v. Löwis11437992002-04-12 09:54:03 +00008822
8823 FILE *f = fopen ("conftest.val", "w");
8824 if (! f)
8825 exit (1);
8826 if (((long) (sizeof (fpos_t))) < 0)
8827 {
8828 long i = longval ();
8829 if (i != ((long) (sizeof (fpos_t))))
8830 exit (1);
8831 fprintf (f, "%ld\n", i);
8832 }
8833 else
8834 {
8835 unsigned long i = ulongval ();
8836 if (i != ((long) (sizeof (fpos_t))))
8837 exit (1);
8838 fprintf (f, "%lu\n", i);
8839 }
8840 exit (ferror (f) || fclose (f) != 0);
8841
8842 ;
8843 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008844}
Martin v. Löwis11437992002-04-12 09:54:03 +00008845_ACEOF
8846rm -f conftest$ac_exeext
8847if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8848 (eval $ac_link) 2>&5
8849 ac_status=$?
8850 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8851 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8853 (eval $ac_try) 2>&5
8854 ac_status=$?
8855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8856 (exit $ac_status); }; }; then
8857 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008858else
Martin v. Löwis11437992002-04-12 09:54:03 +00008859 echo "$as_me: program exited with status $ac_status" >&5
8860echo "$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 +00008863( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008864{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8865See \`config.log' for more details." >&5
8866echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8867See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008868 { (exit 1); exit 1; }; }
8869fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008870rm -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 +00008871fi
8872fi
8873rm -f conftest.val
8874else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008875 ac_cv_sizeof_fpos_t=0
8876fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008877fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008878echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8879echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8880cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008881#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008882_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008883
Michael W. Hudson54241132001-12-07 15:38:26 +00008884
8885
Martin v. Löwis11437992002-04-12 09:54:03 +00008886echo "$as_me:$LINENO: checking for long long support" >&5
8887echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008888have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008889cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008890/* confdefs.h. */
8891_ACEOF
8892cat confdefs.h >>conftest.$ac_ext
8893cat >>conftest.$ac_ext <<_ACEOF
8894/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008895
Martin v. Löwis11437992002-04-12 09:54:03 +00008896int
8897main ()
8898{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008899long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008900 ;
8901 return 0;
8902}
8903_ACEOF
8904rm -f conftest.$ac_objext
8905if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008906 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008907 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008908 grep -v '^ *+' conftest.er1 >conftest.err
8909 rm -f conftest.er1
8910 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8912 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008913 { ac_try='test -z "$ac_c_werror_flag"
8914 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8916 (eval $ac_try) 2>&5
8917 ac_status=$?
8918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8919 (exit $ac_status); }; } &&
8920 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8922 (eval $ac_try) 2>&5
8923 ac_status=$?
8924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8925 (exit $ac_status); }; }; then
8926
8927
8928cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008929#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008930_ACEOF
8931
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008932 have_long_long=yes
8933
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008934else
Martin v. Löwis11437992002-04-12 09:54:03 +00008935 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008936sed 's/^/| /' conftest.$ac_ext >&5
8937
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008938fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008939rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008940echo "$as_me:$LINENO: result: $have_long_long" >&5
8941echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008942if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008943echo "$as_me:$LINENO: checking for long long" >&5
8944echo $ECHO_N "checking for long long... $ECHO_C" >&6
8945if test "${ac_cv_type_long_long+set}" = set; then
8946 echo $ECHO_N "(cached) $ECHO_C" >&6
8947else
8948 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008949/* confdefs.h. */
8950_ACEOF
8951cat confdefs.h >>conftest.$ac_ext
8952cat >>conftest.$ac_ext <<_ACEOF
8953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008954$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008955int
8956main ()
8957{
8958if ((long long *) 0)
8959 return 0;
8960if (sizeof (long long))
8961 return 0;
8962 ;
8963 return 0;
8964}
8965_ACEOF
8966rm -f conftest.$ac_objext
8967if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00008968 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008970 grep -v '^ *+' conftest.er1 >conftest.err
8971 rm -f conftest.er1
8972 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8974 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00008975 { ac_try='test -z "$ac_c_werror_flag"
8976 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00008977 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8978 (eval $ac_try) 2>&5
8979 ac_status=$?
8980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8981 (exit $ac_status); }; } &&
8982 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8984 (eval $ac_try) 2>&5
8985 ac_status=$?
8986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8987 (exit $ac_status); }; }; then
8988 ac_cv_type_long_long=yes
8989else
8990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008991sed 's/^/| /' conftest.$ac_ext >&5
8992
Martin v. Löwis11437992002-04-12 09:54:03 +00008993ac_cv_type_long_long=no
8994fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00008995rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008996fi
8997echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8998echo "${ECHO_T}$ac_cv_type_long_long" >&6
8999
9000echo "$as_me:$LINENO: checking size of long long" >&5
9001echo $ECHO_N "checking size of long long... $ECHO_C" >&6
9002if test "${ac_cv_sizeof_long_long+set}" = set; then
9003 echo $ECHO_N "(cached) $ECHO_C" >&6
9004else
9005 if test "$ac_cv_type_long_long" = yes; then
9006 # The cast to unsigned long works around a bug in the HP C Compiler
9007 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9008 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9009 # This bug is HP SR number 8606223364.
9010 if test "$cross_compiling" = yes; then
9011 # Depending upon the size, compute the lo and hi bounds.
9012cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009013/* confdefs.h. */
9014_ACEOF
9015cat confdefs.h >>conftest.$ac_ext
9016cat >>conftest.$ac_ext <<_ACEOF
9017/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009018$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009019int
9020main ()
9021{
9022static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
9023test_array [0] = 0
9024
9025 ;
9026 return 0;
9027}
9028_ACEOF
9029rm -f conftest.$ac_objext
9030if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009031 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009033 grep -v '^ *+' conftest.er1 >conftest.err
9034 rm -f conftest.er1
9035 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9037 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009038 { ac_try='test -z "$ac_c_werror_flag"
9039 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9041 (eval $ac_try) 2>&5
9042 ac_status=$?
9043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9044 (exit $ac_status); }; } &&
9045 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009046 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9047 (eval $ac_try) 2>&5
9048 ac_status=$?
9049 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9050 (exit $ac_status); }; }; then
9051 ac_lo=0 ac_mid=0
9052 while :; do
9053 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009054/* confdefs.h. */
9055_ACEOF
9056cat confdefs.h >>conftest.$ac_ext
9057cat >>conftest.$ac_ext <<_ACEOF
9058/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009059$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009060int
9061main ()
9062{
9063static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9064test_array [0] = 0
9065
9066 ;
9067 return 0;
9068}
9069_ACEOF
9070rm -f conftest.$ac_objext
9071if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009072 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009073 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009074 grep -v '^ *+' conftest.er1 >conftest.err
9075 rm -f conftest.er1
9076 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9078 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009079 { ac_try='test -z "$ac_c_werror_flag"
9080 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9082 (eval $ac_try) 2>&5
9083 ac_status=$?
9084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9085 (exit $ac_status); }; } &&
9086 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009087 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9088 (eval $ac_try) 2>&5
9089 ac_status=$?
9090 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9091 (exit $ac_status); }; }; then
9092 ac_hi=$ac_mid; break
9093else
9094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009095sed 's/^/| /' conftest.$ac_ext >&5
9096
Martin v. Löwis11437992002-04-12 09:54:03 +00009097ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009098 if test $ac_lo -le $ac_mid; then
9099 ac_lo= ac_hi=
9100 break
9101 fi
9102 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009103fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009104rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009105 done
9106else
9107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009108sed 's/^/| /' conftest.$ac_ext >&5
9109
Martin v. Löwis11437992002-04-12 09:54:03 +00009110cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009111/* confdefs.h. */
9112_ACEOF
9113cat confdefs.h >>conftest.$ac_ext
9114cat >>conftest.$ac_ext <<_ACEOF
9115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009116$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009117int
9118main ()
9119{
9120static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
9121test_array [0] = 0
9122
9123 ;
9124 return 0;
9125}
9126_ACEOF
9127rm -f conftest.$ac_objext
9128if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009129 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009130 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009131 grep -v '^ *+' conftest.er1 >conftest.err
9132 rm -f conftest.er1
9133 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9135 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009136 { ac_try='test -z "$ac_c_werror_flag"
9137 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009138 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9139 (eval $ac_try) 2>&5
9140 ac_status=$?
9141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9142 (exit $ac_status); }; } &&
9143 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9145 (eval $ac_try) 2>&5
9146 ac_status=$?
9147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9148 (exit $ac_status); }; }; then
9149 ac_hi=-1 ac_mid=-1
9150 while :; do
9151 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009152/* confdefs.h. */
9153_ACEOF
9154cat confdefs.h >>conftest.$ac_ext
9155cat >>conftest.$ac_ext <<_ACEOF
9156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009157$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009158int
9159main ()
9160{
9161static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
9162test_array [0] = 0
9163
9164 ;
9165 return 0;
9166}
9167_ACEOF
9168rm -f conftest.$ac_objext
9169if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009170 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009172 grep -v '^ *+' conftest.er1 >conftest.err
9173 rm -f conftest.er1
9174 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9176 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009177 { ac_try='test -z "$ac_c_werror_flag"
9178 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9180 (eval $ac_try) 2>&5
9181 ac_status=$?
9182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9183 (exit $ac_status); }; } &&
9184 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009185 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9186 (eval $ac_try) 2>&5
9187 ac_status=$?
9188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9189 (exit $ac_status); }; }; then
9190 ac_lo=$ac_mid; break
9191else
9192 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009193sed 's/^/| /' conftest.$ac_ext >&5
9194
Martin v. Löwis11437992002-04-12 09:54:03 +00009195ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009196 if test $ac_mid -le $ac_hi; then
9197 ac_lo= ac_hi=
9198 break
9199 fi
9200 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009201fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009202rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009203 done
9204else
9205 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009206sed 's/^/| /' conftest.$ac_ext >&5
9207
Martin v. Löwis11437992002-04-12 09:54:03 +00009208ac_lo= ac_hi=
9209fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009210rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009211fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009212rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009213# Binary search between lo and hi bounds.
9214while test "x$ac_lo" != "x$ac_hi"; do
9215 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9216 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009217/* confdefs.h. */
9218_ACEOF
9219cat confdefs.h >>conftest.$ac_ext
9220cat >>conftest.$ac_ext <<_ACEOF
9221/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009222$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009223int
9224main ()
9225{
9226static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
9227test_array [0] = 0
9228
9229 ;
9230 return 0;
9231}
9232_ACEOF
9233rm -f conftest.$ac_objext
9234if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009235 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009236 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009237 grep -v '^ *+' conftest.er1 >conftest.err
9238 rm -f conftest.er1
9239 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9241 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009242 { ac_try='test -z "$ac_c_werror_flag"
9243 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009244 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9245 (eval $ac_try) 2>&5
9246 ac_status=$?
9247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9248 (exit $ac_status); }; } &&
9249 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9251 (eval $ac_try) 2>&5
9252 ac_status=$?
9253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9254 (exit $ac_status); }; }; then
9255 ac_hi=$ac_mid
9256else
9257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009258sed 's/^/| /' conftest.$ac_ext >&5
9259
Martin v. Löwis11437992002-04-12 09:54:03 +00009260ac_lo=`expr '(' $ac_mid ')' + 1`
9261fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009262rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009263done
9264case $ac_lo in
9265?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009266'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9267See \`config.log' for more details." >&5
9268echo "$as_me: error: cannot compute sizeof (long long), 77
9269See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009270 { (exit 1); exit 1; }; } ;;
9271esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009272else
9273 if test "$cross_compiling" = yes; then
Trent Mickc5625ba2004-08-25 23:59:39 +00009274 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9275See \`config.log' for more details." >&5
9276echo "$as_me: error: cannot run test program while cross compiling
9277See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009278 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009279else
Martin v. Löwis11437992002-04-12 09:54:03 +00009280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009281/* confdefs.h. */
9282_ACEOF
9283cat confdefs.h >>conftest.$ac_ext
9284cat >>conftest.$ac_ext <<_ACEOF
9285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009286$ac_includes_default
9287long longval () { return (long) (sizeof (long long)); }
9288unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009289#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009290#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009291int
9292main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009293{
Martin v. Löwis11437992002-04-12 09:54:03 +00009294
9295 FILE *f = fopen ("conftest.val", "w");
9296 if (! f)
9297 exit (1);
9298 if (((long) (sizeof (long long))) < 0)
9299 {
9300 long i = longval ();
9301 if (i != ((long) (sizeof (long long))))
9302 exit (1);
9303 fprintf (f, "%ld\n", i);
9304 }
9305 else
9306 {
9307 unsigned long i = ulongval ();
9308 if (i != ((long) (sizeof (long long))))
9309 exit (1);
9310 fprintf (f, "%lu\n", i);
9311 }
9312 exit (ferror (f) || fclose (f) != 0);
9313
9314 ;
9315 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009316}
Martin v. Löwis11437992002-04-12 09:54:03 +00009317_ACEOF
9318rm -f conftest$ac_exeext
9319if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9320 (eval $ac_link) 2>&5
9321 ac_status=$?
9322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9323 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9324 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9325 (eval $ac_try) 2>&5
9326 ac_status=$?
9327 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9328 (exit $ac_status); }; }; then
9329 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009330else
Martin v. Löwis11437992002-04-12 09:54:03 +00009331 echo "$as_me: program exited with status $ac_status" >&5
9332echo "$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 +00009335( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009336{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
9337See \`config.log' for more details." >&5
9338echo "$as_me: error: cannot compute sizeof (long long), 77
9339See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009340 { (exit 1); exit 1; }; }
9341fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009342rm -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 +00009343fi
9344fi
9345rm -f conftest.val
9346else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009347 ac_cv_sizeof_long_long=0
9348fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009349fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009350echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
9351echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
9352cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009353#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00009354_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009355
Michael W. Hudson54241132001-12-07 15:38:26 +00009356
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009357fi
9358
Martin v. Löwis11437992002-04-12 09:54:03 +00009359echo "$as_me:$LINENO: checking for uintptr_t support" >&5
9360echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009361have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009362cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009363/* confdefs.h. */
9364_ACEOF
9365cat confdefs.h >>conftest.$ac_ext
9366cat >>conftest.$ac_ext <<_ACEOF
9367/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009368
Martin v. Löwis11437992002-04-12 09:54:03 +00009369int
9370main ()
9371{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009372uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009373 ;
9374 return 0;
9375}
9376_ACEOF
9377rm -f conftest.$ac_objext
9378if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009379 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009380 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009381 grep -v '^ *+' conftest.er1 >conftest.err
9382 rm -f conftest.er1
9383 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9385 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009386 { ac_try='test -z "$ac_c_werror_flag"
9387 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009388 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9389 (eval $ac_try) 2>&5
9390 ac_status=$?
9391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9392 (exit $ac_status); }; } &&
9393 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9395 (eval $ac_try) 2>&5
9396 ac_status=$?
9397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9398 (exit $ac_status); }; }; then
9399
9400
9401cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009402#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009403_ACEOF
9404
Martin v. Löwisc45929e2002-04-06 10:10:49 +00009405 have_uintptr_t=yes
9406
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009407else
Martin v. Löwis11437992002-04-12 09:54:03 +00009408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009409sed 's/^/| /' conftest.$ac_ext >&5
9410
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009411fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009412rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009413echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
9414echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009415if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009416echo "$as_me:$LINENO: checking for uintptr_t" >&5
9417echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
9418if test "${ac_cv_type_uintptr_t+set}" = set; then
9419 echo $ECHO_N "(cached) $ECHO_C" >&6
9420else
9421 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009422/* confdefs.h. */
9423_ACEOF
9424cat confdefs.h >>conftest.$ac_ext
9425cat >>conftest.$ac_ext <<_ACEOF
9426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009427$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009428int
9429main ()
9430{
9431if ((uintptr_t *) 0)
9432 return 0;
9433if (sizeof (uintptr_t))
9434 return 0;
9435 ;
9436 return 0;
9437}
9438_ACEOF
9439rm -f conftest.$ac_objext
9440if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009441 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009443 grep -v '^ *+' conftest.er1 >conftest.err
9444 rm -f conftest.er1
9445 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9447 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009448 { ac_try='test -z "$ac_c_werror_flag"
9449 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009450 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9451 (eval $ac_try) 2>&5
9452 ac_status=$?
9453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9454 (exit $ac_status); }; } &&
9455 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009456 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9457 (eval $ac_try) 2>&5
9458 ac_status=$?
9459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9460 (exit $ac_status); }; }; then
9461 ac_cv_type_uintptr_t=yes
9462else
9463 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009464sed 's/^/| /' conftest.$ac_ext >&5
9465
Martin v. Löwis11437992002-04-12 09:54:03 +00009466ac_cv_type_uintptr_t=no
9467fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009468rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009469fi
9470echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
9471echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
9472
9473echo "$as_me:$LINENO: checking size of uintptr_t" >&5
9474echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
9475if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
9476 echo $ECHO_N "(cached) $ECHO_C" >&6
9477else
9478 if test "$ac_cv_type_uintptr_t" = yes; then
9479 # The cast to unsigned long works around a bug in the HP C Compiler
9480 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9481 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9482 # This bug is HP SR number 8606223364.
9483 if test "$cross_compiling" = yes; then
9484 # Depending upon the size, compute the lo and hi bounds.
9485cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009486/* confdefs.h. */
9487_ACEOF
9488cat confdefs.h >>conftest.$ac_ext
9489cat >>conftest.$ac_ext <<_ACEOF
9490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009491$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009492int
9493main ()
9494{
9495static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
9496test_array [0] = 0
9497
9498 ;
9499 return 0;
9500}
9501_ACEOF
9502rm -f conftest.$ac_objext
9503if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009504 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009506 grep -v '^ *+' conftest.er1 >conftest.err
9507 rm -f conftest.er1
9508 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9510 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009511 { ac_try='test -z "$ac_c_werror_flag"
9512 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009513 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9514 (eval $ac_try) 2>&5
9515 ac_status=$?
9516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9517 (exit $ac_status); }; } &&
9518 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9520 (eval $ac_try) 2>&5
9521 ac_status=$?
9522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9523 (exit $ac_status); }; }; then
9524 ac_lo=0 ac_mid=0
9525 while :; do
9526 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009527/* confdefs.h. */
9528_ACEOF
9529cat confdefs.h >>conftest.$ac_ext
9530cat >>conftest.$ac_ext <<_ACEOF
9531/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009532$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009533int
9534main ()
9535{
9536static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9537test_array [0] = 0
9538
9539 ;
9540 return 0;
9541}
9542_ACEOF
9543rm -f conftest.$ac_objext
9544if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009545 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009546 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009547 grep -v '^ *+' conftest.er1 >conftest.err
9548 rm -f conftest.er1
9549 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9551 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009552 { ac_try='test -z "$ac_c_werror_flag"
9553 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9555 (eval $ac_try) 2>&5
9556 ac_status=$?
9557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9558 (exit $ac_status); }; } &&
9559 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9561 (eval $ac_try) 2>&5
9562 ac_status=$?
9563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9564 (exit $ac_status); }; }; then
9565 ac_hi=$ac_mid; break
9566else
9567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009568sed 's/^/| /' conftest.$ac_ext >&5
9569
Martin v. Löwis11437992002-04-12 09:54:03 +00009570ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009571 if test $ac_lo -le $ac_mid; then
9572 ac_lo= ac_hi=
9573 break
9574 fi
9575 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009576fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009577rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009578 done
9579else
9580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009581sed 's/^/| /' conftest.$ac_ext >&5
9582
Martin v. Löwis11437992002-04-12 09:54:03 +00009583cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009584/* confdefs.h. */
9585_ACEOF
9586cat confdefs.h >>conftest.$ac_ext
9587cat >>conftest.$ac_ext <<_ACEOF
9588/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009589$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009590int
9591main ()
9592{
9593static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
9594test_array [0] = 0
9595
9596 ;
9597 return 0;
9598}
9599_ACEOF
9600rm -f conftest.$ac_objext
9601if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009602 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009603 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009604 grep -v '^ *+' conftest.er1 >conftest.err
9605 rm -f conftest.er1
9606 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9608 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009609 { ac_try='test -z "$ac_c_werror_flag"
9610 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009611 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9612 (eval $ac_try) 2>&5
9613 ac_status=$?
9614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9615 (exit $ac_status); }; } &&
9616 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009617 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9618 (eval $ac_try) 2>&5
9619 ac_status=$?
9620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9621 (exit $ac_status); }; }; then
9622 ac_hi=-1 ac_mid=-1
9623 while :; do
9624 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009625/* confdefs.h. */
9626_ACEOF
9627cat confdefs.h >>conftest.$ac_ext
9628cat >>conftest.$ac_ext <<_ACEOF
9629/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009630$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009631int
9632main ()
9633{
9634static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
9635test_array [0] = 0
9636
9637 ;
9638 return 0;
9639}
9640_ACEOF
9641rm -f conftest.$ac_objext
9642if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009643 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009644 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009645 grep -v '^ *+' conftest.er1 >conftest.err
9646 rm -f conftest.er1
9647 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9649 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009650 { ac_try='test -z "$ac_c_werror_flag"
9651 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009652 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9653 (eval $ac_try) 2>&5
9654 ac_status=$?
9655 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9656 (exit $ac_status); }; } &&
9657 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009658 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9659 (eval $ac_try) 2>&5
9660 ac_status=$?
9661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9662 (exit $ac_status); }; }; then
9663 ac_lo=$ac_mid; break
9664else
9665 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009666sed 's/^/| /' conftest.$ac_ext >&5
9667
Martin v. Löwis11437992002-04-12 09:54:03 +00009668ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +00009669 if test $ac_mid -le $ac_hi; then
9670 ac_lo= ac_hi=
9671 break
9672 fi
9673 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009674fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009675rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009676 done
9677else
9678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009679sed 's/^/| /' conftest.$ac_ext >&5
9680
Martin v. Löwis11437992002-04-12 09:54:03 +00009681ac_lo= ac_hi=
9682fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009683rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009684fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009685rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009686# Binary search between lo and hi bounds.
9687while test "x$ac_lo" != "x$ac_hi"; do
9688 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9689 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009690/* confdefs.h. */
9691_ACEOF
9692cat confdefs.h >>conftest.$ac_ext
9693cat >>conftest.$ac_ext <<_ACEOF
9694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009695$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009696int
9697main ()
9698{
9699static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
9700test_array [0] = 0
9701
9702 ;
9703 return 0;
9704}
9705_ACEOF
9706rm -f conftest.$ac_objext
9707if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009708 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009710 grep -v '^ *+' conftest.er1 >conftest.err
9711 rm -f conftest.er1
9712 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009713 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9714 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +00009715 { ac_try='test -z "$ac_c_werror_flag"
9716 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +00009717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9718 (eval $ac_try) 2>&5
9719 ac_status=$?
9720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9721 (exit $ac_status); }; } &&
9722 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9724 (eval $ac_try) 2>&5
9725 ac_status=$?
9726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9727 (exit $ac_status); }; }; then
9728 ac_hi=$ac_mid
9729else
9730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009731sed 's/^/| /' conftest.$ac_ext >&5
9732
Martin v. Löwis11437992002-04-12 09:54:03 +00009733ac_lo=`expr '(' $ac_mid ')' + 1`
9734fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009735rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009736done
9737case $ac_lo in
9738?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00009739'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9740See \`config.log' for more details." >&5
9741echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9742See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009743 { (exit 1); exit 1; }; } ;;
9744esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009745else
9746 if test "$cross_compiling" = yes; then
Trent Mickc5625ba2004-08-25 23:59:39 +00009747 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
9748See \`config.log' for more details." >&5
9749echo "$as_me: error: cannot run test program while cross compiling
9750See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009751 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009752else
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009754/* confdefs.h. */
9755_ACEOF
9756cat confdefs.h >>conftest.$ac_ext
9757cat >>conftest.$ac_ext <<_ACEOF
9758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009759$ac_includes_default
9760long longval () { return (long) (sizeof (uintptr_t)); }
9761unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009762#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009763#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009764int
9765main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009766{
Martin v. Löwis11437992002-04-12 09:54:03 +00009767
9768 FILE *f = fopen ("conftest.val", "w");
9769 if (! f)
9770 exit (1);
9771 if (((long) (sizeof (uintptr_t))) < 0)
9772 {
9773 long i = longval ();
9774 if (i != ((long) (sizeof (uintptr_t))))
9775 exit (1);
9776 fprintf (f, "%ld\n", i);
9777 }
9778 else
9779 {
9780 unsigned long i = ulongval ();
9781 if (i != ((long) (sizeof (uintptr_t))))
9782 exit (1);
9783 fprintf (f, "%lu\n", i);
9784 }
9785 exit (ferror (f) || fclose (f) != 0);
9786
9787 ;
9788 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009789}
Martin v. Löwis11437992002-04-12 09:54:03 +00009790_ACEOF
9791rm -f conftest$ac_exeext
9792if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9793 (eval $ac_link) 2>&5
9794 ac_status=$?
9795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9796 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9798 (eval $ac_try) 2>&5
9799 ac_status=$?
9800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9801 (exit $ac_status); }; }; then
9802 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009803else
Martin v. Löwis11437992002-04-12 09:54:03 +00009804 echo "$as_me: program exited with status $ac_status" >&5
9805echo "$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 +00009808( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009809{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9810See \`config.log' for more details." >&5
9811echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9812See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009813 { (exit 1); exit 1; }; }
9814fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009815rm -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 +00009816fi
9817fi
9818rm -f conftest.val
9819else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009820 ac_cv_sizeof_uintptr_t=0
9821fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009822fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009823echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9824echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9825cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009826#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009827_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009828
Michael W. Hudson54241132001-12-07 15:38:26 +00009829
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009830fi
9831
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009832# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009833echo "$as_me:$LINENO: checking size of off_t" >&5
9834echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9835if test "${ac_cv_sizeof_off_t+set}" = set; then
9836 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009837else
9838 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009839 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009840else
Martin v. Löwis11437992002-04-12 09:54:03 +00009841 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009842/* confdefs.h. */
9843_ACEOF
9844cat confdefs.h >>conftest.$ac_ext
9845cat >>conftest.$ac_ext <<_ACEOF
9846/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009847#include <stdio.h>
9848#include <sys/types.h>
9849main()
9850{
9851 FILE *f=fopen("conftestval", "w");
9852 if (!f) exit(1);
9853 fprintf(f, "%d\n", sizeof(off_t));
9854 exit(0);
9855}
Martin v. Löwis11437992002-04-12 09:54:03 +00009856_ACEOF
9857rm -f conftest$ac_exeext
9858if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9859 (eval $ac_link) 2>&5
9860 ac_status=$?
9861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9862 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9863 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9864 (eval $ac_try) 2>&5
9865 ac_status=$?
9866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9867 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009868 ac_cv_sizeof_off_t=`cat conftestval`
9869else
Martin v. Löwis11437992002-04-12 09:54:03 +00009870 echo "$as_me: program exited with status $ac_status" >&5
9871echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009872sed 's/^/| /' conftest.$ac_ext >&5
9873
Martin v. Löwis11437992002-04-12 09:54:03 +00009874( exit $ac_status )
9875ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009876fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00009877rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009878fi
9879
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009880fi
9881
Martin v. Löwis11437992002-04-12 09:54:03 +00009882echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9883echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9884
9885cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009886#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009887_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009888
Michael W. Hudson54241132001-12-07 15:38:26 +00009889
Martin v. Löwis11437992002-04-12 09:54:03 +00009890echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9891echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009892if test "$have_long_long" = yes -a \
9893 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9894 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009895
Martin v. Löwis11437992002-04-12 09:54:03 +00009896cat >>confdefs.h <<\_ACEOF
9897#define HAVE_LARGEFILE_SUPPORT 1
9898_ACEOF
9899
9900 echo "$as_me:$LINENO: result: yes" >&5
9901echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009902else
Martin v. Löwis11437992002-04-12 09:54:03 +00009903 echo "$as_me:$LINENO: result: no" >&5
9904echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009905fi
9906
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009907# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009908echo "$as_me:$LINENO: checking size of time_t" >&5
9909echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9910if test "${ac_cv_sizeof_time_t+set}" = set; then
9911 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009912else
9913 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009914 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +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 Rossumb9a22a12000-06-30 02:48:53 +00009922#include <stdio.h>
9923#include <time.h>
9924main()
9925{
9926 FILE *f=fopen("conftestval", "w");
9927 if (!f) exit(1);
9928 fprintf(f, "%d\n", sizeof(time_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 Rossumb9a22a12000-06-30 02:48:53 +00009943 ac_cv_sizeof_time_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_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +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 Rossumb9a22a12000-06-30 02:48:53 +00009953fi
9954
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009955fi
9956
Martin v. Löwis11437992002-04-12 09:54:03 +00009957echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9958echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9959
9960cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009961#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009962_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009963
Michael W. Hudson54241132001-12-07 15:38:26 +00009964
9965
Trent Mick635f6fb2000-08-23 21:33:05 +00009966# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009967ac_save_cc="$CC"
9968if test "$ac_cv_kpthread" = "yes"
9969then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009970elif test "$ac_cv_kthread" = "yes"
9971then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009972elif test "$ac_cv_pthread" = "yes"
9973then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009974fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009975echo "$as_me:$LINENO: checking for pthread_t" >&5
9976echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009977have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009978cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009979/* confdefs.h. */
9980_ACEOF
9981cat confdefs.h >>conftest.$ac_ext
9982cat >>conftest.$ac_ext <<_ACEOF
9983/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009984#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009985int
9986main ()
9987{
Guido van Rossum12580492000-09-24 16:47:19 +00009988pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009989 ;
9990 return 0;
9991}
9992_ACEOF
9993rm -f conftest.$ac_objext
9994if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +00009995 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009996 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009997 grep -v '^ *+' conftest.er1 >conftest.err
9998 rm -f conftest.er1
9999 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10001 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000010002 { ac_try='test -z "$ac_c_werror_flag"
10003 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010004 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10005 (eval $ac_try) 2>&5
10006 ac_status=$?
10007 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10008 (exit $ac_status); }; } &&
10009 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010010 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10011 (eval $ac_try) 2>&5
10012 ac_status=$?
10013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10014 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010015 have_pthread_t=yes
10016else
Martin v. Löwis11437992002-04-12 09:54:03 +000010017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010018sed 's/^/| /' conftest.$ac_ext >&5
10019
Trent Mick635f6fb2000-08-23 21:33:05 +000010020fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010021rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010022echo "$as_me:$LINENO: result: $have_pthread_t" >&5
10023echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010024if test "$have_pthread_t" = yes ; then
10025 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +000010026 echo "$as_me:$LINENO: checking size of pthread_t" >&5
10027echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
10028 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
10029 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000010030else
10031 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000010032 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000010033else
Martin v. Löwis11437992002-04-12 09:54:03 +000010034 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010035/* confdefs.h. */
10036_ACEOF
10037cat confdefs.h >>conftest.$ac_ext
10038cat >>conftest.$ac_ext <<_ACEOF
10039/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000010040#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010041#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000010042 main()
10043 {
10044 FILE *f=fopen("conftestval", "w");
10045 if (!f) exit(1);
10046 fprintf(f, "%d\n", sizeof(pthread_t));
10047 exit(0);
10048 }
Martin v. Löwis11437992002-04-12 09:54:03 +000010049_ACEOF
10050rm -f conftest$ac_exeext
10051if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
10052 (eval $ac_link) 2>&5
10053 ac_status=$?
10054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10055 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10056 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10057 (eval $ac_try) 2>&5
10058 ac_status=$?
10059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10060 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000010061 ac_cv_sizeof_pthread_t=`cat conftestval`
10062else
Martin v. Löwis11437992002-04-12 09:54:03 +000010063 echo "$as_me: program exited with status $ac_status" >&5
10064echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010065sed 's/^/| /' conftest.$ac_ext >&5
10066
Martin v. Löwis11437992002-04-12 09:54:03 +000010067( exit $ac_status )
10068ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000010069fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010070rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +000010071fi
10072
Trent Mick635f6fb2000-08-23 21:33:05 +000010073fi
10074
Martin v. Löwis11437992002-04-12 09:54:03 +000010075 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
10076echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
10077
10078cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010079#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010080_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000010081
10082fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000010083CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000010084
Martin v. Löwis11437992002-04-12 09:54:03 +000010085echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
10086echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010087# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
10088if test "${enable_toolbox_glue+set}" = set; then
10089 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +000010090
Martin v. Löwis11437992002-04-12 09:54:03 +000010091fi;
Jack Jansene578a632001-08-15 01:27:14 +000010092
10093if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000010094then
Jack Jansene578a632001-08-15 01:27:14 +000010095 case $ac_sys_system/$ac_sys_release in
10096 Darwin/*)
10097 enable_toolbox_glue="yes";;
10098 *)
10099 enable_toolbox_glue="no";;
10100 esac
10101fi
10102case "$enable_toolbox_glue" in
10103yes)
Jack Jansen666b1e72001-10-31 12:11:48 +000010104 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +000010105 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +000010106 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000010107
10108cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010109#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010110_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000010111
10112 ;;
10113*)
10114 extra_frameworks=""
10115 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000010116 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000010117 ;;
10118esac
Martin v. Löwis11437992002-04-12 09:54:03 +000010119echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
10120echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000010121
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010122
10123case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +000010124 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +000010125 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +000010126 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansenb36687a2004-07-16 08:43:47 +000010127 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010128 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000010129 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +000010130 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +000010131 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansenb36687a2004-07-16 08:43:47 +000010132 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010133 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010134esac
10135
Martin v. Löwis11437992002-04-12 09:54:03 +000010136echo "$as_me:$LINENO: checking for --enable-framework" >&5
10137echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010138if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010139then
Skip Montanarodecc6a42003-01-01 20:07:49 +000010140 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000010142 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010143
Martin v. Löwis11437992002-04-12 09:54:03 +000010144cat >>confdefs.h <<\_ACEOF
10145#define WITH_NEXT_FRAMEWORK 1
10146_ACEOF
10147
10148 echo "$as_me:$LINENO: result: yes" >&5
10149echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010150else
Martin v. Löwis11437992002-04-12 09:54:03 +000010151 echo "$as_me:$LINENO: result: no" >&5
10152echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010153fi
10154
Martin v. Löwis11437992002-04-12 09:54:03 +000010155echo "$as_me:$LINENO: checking for dyld" >&5
10156echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010157case $ac_sys_system/$ac_sys_release in
10158 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010159
Martin v. Löwis11437992002-04-12 09:54:03 +000010160cat >>confdefs.h <<\_ACEOF
10161#define WITH_DYLD 1
10162_ACEOF
10163
10164 echo "$as_me:$LINENO: result: always on for Darwin" >&5
10165echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010166 ;;
10167 *)
Martin v. Löwis11437992002-04-12 09:54:03 +000010168 echo "$as_me:$LINENO: result: no" >&5
10169echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +000010170 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000010171esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010172
Guido van Rossum0a516c91994-09-12 10:58:40 +000010173# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000010174
Michael W. Hudson54241132001-12-07 15:38:26 +000010175
10176
10177
10178
Guido van Rossum0a516c91994-09-12 10:58:40 +000010179# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000010180# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +000010181echo "$as_me:$LINENO: checking SO" >&5
10182echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010183if test -z "$SO"
10184then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010185 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +000010186 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010187 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000010188 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010189 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000010190else
10191 # this might also be a termcap variable, see #610332
10192 echo
10193 echo '====================================================================='
10194 echo '+ +'
10195 echo '+ WARNING: You have set SO in your environment. +'
10196 echo '+ Do you really mean to change the extension for shared libraries? +'
10197 echo '+ Continuing in 10 seconds to let you to ponder. +'
10198 echo '+ +'
10199 echo '====================================================================='
10200 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000010201fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010202echo "$as_me:$LINENO: result: $SO" >&5
10203echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010204# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000010205# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010206# (Shared libraries in this instance are shared modules to be loaded into
10207# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +000010208echo "$as_me:$LINENO: checking LDSHARED" >&5
10209echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010210if test -z "$LDSHARED"
10211then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010212 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010213 AIX*)
10214 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000010215 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010216 ;;
10217 BeOS*)
10218 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000010219 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010220 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000010221 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000010222 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010223 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000010224 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000010225 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000010226 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000010227 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010228 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +000010229 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000010230 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000010231 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10232 if test "$enable_framework" ; then
10233 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +000010234 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
10235 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000010236 else
10237 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000010238 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000010239 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010240 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000010241 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10242 if test "$enable_framework" ; then
10243 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +000010244 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
10245 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010246 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000010247 # No framework, use the Python app as bundle-loader
10248 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000010249 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010250 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000010251 Darwin/*)
10252 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
10253 # This allows an extension to be used in any Python
10254 if test ${MACOSX_DEPLOYMENT_TARGET-10.1} '>' 10.2
10255 then
10256 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
10257 BLDSHARED="$LDSHARED"
10258 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET
10259 else
10260 LDSHARED='$(CC) $(LDFLAGS) -bundle'
10261 if test "$enable_framework" ; then
10262 # Link against the framework. All externals should be defined.
10263 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
10264 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
10265 else
10266 # No framework, use the Python app as bundle-loader
10267 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
10268 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
10269 fi
10270 fi
10271 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +000010272 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000010273 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010274 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000010275 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000010276 then
10277 LDSHARED="cc -shared ${LDFLAGS}"
10278 else
10279 LDSHARED="ld -Bshareable ${LDFLAGS}"
10280 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +000010281 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010282 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010283 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010284 then LDSHARED='$(CC) -shared'
10285 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000010286 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000010287 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000010288 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000010289 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010290 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010291 *) LDSHARED="ld";;
10292 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010293fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010294echo "$as_me:$LINENO: result: $LDSHARED" >&5
10295echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010296BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000010297# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010298# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010299echo "$as_me:$LINENO: checking CCSHARED" >&5
10300echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010301if test -z "$CCSHARED"
10302then
Guido van Rossum07397971997-04-29 21:49:50 +000010303 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000010304 SunOS*) if test "$GCC" = yes;
10305 then CCSHARED="-fPIC";
10306 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000010307 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000010308 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000010309 else CCSHARED="+z";
10310 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010311 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010312 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +000010313 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010314 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000010315 if test "$GCC" = "yes"
10316 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010317 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000010318 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010319 SCO_SV*)
10320 if test "$GCC" = "yes"
10321 then CCSHARED="-fPIC"
10322 else CCSHARED="-Kpic -belf"
10323 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000010324 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010325 IRIX*/6*) case $CC in
10326 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000010327 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010328 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010329 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010330 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010331fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010332echo "$as_me:$LINENO: result: $CCSHARED" >&5
10333echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010334# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010335# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +000010336echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
10337echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010338if test -z "$LINKFORSHARED"
10339then
Guido van Rossum07397971997-04-29 21:49:50 +000010340 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000010341 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000010342 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000010343 LINKFORSHARED="-Wl,-E -Wl,+s";;
10344# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000010345 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010346 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000010347 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000010348 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +000010349 # -u __dummy makes the linker aware of the objc runtime
10350 # in System.framework; otherwise, __objcInit (referenced in
10351 # crt1.o) gets erroneously defined as common, which breaks dynamic
10352 # loading of any modules which reference it in System.framework.
10353 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
10354 # not used by the core itself but which needs to be in the core so
10355 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000010356 # -prebind is no longer used, because it actually seems to give a
10357 # slowdown in stead of a speedup, maybe due to the large number of
10358 # dynamic loads Python does.
10359 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +000010360 if test "$enable_framework"
10361 then
Jack Jansenb36687a2004-07-16 08:43:47 +000010362 LINKFORSHARED="$LINKFORSHARED -Wl,-F. -framework "'$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000010363 fi
10364 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000010365 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000010366 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000010367 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +000010368 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +000010369 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
10370 then
10371 LINKFORSHARED="-Wl,--export-dynamic"
10372 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010373 SunOS/5*) case $CC in
10374 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000010375 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000010376 then
10377 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000010378 fi;;
10379 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000010380 CYGWIN*)
10381 if test $enable_shared = "no"
10382 then
10383 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
10384 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000010385 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000010386fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010387echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
10388echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +000010389
Michael W. Hudson54241132001-12-07 15:38:26 +000010390
Martin v. Löwis11437992002-04-12 09:54:03 +000010391echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
10392echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010393if test ! "$LIBRARY" = "$LDLIBRARY"
10394then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000010395 case $ac_sys_system in
10396 CYGWIN*)
10397 # Cygwin needs CCSHARED when building extension DLLs
10398 # but not when building the interpreter DLL.
10399 CFLAGSFORSHARED='';;
10400 *)
10401 CFLAGSFORSHARED='$(CCSHARED)'
10402 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010403fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010404echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
10405echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000010406
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010407# SHLIBS are libraries (except -lc and -lm) to link to the python shared
10408# library (with --enable-shared).
10409# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010410# symbols, this must be set to $(LIBS) (expanded by make). We do this even
10411# if it is not required, since it creates a dependency of the shared library
10412# to LIBS. This, in turn, means that applications linking the shared libpython
10413# don't need to link LIBS explicitly. The default should be only changed
10414# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010415
10416echo "$as_me:$LINENO: checking SHLIBS" >&5
10417echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
10418case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010419 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000010420 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010421esac
10422echo "$as_me:$LINENO: result: $SHLIBS" >&5
10423echo "${ECHO_T}$SHLIBS" >&6
10424
10425
Guido van Rossum627b2d71993-12-24 10:39:16 +000010426# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000010427
10428echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
10429echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
10430if test "${ac_cv_lib_dl_dlopen+set}" = set; then
10431 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010432else
Martin v. Löwis11437992002-04-12 09:54:03 +000010433 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010434LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010435cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010436/* confdefs.h. */
10437_ACEOF
10438cat confdefs.h >>conftest.$ac_ext
10439cat >>conftest.$ac_ext <<_ACEOF
10440/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010441
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010442/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010443#ifdef __cplusplus
10444extern "C"
10445#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010446/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010447 builtin and then its argument prototype would still apply. */
10448char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010449int
10450main ()
10451{
10452dlopen ();
10453 ;
10454 return 0;
10455}
10456_ACEOF
10457rm -f conftest.$ac_objext conftest$ac_exeext
10458if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010459 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010460 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010461 grep -v '^ *+' conftest.er1 >conftest.err
10462 rm -f conftest.er1
10463 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010464 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10465 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000010466 { ac_try='test -z "$ac_c_werror_flag"
10467 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10469 (eval $ac_try) 2>&5
10470 ac_status=$?
10471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10472 (exit $ac_status); }; } &&
10473 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10475 (eval $ac_try) 2>&5
10476 ac_status=$?
10477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10478 (exit $ac_status); }; }; then
10479 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010480else
Martin v. Löwis11437992002-04-12 09:54:03 +000010481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010482sed 's/^/| /' conftest.$ac_ext >&5
10483
Martin v. Löwis11437992002-04-12 09:54:03 +000010484ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010485fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010486rm -f conftest.err conftest.$ac_objext \
10487 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010488LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010489fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010490echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
10491echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
10492if test $ac_cv_lib_dl_dlopen = yes; then
10493 cat >>confdefs.h <<_ACEOF
10494#define HAVE_LIBDL 1
10495_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010496
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010497 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000010498
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010499fi
10500 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000010501
10502echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
10503echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
10504if test "${ac_cv_lib_dld_shl_load+set}" = set; then
10505 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010506else
Martin v. Löwis11437992002-04-12 09:54:03 +000010507 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010508LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010509cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010510/* confdefs.h. */
10511_ACEOF
10512cat confdefs.h >>conftest.$ac_ext
10513cat >>conftest.$ac_ext <<_ACEOF
10514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010515
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010516/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010517#ifdef __cplusplus
10518extern "C"
10519#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010520/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010521 builtin and then its argument prototype would still apply. */
10522char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010523int
10524main ()
10525{
10526shl_load ();
10527 ;
10528 return 0;
10529}
10530_ACEOF
10531rm -f conftest.$ac_objext conftest$ac_exeext
10532if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010533 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010534 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010535 grep -v '^ *+' conftest.er1 >conftest.err
10536 rm -f conftest.er1
10537 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10539 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000010540 { ac_try='test -z "$ac_c_werror_flag"
10541 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10543 (eval $ac_try) 2>&5
10544 ac_status=$?
10545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10546 (exit $ac_status); }; } &&
10547 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10549 (eval $ac_try) 2>&5
10550 ac_status=$?
10551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10552 (exit $ac_status); }; }; then
10553 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010554else
Martin v. Löwis11437992002-04-12 09:54:03 +000010555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010556sed 's/^/| /' conftest.$ac_ext >&5
10557
Martin v. Löwis11437992002-04-12 09:54:03 +000010558ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000010559fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010560rm -f conftest.err conftest.$ac_objext \
10561 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010562LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000010563fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010564echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
10565echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
10566if test $ac_cv_lib_dld_shl_load = yes; then
10567 cat >>confdefs.h <<_ACEOF
10568#define HAVE_LIBDLD 1
10569_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000010570
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010571 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010572
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010573fi
10574 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000010575
10576# only check for sem_ini if thread support is requested
10577if test "$with_threads" = "yes" -o -z "$with_threads"; then
10578 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010579echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
10580if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010581 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010582else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010583 ac_func_search_save_LIBS=$LIBS
10584ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +000010585cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010586/* confdefs.h. */
10587_ACEOF
10588cat confdefs.h >>conftest.$ac_ext
10589cat >>conftest.$ac_ext <<_ACEOF
10590/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010591
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010592/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010593#ifdef __cplusplus
10594extern "C"
10595#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010596/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010597 builtin and then its argument prototype would still apply. */
10598char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010599int
10600main ()
10601{
10602sem_init ();
10603 ;
10604 return 0;
10605}
10606_ACEOF
10607rm -f conftest.$ac_objext conftest$ac_exeext
10608if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010609 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010610 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010611 grep -v '^ *+' conftest.er1 >conftest.err
10612 rm -f conftest.er1
10613 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10615 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000010616 { ac_try='test -z "$ac_c_werror_flag"
10617 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010618 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10619 (eval $ac_try) 2>&5
10620 ac_status=$?
10621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10622 (exit $ac_status); }; } &&
10623 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010624 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10625 (eval $ac_try) 2>&5
10626 ac_status=$?
10627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10628 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010629 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010630else
Martin v. Löwis11437992002-04-12 09:54:03 +000010631 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010632sed 's/^/| /' conftest.$ac_ext >&5
10633
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010634fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010635rm -f conftest.err conftest.$ac_objext \
10636 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010637if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010638 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010639 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10640 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010641/* confdefs.h. */
10642_ACEOF
10643cat confdefs.h >>conftest.$ac_ext
10644cat >>conftest.$ac_ext <<_ACEOF
10645/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010646
10647/* Override any gcc2 internal prototype to avoid an error. */
10648#ifdef __cplusplus
10649extern "C"
10650#endif
10651/* We use char because int might match the return type of a gcc2
10652 builtin and then its argument prototype would still apply. */
10653char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010654int
10655main ()
10656{
10657sem_init ();
10658 ;
10659 return 0;
10660}
Martin v. Löwis11437992002-04-12 09:54:03 +000010661_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010662rm -f conftest.$ac_objext conftest$ac_exeext
10663if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010664 (eval $ac_link) 2>conftest.er1
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010665 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010666 grep -v '^ *+' conftest.er1 >conftest.err
10667 rm -f conftest.er1
10668 cat conftest.err >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10670 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000010671 { ac_try='test -z "$ac_c_werror_flag"
10672 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010673 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10674 (eval $ac_try) 2>&5
10675 ac_status=$?
10676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10677 (exit $ac_status); }; } &&
10678 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10680 (eval $ac_try) 2>&5
10681 ac_status=$?
10682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10683 (exit $ac_status); }; }; then
10684 ac_cv_search_sem_init="-l$ac_lib"
10685break
10686else
10687 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010688sed 's/^/| /' conftest.$ac_ext >&5
10689
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010690fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010691rm -f conftest.err conftest.$ac_objext \
10692 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000010693 done
10694fi
10695LIBS=$ac_func_search_save_LIBS
10696fi
10697echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
10698echo "${ECHO_T}$ac_cv_search_sem_init" >&6
10699if test "$ac_cv_search_sem_init" != no; then
10700 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010701
Martin v. Löwis41933dd2002-03-21 15:10:58 +000010702fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000010703 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000010704 # posix4 on Solaris 2.6
10705 # pthread (first!) on Linux
10706fi
10707
Martin v. Löwis19d17342003-06-14 21:03:05 +000010708# check if we need libintl for locale functions
10709echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
10710echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
10711if test "${ac_cv_lib_intl_textdomain+set}" = set; then
10712 echo $ECHO_N "(cached) $ECHO_C" >&6
10713else
10714 ac_check_lib_save_LIBS=$LIBS
10715LIBS="-lintl $LIBS"
10716cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010717/* confdefs.h. */
10718_ACEOF
10719cat confdefs.h >>conftest.$ac_ext
10720cat >>conftest.$ac_ext <<_ACEOF
10721/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000010722
10723/* Override any gcc2 internal prototype to avoid an error. */
10724#ifdef __cplusplus
10725extern "C"
10726#endif
10727/* We use char because int might match the return type of a gcc2
10728 builtin and then its argument prototype would still apply. */
10729char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000010730int
10731main ()
10732{
10733textdomain ();
10734 ;
10735 return 0;
10736}
10737_ACEOF
10738rm -f conftest.$ac_objext conftest$ac_exeext
10739if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010740 (eval $ac_link) 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000010741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010742 grep -v '^ *+' conftest.er1 >conftest.err
10743 rm -f conftest.er1
10744 cat conftest.err >&5
Martin v. Löwis19d17342003-06-14 21:03:05 +000010745 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10746 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000010747 { ac_try='test -z "$ac_c_werror_flag"
10748 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010749 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10750 (eval $ac_try) 2>&5
10751 ac_status=$?
10752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10753 (exit $ac_status); }; } &&
10754 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis19d17342003-06-14 21:03:05 +000010755 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10756 (eval $ac_try) 2>&5
10757 ac_status=$?
10758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10759 (exit $ac_status); }; }; then
10760 ac_cv_lib_intl_textdomain=yes
10761else
10762 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010763sed 's/^/| /' conftest.$ac_ext >&5
10764
Martin v. Löwis19d17342003-06-14 21:03:05 +000010765ac_cv_lib_intl_textdomain=no
10766fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010767rm -f conftest.err conftest.$ac_objext \
10768 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000010769LIBS=$ac_check_lib_save_LIBS
10770fi
10771echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
10772echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
10773if test $ac_cv_lib_intl_textdomain = yes; then
10774
10775cat >>confdefs.h <<\_ACEOF
10776#define WITH_LIBINTL 1
10777_ACEOF
10778
10779fi
10780
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010781
10782# checks for system dependent C++ extensions support
10783case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +000010784 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
10785echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
10786 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010787/* confdefs.h. */
10788_ACEOF
10789cat confdefs.h >>conftest.$ac_ext
10790cat >>conftest.$ac_ext <<_ACEOF
10791/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010792#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000010793int
10794main ()
10795{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010796loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000010797 ;
10798 return 0;
10799}
10800_ACEOF
10801rm -f conftest.$ac_objext conftest$ac_exeext
10802if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010803 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010804 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010805 grep -v '^ *+' conftest.er1 >conftest.err
10806 rm -f conftest.er1
10807 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10809 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000010810 { ac_try='test -z "$ac_c_werror_flag"
10811 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010812 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10813 (eval $ac_try) 2>&5
10814 ac_status=$?
10815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10816 (exit $ac_status); }; } &&
10817 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10819 (eval $ac_try) 2>&5
10820 ac_status=$?
10821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10822 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010823
Martin v. Löwis11437992002-04-12 09:54:03 +000010824cat >>confdefs.h <<\_ACEOF
10825#define AIX_GENUINE_CPLUSPLUS 1
10826_ACEOF
10827
10828 echo "$as_me:$LINENO: result: yes" >&5
10829echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010830else
Martin v. Löwis11437992002-04-12 09:54:03 +000010831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010832sed 's/^/| /' conftest.$ac_ext >&5
10833
Martin v. Löwis11437992002-04-12 09:54:03 +000010834echo "$as_me:$LINENO: result: no" >&5
10835echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010836fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010837rm -f conftest.err conftest.$ac_objext \
10838 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010839 *) ;;
10840esac
10841
Guido van Rossum70c7f481998-03-26 18:44:10 +000010842# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010843# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +000010844echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
10845echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
10846if test "${ac_cv_lib_nsl_t_open+set}" = set; then
10847 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010848else
Martin v. Löwis11437992002-04-12 09:54:03 +000010849 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010850LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010851cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010852/* confdefs.h. */
10853_ACEOF
10854cat confdefs.h >>conftest.$ac_ext
10855cat >>conftest.$ac_ext <<_ACEOF
10856/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010857
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010858/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010859#ifdef __cplusplus
10860extern "C"
10861#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010862/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010863 builtin and then its argument prototype would still apply. */
10864char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010865int
10866main ()
10867{
10868t_open ();
10869 ;
10870 return 0;
10871}
10872_ACEOF
10873rm -f conftest.$ac_objext conftest$ac_exeext
10874if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010875 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010876 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010877 grep -v '^ *+' conftest.er1 >conftest.err
10878 rm -f conftest.er1
10879 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10881 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000010882 { ac_try='test -z "$ac_c_werror_flag"
10883 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10885 (eval $ac_try) 2>&5
10886 ac_status=$?
10887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10888 (exit $ac_status); }; } &&
10889 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010890 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10891 (eval $ac_try) 2>&5
10892 ac_status=$?
10893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10894 (exit $ac_status); }; }; then
10895 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010896else
Martin v. Löwis11437992002-04-12 09:54:03 +000010897 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010898sed 's/^/| /' conftest.$ac_ext >&5
10899
Martin v. Löwis11437992002-04-12 09:54:03 +000010900ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010901fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010902rm -f conftest.err conftest.$ac_objext \
10903 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010904LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010905fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010906echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
10907echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
10908if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010909 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010910fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010911 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000010912echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10913echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10914if test "${ac_cv_lib_socket_socket+set}" = set; then
10915 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010916else
Martin v. Löwis11437992002-04-12 09:54:03 +000010917 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010918LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010919cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010920/* confdefs.h. */
10921_ACEOF
10922cat confdefs.h >>conftest.$ac_ext
10923cat >>conftest.$ac_ext <<_ACEOF
10924/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010925
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010926/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010927#ifdef __cplusplus
10928extern "C"
10929#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010930/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010931 builtin and then its argument prototype would still apply. */
10932char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010933int
10934main ()
10935{
10936socket ();
10937 ;
10938 return 0;
10939}
10940_ACEOF
10941rm -f conftest.$ac_objext conftest$ac_exeext
10942if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000010943 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010944 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010945 grep -v '^ *+' conftest.er1 >conftest.err
10946 rm -f conftest.er1
10947 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10949 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000010950 { ac_try='test -z "$ac_c_werror_flag"
10951 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000010952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10953 (eval $ac_try) 2>&5
10954 ac_status=$?
10955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10956 (exit $ac_status); }; } &&
10957 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010958 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10959 (eval $ac_try) 2>&5
10960 ac_status=$?
10961 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10962 (exit $ac_status); }; }; then
10963 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010964else
Martin v. Löwis11437992002-04-12 09:54:03 +000010965 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010966sed 's/^/| /' conftest.$ac_ext >&5
10967
Martin v. Löwis11437992002-04-12 09:54:03 +000010968ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010969fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000010970rm -f conftest.err conftest.$ac_objext \
10971 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010972LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010973fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010974echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10975echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10976if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010977 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010978fi
10979 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010980
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010981case "$ac_sys_system" in
10982BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010983echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10984echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10985if test "${ac_cv_lib_net_socket+set}" = set; then
10986 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010987else
Martin v. Löwis11437992002-04-12 09:54:03 +000010988 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010989LIBS="-lnet $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 Rossumad678af1998-10-02 14:42:15 +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 Rossumad678af1998-10-02 14:42:15 +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); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +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_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +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_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +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 Rossumad678af1998-10-02 14:42:15 +000011044fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011045echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
11046echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
11047if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011048 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011049fi
11050 # BeOS
11051;;
11052esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000011053
Martin v. Löwis11437992002-04-12 09:54:03 +000011054echo "$as_me:$LINENO: checking for --with-libs" >&5
11055echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
11056
Guido van Rossuma68acba1996-07-31 17:36:39 +000011057# Check whether --with-libs or --without-libs was given.
11058if test "${with_libs+set}" = set; then
11059 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000011060
11061echo "$as_me:$LINENO: result: $withval" >&5
11062echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000011063LIBS="$withval $LIBS"
11064
11065else
Martin v. Löwis11437992002-04-12 09:54:03 +000011066 echo "$as_me:$LINENO: result: no" >&5
11067echo "${ECHO_T}no" >&6
11068fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000011069
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011070# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011071
11072
Martin v. Löwis11437992002-04-12 09:54:03 +000011073echo "$as_me:$LINENO: checking for --with-signal-module" >&5
11074echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
11075
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011076# Check whether --with-signal-module or --without-signal-module was given.
11077if test "${with_signal_module+set}" = set; then
11078 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011079
Martin v. Löwis11437992002-04-12 09:54:03 +000011080fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011081
11082if test -z "$with_signal_module"
11083then with_signal_module="yes"
11084fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011085echo "$as_me:$LINENO: result: $with_signal_module" >&5
11086echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000011087
11088if test "${with_signal_module}" = "yes"; then
11089 USE_SIGNAL_MODULE=""
11090 SIGNAL_OBJS=""
11091else
11092 USE_SIGNAL_MODULE="#"
11093 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
11094fi
11095
Guido van Rossum3d15bd82001-01-10 18:53:48 +000011096# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000011097
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011098USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000011099
Martin v. Löwis11437992002-04-12 09:54:03 +000011100echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
11101echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
11102
Guido van Rossumec2f0731997-01-22 20:54:01 +000011103
11104# Check whether --with-dec-threads or --without-dec-threads was given.
11105if test "${with_dec_threads+set}" = set; then
11106 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000011107
11108echo "$as_me:$LINENO: result: $withval" >&5
11109echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000011110LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000011111if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000011112 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000011113fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000011114else
Martin v. Löwis11437992002-04-12 09:54:03 +000011115 echo "$as_me:$LINENO: result: no" >&5
11116echo "${ECHO_T}no" >&6
11117fi;
11118
11119# Templates for things AC_DEFINEd more than once.
11120# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000011121
11122
Martin v. Löwis11437992002-04-12 09:54:03 +000011123
11124
11125
11126
11127
11128echo "$as_me:$LINENO: checking for --with-threads" >&5
11129echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
11130
Guido van Rossumec2f0731997-01-22 20:54:01 +000011131# Check whether --with-threads or --without-threads was given.
11132if test "${with_threads+set}" = set; then
11133 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000011134
Martin v. Löwis11437992002-04-12 09:54:03 +000011135fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000011136
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011137# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000011138
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011139# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011140if test "${with_thread+set}" = set; then
11141 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011142 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000011143fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011144
11145if test -z "$with_threads"
11146then with_threads="yes"
11147fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011148echo "$as_me:$LINENO: result: $with_threads" >&5
11149echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011150
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011151
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000011152if test "$with_threads" = "no"
11153then
11154 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011155elif test "$ac_cv_pthread_is_default" = yes
11156then
Martin v. Löwis11437992002-04-12 09:54:03 +000011157 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011158#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011159_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011160
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011161 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000011162 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011163#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011164_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011165
11166 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000011167 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011168elif test "$ac_cv_kpthread" = "yes"
11169then
11170 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011171 if test "$ac_cv_cxx_thread" = "yes"; then
11172 CXX="$CXX -Kpthread"
11173 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011174 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011175#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011176_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000011177
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011178 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011179 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011180elif test "$ac_cv_kthread" = "yes"
11181then
11182 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011183 if test "$ac_cv_cxx_thread" = "yes"; then
11184 CXX="$CXX -Kthread"
11185 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000011186 cat >>confdefs.h <<\_ACEOF
11187#define WITH_THREAD 1
11188_ACEOF
11189
11190 posix_threads=yes
11191 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011192elif test "$ac_cv_pthread" = "yes"
11193then
11194 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000011195 if test "$ac_cv_cxx_thread" = "yes"; then
11196 CXX="$CXX -pthread"
11197 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011198 cat >>confdefs.h <<\_ACEOF
11199#define WITH_THREAD 1
11200_ACEOF
11201
11202 posix_threads=yes
11203 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011204else
11205 if test ! -z "$with_threads" -a -d "$with_threads"
11206 then LDFLAGS="$LDFLAGS -L$with_threads"
11207 fi
11208 if test ! -z "$withval" -a -d "$withval"
11209 then LDFLAGS="$LDFLAGS -L$withval"
11210 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011211
11212 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000011213 # define _POSIX_THREADS in unistd.h. Some apparently don't
11214 # (e.g. gnu pth with pthread emulation)
Martin v. Löwis11437992002-04-12 09:54:03 +000011215 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
11216echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
11217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011218/* confdefs.h. */
11219_ACEOF
11220cat confdefs.h >>conftest.$ac_ext
11221cat >>conftest.$ac_ext <<_ACEOF
11222/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011223
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011224#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000011225#ifdef _POSIX_THREADS
11226yes
11227#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011228
11229_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011231 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011232 unistd_defines_pthreads=yes
11233else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011234 unistd_defines_pthreads=no
11235fi
11236rm -f conftest*
11237
Martin v. Löwis11437992002-04-12 09:54:03 +000011238 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
11239echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011240
Martin v. Löwis11437992002-04-12 09:54:03 +000011241 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011242#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011243_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000011244
Martin v. Löwis11437992002-04-12 09:54:03 +000011245 if test "${ac_cv_header_cthreads_h+set}" = set; then
11246 echo "$as_me:$LINENO: checking for cthreads.h" >&5
11247echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11248if test "${ac_cv_header_cthreads_h+set}" = set; then
11249 echo $ECHO_N "(cached) $ECHO_C" >&6
11250fi
11251echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11252echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011253else
Martin v. Löwis11437992002-04-12 09:54:03 +000011254 # Is the header compilable?
11255echo "$as_me:$LINENO: checking cthreads.h usability" >&5
11256echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
11257cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011258/* confdefs.h. */
11259_ACEOF
11260cat confdefs.h >>conftest.$ac_ext
11261cat >>conftest.$ac_ext <<_ACEOF
11262/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011263$ac_includes_default
11264#include <cthreads.h>
11265_ACEOF
11266rm -f conftest.$ac_objext
11267if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011268 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011269 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011270 grep -v '^ *+' conftest.er1 >conftest.err
11271 rm -f conftest.er1
11272 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11274 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000011275 { ac_try='test -z "$ac_c_werror_flag"
11276 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011277 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11278 (eval $ac_try) 2>&5
11279 ac_status=$?
11280 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11281 (exit $ac_status); }; } &&
11282 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11284 (eval $ac_try) 2>&5
11285 ac_status=$?
11286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11287 (exit $ac_status); }; }; then
11288 ac_header_compiler=yes
11289else
11290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011291sed 's/^/| /' conftest.$ac_ext >&5
11292
Martin v. Löwis11437992002-04-12 09:54:03 +000011293ac_header_compiler=no
11294fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011295rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011296echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11297echo "${ECHO_T}$ac_header_compiler" >&6
11298
11299# Is the header present?
11300echo "$as_me:$LINENO: checking cthreads.h presence" >&5
11301echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
11302cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011303/* confdefs.h. */
11304_ACEOF
11305cat confdefs.h >>conftest.$ac_ext
11306cat >>conftest.$ac_ext <<_ACEOF
11307/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011308#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011309_ACEOF
11310if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11311 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11312 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011313 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011314 rm -f conftest.er1
11315 cat conftest.err >&5
11316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11317 (exit $ac_status); } >/dev/null; then
11318 if test -s conftest.err; then
11319 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011320 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000011321 else
11322 ac_cpp_err=
11323 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011324else
Martin v. Löwis11437992002-04-12 09:54:03 +000011325 ac_cpp_err=yes
11326fi
11327if test -z "$ac_cpp_err"; then
11328 ac_header_preproc=yes
11329else
11330 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011331sed 's/^/| /' conftest.$ac_ext >&5
11332
Martin v. Löwis11437992002-04-12 09:54:03 +000011333 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011334fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011335rm -f conftest.err conftest.$ac_ext
11336echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11337echo "${ECHO_T}$ac_header_preproc" >&6
11338
11339# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011340case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11341 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000011342 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11343echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011344 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
11345echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
11346 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011347 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011348 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011349 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
11350echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011351 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
11352echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
11353 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
11354echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
11355 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
11356echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011357 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
11358echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011359 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
11360echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011361 (
11362 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +000011363## --------------------------------- ##
11364## Report this to the python lists. ##
11365## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011366_ASBOX
11367 ) |
11368 sed "s/^/$as_me: WARNING: /" >&2
11369 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011370esac
11371echo "$as_me:$LINENO: checking for cthreads.h" >&5
11372echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
11373if test "${ac_cv_header_cthreads_h+set}" = set; then
11374 echo $ECHO_N "(cached) $ECHO_C" >&6
11375else
11376 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011377fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011378echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
11379echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
11380
11381fi
11382if test $ac_cv_header_cthreads_h = yes; then
11383 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011384#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011385_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011386
Martin v. Löwis11437992002-04-12 09:54:03 +000011387 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011388#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011389_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011390
Martin v. Löwis11437992002-04-12 09:54:03 +000011391
11392cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011393#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011394_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011395
11396 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011397 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011398else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011399
Martin v. Löwis11437992002-04-12 09:54:03 +000011400 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11401 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11402echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11403if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11404 echo $ECHO_N "(cached) $ECHO_C" >&6
11405fi
11406echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11407echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011408else
Martin v. Löwis11437992002-04-12 09:54:03 +000011409 # Is the header compilable?
11410echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
11411echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
11412cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011413/* confdefs.h. */
11414_ACEOF
11415cat confdefs.h >>conftest.$ac_ext
11416cat >>conftest.$ac_ext <<_ACEOF
11417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011418$ac_includes_default
11419#include <mach/cthreads.h>
11420_ACEOF
11421rm -f conftest.$ac_objext
11422if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011423 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011425 grep -v '^ *+' conftest.er1 >conftest.err
11426 rm -f conftest.er1
11427 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11429 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000011430 { ac_try='test -z "$ac_c_werror_flag"
11431 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011432 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11433 (eval $ac_try) 2>&5
11434 ac_status=$?
11435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11436 (exit $ac_status); }; } &&
11437 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011438 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11439 (eval $ac_try) 2>&5
11440 ac_status=$?
11441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11442 (exit $ac_status); }; }; then
11443 ac_header_compiler=yes
11444else
11445 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011446sed 's/^/| /' conftest.$ac_ext >&5
11447
Martin v. Löwis11437992002-04-12 09:54:03 +000011448ac_header_compiler=no
11449fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011450rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011451echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11452echo "${ECHO_T}$ac_header_compiler" >&6
11453
11454# Is the header present?
11455echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
11456echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
11457cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011458/* confdefs.h. */
11459_ACEOF
11460cat confdefs.h >>conftest.$ac_ext
11461cat >>conftest.$ac_ext <<_ACEOF
11462/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011463#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011464_ACEOF
11465if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11466 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11467 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011468 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011469 rm -f conftest.er1
11470 cat conftest.err >&5
11471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11472 (exit $ac_status); } >/dev/null; then
11473 if test -s conftest.err; then
11474 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011475 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000011476 else
11477 ac_cpp_err=
11478 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011479else
Martin v. Löwis11437992002-04-12 09:54:03 +000011480 ac_cpp_err=yes
11481fi
11482if test -z "$ac_cpp_err"; then
11483 ac_header_preproc=yes
11484else
11485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011486sed 's/^/| /' conftest.$ac_ext >&5
11487
Martin v. Löwis11437992002-04-12 09:54:03 +000011488 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011489fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011490rm -f conftest.err conftest.$ac_ext
11491echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11492echo "${ECHO_T}$ac_header_preproc" >&6
11493
11494# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011495case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11496 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000011497 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11498echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011499 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
11500echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
11501 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011502 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011503 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011504 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
11505echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011506 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
11507echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
11508 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
11509echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
11510 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
11511echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011512 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
11513echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011514 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
11515echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011516 (
11517 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +000011518## --------------------------------- ##
11519## Report this to the python lists. ##
11520## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011521_ASBOX
11522 ) |
11523 sed "s/^/$as_me: WARNING: /" >&2
11524 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011525esac
11526echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
11527echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
11528if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
11529 echo $ECHO_N "(cached) $ECHO_C" >&6
11530else
11531 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011532fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011533echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
11534echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
11535
11536fi
11537if test $ac_cv_header_mach_cthreads_h = yes; then
11538 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011539#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011540_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011541
Martin v. Löwis11437992002-04-12 09:54:03 +000011542 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011543#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011544_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011545
Martin v. Löwis11437992002-04-12 09:54:03 +000011546
11547cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011548#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011549_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011550
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011551 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011552else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011553
Martin v. Löwis11437992002-04-12 09:54:03 +000011554 echo "$as_me:$LINENO: checking for --with-pth" >&5
11555echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
11556
11557# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011558if test "${with_pth+set}" = set; then
11559 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011560 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011561echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011562 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000011563#define WITH_THREAD 1
11564_ACEOF
11565
11566
11567cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011568#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011569_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011570
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011571 LIBS="-lpth $LIBS"
11572 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000011573else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000011574 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011575echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011576
11577 # Just looking for pthread_create in libpthread is not enough:
11578 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
11579 # So we really have to include pthread.h, and then link.
11580 _libs=$LIBS
11581 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000011582 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
11583echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
11584 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011585/* confdefs.h. */
11586_ACEOF
11587cat confdefs.h >>conftest.$ac_ext
11588cat >>conftest.$ac_ext <<_ACEOF
11589/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011590#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000011591
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011592void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000011593int
11594main ()
11595{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011596
11597pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000011598 ;
11599 return 0;
11600}
11601_ACEOF
11602rm -f conftest.$ac_objext conftest$ac_exeext
11603if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011604 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011605 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011606 grep -v '^ *+' conftest.er1 >conftest.err
11607 rm -f conftest.er1
11608 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11610 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000011611 { ac_try='test -z "$ac_c_werror_flag"
11612 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11614 (eval $ac_try) 2>&5
11615 ac_status=$?
11616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11617 (exit $ac_status); }; } &&
11618 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011619 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11620 (eval $ac_try) 2>&5
11621 ac_status=$?
11622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11623 (exit $ac_status); }; }; then
11624
11625 echo "$as_me:$LINENO: result: yes" >&5
11626echo "${ECHO_T}yes" >&6
11627 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011628#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011629_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000011630
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011631 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011632 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000011633else
Martin v. Löwis11437992002-04-12 09:54:03 +000011634 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011635sed 's/^/| /' conftest.$ac_ext >&5
11636
Martin v. Löwis11437992002-04-12 09:54:03 +000011637
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000011638 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000011639 echo "$as_me:$LINENO: checking for pthread_detach" >&5
11640echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
11641if test "${ac_cv_func_pthread_detach+set}" = set; then
11642 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000011643else
Martin v. Löwis11437992002-04-12 09:54:03 +000011644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011645/* confdefs.h. */
11646_ACEOF
11647cat confdefs.h >>conftest.$ac_ext
11648cat >>conftest.$ac_ext <<_ACEOF
11649/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000011650/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011651 which can conflict with char pthread_detach (); below.
11652 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011653 <limits.h> exists even on freestanding compilers. Under hpux,
11654 including <limits.h> includes <sys/time.h> and causes problems
11655 checking for functions defined therein. */
11656#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011657# include <limits.h>
11658#else
11659# include <assert.h>
11660#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011661/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011662#ifdef __cplusplus
11663extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011664{
Martin v. Löwis11437992002-04-12 09:54:03 +000011665#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000011666/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011667 builtin and then its argument prototype would still apply. */
11668char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000011669/* The GNU C library defines this for functions which it implements
11670 to always fail with ENOSYS. Some functions are actually named
11671 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000011672#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000011673choke me
11674#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011675char (*f) () = pthread_detach;
11676#endif
11677#ifdef __cplusplus
11678}
Guido van Rossumad678af1998-10-02 14:42:15 +000011679#endif
11680
Skip Montanaro6dead952003-09-25 14:50:04 +000011681int
11682main ()
11683{
11684return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000011685 ;
11686 return 0;
11687}
11688_ACEOF
11689rm -f conftest.$ac_objext conftest$ac_exeext
11690if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011691 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011692 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011693 grep -v '^ *+' conftest.er1 >conftest.err
11694 rm -f conftest.er1
11695 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11697 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000011698 { ac_try='test -z "$ac_c_werror_flag"
11699 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11701 (eval $ac_try) 2>&5
11702 ac_status=$?
11703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11704 (exit $ac_status); }; } &&
11705 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11707 (eval $ac_try) 2>&5
11708 ac_status=$?
11709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11710 (exit $ac_status); }; }; then
11711 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000011712else
Martin v. Löwis11437992002-04-12 09:54:03 +000011713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011714sed 's/^/| /' conftest.$ac_ext >&5
11715
Martin v. Löwis11437992002-04-12 09:54:03 +000011716ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000011717fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011718rm -f conftest.err conftest.$ac_objext \
11719 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000011720fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011721echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
11722echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
11723if test $ac_cv_func_pthread_detach = yes; then
11724 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011725#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011726_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000011727
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000011728 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011729 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000011730else
Guido van Rossumad678af1998-10-02 14:42:15 +000011731
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011732 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11733 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11734echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11735if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11736 echo $ECHO_N "(cached) $ECHO_C" >&6
11737fi
11738echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11739echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11740else
11741 # Is the header compilable?
11742echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
11743echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
11744cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011745/* confdefs.h. */
11746_ACEOF
11747cat confdefs.h >>conftest.$ac_ext
11748cat >>conftest.$ac_ext <<_ACEOF
11749/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011750$ac_includes_default
11751#include <atheos/threads.h>
11752_ACEOF
11753rm -f conftest.$ac_objext
11754if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011755 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011756 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011757 grep -v '^ *+' conftest.er1 >conftest.err
11758 rm -f conftest.er1
11759 cat conftest.err >&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11761 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000011762 { ac_try='test -z "$ac_c_werror_flag"
11763 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11765 (eval $ac_try) 2>&5
11766 ac_status=$?
11767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11768 (exit $ac_status); }; } &&
11769 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11771 (eval $ac_try) 2>&5
11772 ac_status=$?
11773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11774 (exit $ac_status); }; }; then
11775 ac_header_compiler=yes
11776else
11777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011778sed 's/^/| /' conftest.$ac_ext >&5
11779
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011780ac_header_compiler=no
11781fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011782rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011783echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11784echo "${ECHO_T}$ac_header_compiler" >&6
11785
11786# Is the header present?
11787echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
11788echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
11789cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011790/* confdefs.h. */
11791_ACEOF
11792cat confdefs.h >>conftest.$ac_ext
11793cat >>conftest.$ac_ext <<_ACEOF
11794/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011795#include <atheos/threads.h>
11796_ACEOF
11797if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11798 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11799 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011800 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011801 rm -f conftest.er1
11802 cat conftest.err >&5
11803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11804 (exit $ac_status); } >/dev/null; then
11805 if test -s conftest.err; then
11806 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011807 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011808 else
11809 ac_cpp_err=
11810 fi
11811else
11812 ac_cpp_err=yes
11813fi
11814if test -z "$ac_cpp_err"; then
11815 ac_header_preproc=yes
11816else
11817 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011818sed 's/^/| /' conftest.$ac_ext >&5
11819
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011820 ac_header_preproc=no
11821fi
11822rm -f conftest.err conftest.$ac_ext
11823echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11824echo "${ECHO_T}$ac_header_preproc" >&6
11825
11826# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011827case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11828 yes:no: )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011829 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
11830echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011831 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
11832echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
11833 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011834 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011835 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011836 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
11837echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011838 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
11839echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
11840 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
11841echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
11842 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
11843echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011844 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
11845echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011846 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
11847echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011848 (
11849 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +000011850## --------------------------------- ##
11851## Report this to the python lists. ##
11852## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011853_ASBOX
11854 ) |
11855 sed "s/^/$as_me: WARNING: /" >&2
11856 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011857esac
11858echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
11859echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
11860if test "${ac_cv_header_atheos_threads_h+set}" = set; then
11861 echo $ECHO_N "(cached) $ECHO_C" >&6
11862else
11863 ac_cv_header_atheos_threads_h=$ac_header_preproc
11864fi
11865echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
11866echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
11867
11868fi
11869if test $ac_cv_header_atheos_threads_h = yes; then
11870 cat >>confdefs.h <<\_ACEOF
11871#define WITH_THREAD 1
11872_ACEOF
11873
11874
11875cat >>confdefs.h <<\_ACEOF
11876#define ATHEOS_THREADS 1
11877_ACEOF
11878
11879 THREADOBJ="Python/thread.o"
11880else
11881
Martin v. Löwis11437992002-04-12 09:54:03 +000011882 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11883 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11884echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11885if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11886 echo $ECHO_N "(cached) $ECHO_C" >&6
11887fi
11888echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11889echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011890else
Martin v. Löwis11437992002-04-12 09:54:03 +000011891 # Is the header compilable?
11892echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
11893echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
11894cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011895/* confdefs.h. */
11896_ACEOF
11897cat confdefs.h >>conftest.$ac_ext
11898cat >>conftest.$ac_ext <<_ACEOF
11899/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011900$ac_includes_default
11901#include <kernel/OS.h>
11902_ACEOF
11903rm -f conftest.$ac_objext
11904if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000011905 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011906 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011907 grep -v '^ *+' conftest.er1 >conftest.err
11908 rm -f conftest.er1
11909 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11911 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000011912 { ac_try='test -z "$ac_c_werror_flag"
11913 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000011914 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11915 (eval $ac_try) 2>&5
11916 ac_status=$?
11917 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11918 (exit $ac_status); }; } &&
11919 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011920 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11921 (eval $ac_try) 2>&5
11922 ac_status=$?
11923 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11924 (exit $ac_status); }; }; then
11925 ac_header_compiler=yes
11926else
11927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011928sed 's/^/| /' conftest.$ac_ext >&5
11929
Martin v. Löwis11437992002-04-12 09:54:03 +000011930ac_header_compiler=no
11931fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000011932rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011933echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11934echo "${ECHO_T}$ac_header_compiler" >&6
11935
11936# Is the header present?
11937echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
11938echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
11939cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011940/* confdefs.h. */
11941_ACEOF
11942cat confdefs.h >>conftest.$ac_ext
11943cat >>conftest.$ac_ext <<_ACEOF
11944/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011945#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011946_ACEOF
11947if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11948 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11949 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011950 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011951 rm -f conftest.er1
11952 cat conftest.err >&5
11953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11954 (exit $ac_status); } >/dev/null; then
11955 if test -s conftest.err; then
11956 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000011957 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000011958 else
11959 ac_cpp_err=
11960 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011961else
Martin v. Löwis11437992002-04-12 09:54:03 +000011962 ac_cpp_err=yes
11963fi
11964if test -z "$ac_cpp_err"; then
11965 ac_header_preproc=yes
11966else
11967 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011968sed 's/^/| /' conftest.$ac_ext >&5
11969
Martin v. Löwis11437992002-04-12 09:54:03 +000011970 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011971fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011972rm -f conftest.err conftest.$ac_ext
11973echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11974echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011975
Martin v. Löwis11437992002-04-12 09:54:03 +000011976# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011977case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
11978 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000011979 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
11980echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011981 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
11982echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
11983 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011984 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000011985 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011986 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
11987echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011988 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
11989echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
11990 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
11991echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
11992 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
11993echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011994 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
11995echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000011996 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
11997echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011998 (
11999 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +000012000## --------------------------------- ##
12001## Report this to the python lists. ##
12002## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000012003_ASBOX
12004 ) |
12005 sed "s/^/$as_me: WARNING: /" >&2
12006 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012007esac
12008echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
12009echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
12010if test "${ac_cv_header_kernel_OS_h+set}" = set; then
12011 echo $ECHO_N "(cached) $ECHO_C" >&6
12012else
12013 ac_cv_header_kernel_OS_h=$ac_header_preproc
12014fi
12015echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
12016echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
12017
12018fi
12019if test $ac_cv_header_kernel_OS_h = yes; then
12020 cat >>confdefs.h <<\_ACEOF
12021#define WITH_THREAD 1
12022_ACEOF
12023
12024
12025cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012026#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012027_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012028
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012029 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012030else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000012031
Martin v. Löwis11437992002-04-12 09:54:03 +000012032 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
12033echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
12034if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
12035 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012036else
Martin v. Löwis11437992002-04-12 09:54:03 +000012037 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012038LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012039cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012040/* confdefs.h. */
12041_ACEOF
12042cat confdefs.h >>conftest.$ac_ext
12043cat >>conftest.$ac_ext <<_ACEOF
12044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012045
Greg Steinadf63d62000-07-05 10:38:09 +000012046/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012047#ifdef __cplusplus
12048extern "C"
12049#endif
Greg Steinadf63d62000-07-05 10:38:09 +000012050/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012051 builtin and then its argument prototype would still apply. */
12052char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012053int
12054main ()
12055{
12056pthread_create ();
12057 ;
12058 return 0;
12059}
12060_ACEOF
12061rm -f conftest.$ac_objext conftest$ac_exeext
12062if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012063 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012065 grep -v '^ *+' conftest.er1 >conftest.err
12066 rm -f conftest.er1
12067 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12069 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000012070 { ac_try='test -z "$ac_c_werror_flag"
12071 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12073 (eval $ac_try) 2>&5
12074 ac_status=$?
12075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12076 (exit $ac_status); }; } &&
12077 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012078 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12079 (eval $ac_try) 2>&5
12080 ac_status=$?
12081 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12082 (exit $ac_status); }; }; then
12083 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000012084else
Martin v. Löwis11437992002-04-12 09:54:03 +000012085 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012086sed 's/^/| /' conftest.$ac_ext >&5
12087
Martin v. Löwis11437992002-04-12 09:54:03 +000012088ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000012089fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012090rm -f conftest.err conftest.$ac_objext \
12091 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012092LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012093fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012094echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
12095echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
12096if test $ac_cv_lib_pthreads_pthread_create = yes; then
12097 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012098#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012099_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000012100
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012101 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012102 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012103 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000012104else
Greg Steinadf63d62000-07-05 10:38:09 +000012105
Martin v. Löwis11437992002-04-12 09:54:03 +000012106 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
12107echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
12108if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
12109 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000012110else
Martin v. Löwis11437992002-04-12 09:54:03 +000012111 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000012112LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012113cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012114/* confdefs.h. */
12115_ACEOF
12116cat confdefs.h >>conftest.$ac_ext
12117cat >>conftest.$ac_ext <<_ACEOF
12118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012119
Guido van Rossum49545951997-12-02 19:28:29 +000012120/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012121#ifdef __cplusplus
12122extern "C"
12123#endif
Guido van Rossum49545951997-12-02 19:28:29 +000012124/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012125 builtin and then its argument prototype would still apply. */
12126char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012127int
12128main ()
12129{
12130pthread_create ();
12131 ;
12132 return 0;
12133}
12134_ACEOF
12135rm -f conftest.$ac_objext conftest$ac_exeext
12136if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012137 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012138 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012139 grep -v '^ *+' conftest.er1 >conftest.err
12140 rm -f conftest.er1
12141 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12143 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000012144 { ac_try='test -z "$ac_c_werror_flag"
12145 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012146 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12147 (eval $ac_try) 2>&5
12148 ac_status=$?
12149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12150 (exit $ac_status); }; } &&
12151 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12153 (eval $ac_try) 2>&5
12154 ac_status=$?
12155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12156 (exit $ac_status); }; }; then
12157 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000012158else
Martin v. Löwis11437992002-04-12 09:54:03 +000012159 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012160sed 's/^/| /' conftest.$ac_ext >&5
12161
Martin v. Löwis11437992002-04-12 09:54:03 +000012162ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000012163fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012164rm -f conftest.err conftest.$ac_objext \
12165 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012166LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000012167fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012168echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
12169echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
12170if test $ac_cv_lib_c_r_pthread_create = yes; then
12171 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012172#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012173_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000012174
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012175 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012176 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012177 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012178else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012179
Martin v. Löwis11437992002-04-12 09:54:03 +000012180 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
12181echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
12182if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
12183 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012184else
Martin v. Löwis11437992002-04-12 09:54:03 +000012185 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012186LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012187cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012188/* confdefs.h. */
12189_ACEOF
12190cat confdefs.h >>conftest.$ac_ext
12191cat >>conftest.$ac_ext <<_ACEOF
12192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012193
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012194/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012195#ifdef __cplusplus
12196extern "C"
12197#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012198/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012199 builtin and then its argument prototype would still apply. */
12200char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012201int
12202main ()
12203{
12204__pthread_create_system ();
12205 ;
12206 return 0;
12207}
12208_ACEOF
12209rm -f conftest.$ac_objext conftest$ac_exeext
12210if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012211 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012213 grep -v '^ *+' conftest.er1 >conftest.err
12214 rm -f conftest.er1
12215 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12217 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000012218 { ac_try='test -z "$ac_c_werror_flag"
12219 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012220 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12221 (eval $ac_try) 2>&5
12222 ac_status=$?
12223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12224 (exit $ac_status); }; } &&
12225 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012226 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12227 (eval $ac_try) 2>&5
12228 ac_status=$?
12229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12230 (exit $ac_status); }; }; then
12231 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012232else
Martin v. Löwis11437992002-04-12 09:54:03 +000012233 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012234sed 's/^/| /' conftest.$ac_ext >&5
12235
Martin v. Löwis11437992002-04-12 09:54:03 +000012236ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012237fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012238rm -f conftest.err conftest.$ac_objext \
12239 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012240LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012241fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012242echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
12243echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
12244if test $ac_cv_lib_pthread___pthread_create_system = yes; then
12245 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012246#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012247_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012248
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012249 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012250 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012251 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012252else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000012253
Martin v. Löwis11437992002-04-12 09:54:03 +000012254 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
12255echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
12256if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
12257 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000012258else
Martin v. Löwis11437992002-04-12 09:54:03 +000012259 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012260LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012261cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012262/* confdefs.h. */
12263_ACEOF
12264cat confdefs.h >>conftest.$ac_ext
12265cat >>conftest.$ac_ext <<_ACEOF
12266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012267
Guido van Rossumb93a8621998-05-07 13:27:32 +000012268/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012269#ifdef __cplusplus
12270extern "C"
12271#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000012272/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012273 builtin and then its argument prototype would still apply. */
12274char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012275int
12276main ()
12277{
12278pthread_create ();
12279 ;
12280 return 0;
12281}
12282_ACEOF
12283rm -f conftest.$ac_objext conftest$ac_exeext
12284if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012285 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012287 grep -v '^ *+' conftest.er1 >conftest.err
12288 rm -f conftest.er1
12289 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12291 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000012292 { ac_try='test -z "$ac_c_werror_flag"
12293 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012294 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12295 (eval $ac_try) 2>&5
12296 ac_status=$?
12297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12298 (exit $ac_status); }; } &&
12299 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012300 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12301 (eval $ac_try) 2>&5
12302 ac_status=$?
12303 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12304 (exit $ac_status); }; }; then
12305 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000012306else
Martin v. Löwis11437992002-04-12 09:54:03 +000012307 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012308sed 's/^/| /' conftest.$ac_ext >&5
12309
Martin v. Löwis11437992002-04-12 09:54:03 +000012310ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000012311fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012312rm -f conftest.err conftest.$ac_objext \
12313 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012314LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000012315fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012316echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
12317echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
12318if test $ac_cv_lib_cma_pthread_create = yes; then
12319 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012320#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012321_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000012322
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012323 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000012324 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012325 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000012326else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000012327
Martin v. Löwis130fb172001-07-19 11:00:41 +000012328 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000012329fi
12330
Guido van Rossum627b2d71993-12-24 10:39:16 +000012331
Guido van Rossum7b3853f1996-07-30 18:09:35 +000012332fi
12333
Guido van Rossum0be3e491997-05-22 20:33:33 +000012334fi
12335
Guido van Rossum49545951997-12-02 19:28:29 +000012336fi
12337
Guido van Rossumb93a8621998-05-07 13:27:32 +000012338fi
12339
Guido van Rossum07bd90e2000-05-08 13:41:38 +000012340
Michael W. Hudson54241132001-12-07 15:38:26 +000012341fi
12342
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012343
12344fi
12345
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012346fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012347rm -f conftest.err conftest.$ac_objext \
12348 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012349fi;
12350fi
12351
12352
12353fi
12354
Martin v. Löwisa6e97582002-01-01 18:41:33 +000012355
Michael W. Hudson54241132001-12-07 15:38:26 +000012356
Martin v. Löwis11437992002-04-12 09:54:03 +000012357 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
12358echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
12359if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
12360 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012361else
Martin v. Löwis11437992002-04-12 09:54:03 +000012362 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012363LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012364cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012365/* confdefs.h. */
12366_ACEOF
12367cat confdefs.h >>conftest.$ac_ext
12368cat >>conftest.$ac_ext <<_ACEOF
12369/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012370
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012371/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012372#ifdef __cplusplus
12373extern "C"
12374#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012375/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012376 builtin and then its argument prototype would still apply. */
12377char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012378int
12379main ()
12380{
12381usconfig ();
12382 ;
12383 return 0;
12384}
12385_ACEOF
12386rm -f conftest.$ac_objext conftest$ac_exeext
12387if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012388 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012390 grep -v '^ *+' conftest.er1 >conftest.err
12391 rm -f conftest.er1
12392 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012393 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12394 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000012395 { ac_try='test -z "$ac_c_werror_flag"
12396 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12398 (eval $ac_try) 2>&5
12399 ac_status=$?
12400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12401 (exit $ac_status); }; } &&
12402 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012403 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12404 (eval $ac_try) 2>&5
12405 ac_status=$?
12406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12407 (exit $ac_status); }; }; then
12408 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012409else
Martin v. Löwis11437992002-04-12 09:54:03 +000012410 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012411sed 's/^/| /' conftest.$ac_ext >&5
12412
Martin v. Löwis11437992002-04-12 09:54:03 +000012413ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012414fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012415rm -f conftest.err conftest.$ac_objext \
12416 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012417LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012418fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012419echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
12420echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
12421if test $ac_cv_lib_mpc_usconfig = yes; then
12422 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012423#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012424_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012425
Martin v. Löwis130fb172001-07-19 11:00:41 +000012426 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012427 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000012428 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012429fi
12430
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012431
Neal Norwitza978ab02002-11-02 16:58:05 +000012432 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012433 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
12434echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
12435if test "${ac_cv_lib_thread_thr_create+set}" = set; then
12436 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012437else
Martin v. Löwis11437992002-04-12 09:54:03 +000012438 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012439LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000012440cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012441/* confdefs.h. */
12442_ACEOF
12443cat confdefs.h >>conftest.$ac_ext
12444cat >>conftest.$ac_ext <<_ACEOF
12445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012446
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012447/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012448#ifdef __cplusplus
12449extern "C"
12450#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012451/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012452 builtin and then its argument prototype would still apply. */
12453char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000012454int
12455main ()
12456{
12457thr_create ();
12458 ;
12459 return 0;
12460}
12461_ACEOF
12462rm -f conftest.$ac_objext conftest$ac_exeext
12463if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012464 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012465 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012466 grep -v '^ *+' conftest.er1 >conftest.err
12467 rm -f conftest.er1
12468 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12470 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000012471 { ac_try='test -z "$ac_c_werror_flag"
12472 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012473 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12474 (eval $ac_try) 2>&5
12475 ac_status=$?
12476 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12477 (exit $ac_status); }; } &&
12478 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012479 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12480 (eval $ac_try) 2>&5
12481 ac_status=$?
12482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12483 (exit $ac_status); }; }; then
12484 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012485else
Martin v. Löwis11437992002-04-12 09:54:03 +000012486 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012487sed 's/^/| /' conftest.$ac_ext >&5
12488
Martin v. Löwis11437992002-04-12 09:54:03 +000012489ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000012490fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012491rm -f conftest.err conftest.$ac_objext \
12492 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012493LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012494fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012495echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
12496echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
12497if test $ac_cv_lib_thread_thr_create = yes; then
12498 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012499#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012500_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000012501
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012502 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000012503 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012504 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000012505fi
12506
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000012507 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000012508
Martin v. Löwis130fb172001-07-19 11:00:41 +000012509 if test "$USE_THREAD_MODULE" != "#"
12510 then
12511 # If the above checks didn't disable threads, (at least) OSF1
12512 # needs this '-threads' argument during linking.
12513 case $ac_sys_system in
12514 OSF1) LDLAST=-threads;;
12515 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000012516 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012517fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012518
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012519if test "$posix_threads" = "yes"; then
12520 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012521
12522cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012523#define _POSIX_THREADS 1
12524_ACEOF
12525
12526 fi
12527
12528 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
12529 case $ac_sys_system/$ac_sys_release in
12530 SunOS/5.6)
12531cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012532#define HAVE_PTHREAD_DESTRUCTOR 1
12533_ACEOF
12534
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012535 ;;
12536 SunOS/5.8)
12537cat >>confdefs.h <<\_ACEOF
12538#define HAVE_BROKEN_POSIX_SEMAPHORES 1
12539_ACEOF
12540
12541 ;;
12542 esac
12543
12544 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
12545echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
12546 if test "${ac_cv_pthread_system_supported+set}" = set; then
12547 echo $ECHO_N "(cached) $ECHO_C" >&6
12548else
12549 if test "$cross_compiling" = yes; then
12550 ac_cv_pthread_system_supported=no
12551else
12552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012553/* confdefs.h. */
12554_ACEOF
12555cat confdefs.h >>conftest.$ac_ext
12556cat >>conftest.$ac_ext <<_ACEOF
12557/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012558#include <pthread.h>
12559 void *foo(void *parm) {
12560 return NULL;
12561 }
12562 main() {
12563 pthread_attr_t attr;
12564 pthread_t id;
12565 if (pthread_attr_init(&attr)) exit(-1);
12566 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
12567 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
12568 exit(0);
12569 }
12570_ACEOF
12571rm -f conftest$ac_exeext
12572if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12573 (eval $ac_link) 2>&5
12574 ac_status=$?
12575 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12576 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12578 (eval $ac_try) 2>&5
12579 ac_status=$?
12580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12581 (exit $ac_status); }; }; then
12582 ac_cv_pthread_system_supported=yes
12583else
12584 echo "$as_me: program exited with status $ac_status" >&5
12585echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012586sed 's/^/| /' conftest.$ac_ext >&5
12587
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012588( exit $ac_status )
12589ac_cv_pthread_system_supported=no
12590fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012591rm -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 +000012592fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000012593
Guido van Rossum627b2d71993-12-24 10:39:16 +000012594fi
12595
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012596 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
12597echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
12598 if test "$ac_cv_pthread_system_supported" = "yes"; then
12599
12600cat >>confdefs.h <<\_ACEOF
12601#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
12602_ACEOF
12603
12604 fi
12605
12606for ac_func in pthread_sigmask
12607do
12608as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12609echo "$as_me:$LINENO: checking for $ac_func" >&5
12610echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12611if eval "test \"\${$as_ac_var+set}\" = set"; then
12612 echo $ECHO_N "(cached) $ECHO_C" >&6
12613else
12614 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012615/* confdefs.h. */
12616_ACEOF
12617cat confdefs.h >>conftest.$ac_ext
12618cat >>conftest.$ac_ext <<_ACEOF
12619/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012620/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012621 which can conflict with char $ac_func (); below.
12622 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012623 <limits.h> exists even on freestanding compilers. Under hpux,
12624 including <limits.h> includes <sys/time.h> and causes problems
12625 checking for functions defined therein. */
12626#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012627# include <limits.h>
12628#else
12629# include <assert.h>
12630#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012631/* Override any gcc2 internal prototype to avoid an error. */
12632#ifdef __cplusplus
12633extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012634{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012635#endif
12636/* We use char because int might match the return type of a gcc2
12637 builtin and then its argument prototype would still apply. */
12638char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012639/* The GNU C library defines this for functions which it implements
12640 to always fail with ENOSYS. Some functions are actually named
12641 something starting with __ and the normal name is an alias. */
12642#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12643choke me
12644#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012645char (*f) () = $ac_func;
12646#endif
12647#ifdef __cplusplus
12648}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012649#endif
12650
Skip Montanaro6dead952003-09-25 14:50:04 +000012651int
12652main ()
12653{
12654return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012655 ;
12656 return 0;
12657}
12658_ACEOF
12659rm -f conftest.$ac_objext conftest$ac_exeext
12660if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012661 (eval $ac_link) 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012663 grep -v '^ *+' conftest.er1 >conftest.err
12664 rm -f conftest.er1
12665 cat conftest.err >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12667 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000012668 { ac_try='test -z "$ac_c_werror_flag"
12669 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12671 (eval $ac_try) 2>&5
12672 ac_status=$?
12673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12674 (exit $ac_status); }; } &&
12675 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12677 (eval $ac_try) 2>&5
12678 ac_status=$?
12679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12680 (exit $ac_status); }; }; then
12681 eval "$as_ac_var=yes"
12682else
12683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012684sed 's/^/| /' conftest.$ac_ext >&5
12685
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012686eval "$as_ac_var=no"
12687fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012688rm -f conftest.err conftest.$ac_objext \
12689 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012690fi
12691echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12692echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12693if test `eval echo '${'$as_ac_var'}'` = yes; then
12694 cat >>confdefs.h <<_ACEOF
12695#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12696_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000012697 case $ac_sys_system in
12698 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012699
Jason Tishlerfac083d2003-07-22 15:20:49 +000012700cat >>confdefs.h <<\_ACEOF
12701#define HAVE_BROKEN_PTHREAD_SIGMASK 1
12702_ACEOF
12703
12704 ;;
12705 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012706fi
12707done
12708
12709fi
12710
12711
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012712# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000012713
12714
12715echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
12716echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012717# Check whether --enable-ipv6 or --disable-ipv6 was given.
12718if test "${enable_ipv6+set}" = set; then
12719 enableval="$enable_ipv6"
12720 case "$enableval" in
12721 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000012722 echo "$as_me:$LINENO: result: no" >&5
12723echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012724 ipv6=no
12725 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012726 *) echo "$as_me:$LINENO: result: yes" >&5
12727echo "${ECHO_T}yes" >&6
12728 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012729#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012730_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012731
12732 ipv6=yes
12733 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012734 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012735else
Martin v. Löwis11437992002-04-12 09:54:03 +000012736
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012737 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012738 echo "$as_me:$LINENO: result: no" >&5
12739echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012740 ipv6=no
12741
12742else
Martin v. Löwis11437992002-04-12 09:54:03 +000012743 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012744/* confdefs.h. */
12745_ACEOF
12746cat confdefs.h >>conftest.$ac_ext
12747cat >>conftest.$ac_ext <<_ACEOF
12748/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012749 /* AF_INET6 available check */
12750#include <sys/types.h>
12751#include <sys/socket.h>
12752main()
12753{
12754 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
12755 exit(1);
12756 else
12757 exit(0);
12758}
12759
Martin v. Löwis11437992002-04-12 09:54:03 +000012760_ACEOF
12761rm -f conftest$ac_exeext
12762if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
12763 (eval $ac_link) 2>&5
12764 ac_status=$?
12765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12766 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12767 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12768 (eval $ac_try) 2>&5
12769 ac_status=$?
12770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12771 (exit $ac_status); }; }; then
12772 echo "$as_me:$LINENO: result: yes" >&5
12773echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012774 ipv6=yes
12775else
Martin v. Löwis11437992002-04-12 09:54:03 +000012776 echo "$as_me: program exited with status $ac_status" >&5
12777echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012778sed 's/^/| /' conftest.$ac_ext >&5
12779
Martin v. Löwis11437992002-04-12 09:54:03 +000012780( exit $ac_status )
12781echo "$as_me:$LINENO: result: no" >&5
12782echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012783 ipv6=no
12784fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012785rm -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 +000012786fi
12787
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012788if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012789 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
12790echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
12791 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012792/* confdefs.h. */
12793_ACEOF
12794cat confdefs.h >>conftest.$ac_ext
12795cat >>conftest.$ac_ext <<_ACEOF
12796/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012797#include <sys/types.h>
12798#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012799int
12800main ()
12801{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012802struct sockaddr_in6 x;
12803x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000012804 ;
12805 return 0;
12806}
12807_ACEOF
12808rm -f conftest.$ac_objext
12809if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000012810 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012811 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012812 grep -v '^ *+' conftest.er1 >conftest.err
12813 rm -f conftest.er1
12814 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12816 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000012817 { ac_try='test -z "$ac_c_werror_flag"
12818 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000012819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12820 (eval $ac_try) 2>&5
12821 ac_status=$?
12822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12823 (exit $ac_status); }; } &&
12824 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012825 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12826 (eval $ac_try) 2>&5
12827 ac_status=$?
12828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12829 (exit $ac_status); }; }; then
12830 echo "$as_me:$LINENO: result: yes" >&5
12831echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012832 ipv6=yes
12833else
Martin v. Löwis11437992002-04-12 09:54:03 +000012834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012835sed 's/^/| /' conftest.$ac_ext >&5
12836
Martin v. Löwis11437992002-04-12 09:54:03 +000012837echo "$as_me:$LINENO: result: no" >&5
12838echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012839 ipv6=no
12840fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000012841rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012842fi
12843
12844if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012845 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012846#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012847_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000012848
12849fi
12850
Martin v. Löwis11437992002-04-12 09:54:03 +000012851fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012852
12853ipv6type=unknown
12854ipv6lib=none
12855ipv6trylibc=no
12856
12857if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012858 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
12859echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000012860 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
12861 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012862 case $i in
12863 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000012864 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012865/* confdefs.h. */
12866_ACEOF
12867cat confdefs.h >>conftest.$ac_ext
12868cat >>conftest.$ac_ext <<_ACEOF
12869/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012870
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012871#include <netinet/in.h>
12872#ifdef IPV6_INRIA_VERSION
12873yes
12874#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012875_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012876if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012877 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012878 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012879fi
12880rm -f conftest*
12881
12882 ;;
12883 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000012884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012885/* confdefs.h. */
12886_ACEOF
12887cat confdefs.h >>conftest.$ac_ext
12888cat >>conftest.$ac_ext <<_ACEOF
12889/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012890
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012891#include <netinet/in.h>
12892#ifdef __KAME__
12893yes
12894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012895_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012896if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012897 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012898 ipv6type=$i;
12899 ipv6lib=inet6
12900 ipv6libdir=/usr/local/v6/lib
12901 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012902fi
12903rm -f conftest*
12904
12905 ;;
12906 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000012907 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012908/* confdefs.h. */
12909_ACEOF
12910cat confdefs.h >>conftest.$ac_ext
12911cat >>conftest.$ac_ext <<_ACEOF
12912/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012913
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012914#include <features.h>
12915#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
12916yes
12917#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012918_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012919if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012920 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012921 ipv6type=$i;
12922 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012923fi
12924rm -f conftest*
12925
12926 ;;
12927 linux-inet6)
12928 if test -d /usr/inet6; then
12929 ipv6type=$i
12930 ipv6lib=inet6
12931 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000012932 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012933 fi
12934 ;;
12935 solaris)
12936 if test -f /etc/netconfig; then
12937 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
12938 ipv6type=$i
12939 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012940 fi
12941 fi
12942 ;;
12943 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000012944 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012945/* confdefs.h. */
12946_ACEOF
12947cat confdefs.h >>conftest.$ac_ext
12948cat >>conftest.$ac_ext <<_ACEOF
12949/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012950
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012951#include <sys/param.h>
12952#ifdef _TOSHIBA_INET6
12953yes
12954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012955_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012956if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012957 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012958 ipv6type=$i;
12959 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012960 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012961fi
12962rm -f conftest*
12963
12964 ;;
12965 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000012966 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012967/* confdefs.h. */
12968_ACEOF
12969cat confdefs.h >>conftest.$ac_ext
12970cat >>conftest.$ac_ext <<_ACEOF
12971/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012972
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012973#include </usr/local/v6/include/sys/v6config.h>
12974#ifdef __V6D__
12975yes
12976#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012977_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012978if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012979 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012980 ipv6type=$i;
12981 ipv6lib=v6;
12982 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000012983 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012984fi
12985rm -f conftest*
12986
12987 ;;
12988 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000012989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012990/* confdefs.h. */
12991_ACEOF
12992cat confdefs.h >>conftest.$ac_ext
12993cat >>conftest.$ac_ext <<_ACEOF
12994/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012995
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012996#include <sys/param.h>
12997#ifdef _ZETA_MINAMI_INET6
12998yes
12999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013000_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013001if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000013002 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013003 ipv6type=$i;
13004 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000013005 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013006fi
13007rm -f conftest*
13008
13009 ;;
13010 esac
13011 if test "$ipv6type" != "unknown"; then
13012 break
13013 fi
13014 done
Martin v. Löwis11437992002-04-12 09:54:03 +000013015 echo "$as_me:$LINENO: result: $ipv6type" >&5
13016echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000013017fi
13018
13019if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
13020 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
13021 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
13022 echo "using lib$ipv6lib"
13023 else
13024 if test $ipv6trylibc = "yes"; then
13025 echo "using libc"
13026 else
13027 echo 'Fatal: no $ipv6lib library found. cannot continue.'
13028 echo "You need to fetch lib$ipv6lib.a from appropriate"
13029 echo 'ipv6 kit and compile beforehand.'
13030 exit 1
13031 fi
13032 fi
13033fi
13034
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000013035# Check for --with-doc-strings
13036echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
13037echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
13038
13039# Check whether --with-doc-strings or --without-doc-strings was given.
13040if test "${with_doc_strings+set}" = set; then
13041 withval="$with_doc_strings"
13042
13043fi;
13044
13045if test -z "$with_doc_strings"
13046then with_doc_strings="yes"
13047fi
13048if test "$with_doc_strings" != "no"
13049then
13050
13051cat >>confdefs.h <<\_ACEOF
13052#define WITH_DOC_STRINGS 1
13053_ACEOF
13054
13055fi
13056echo "$as_me:$LINENO: result: $with_doc_strings" >&5
13057echo "${ECHO_T}$with_doc_strings" >&6
13058
Neil Schemenauera35c6882001-02-27 04:45:05 +000013059# Check for Python-specific malloc support
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000013060echo "$as_me:$LINENO: checking for --with-tsc" >&5
13061echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6
13062
13063# Check whether --with-tsc or --without-tsc was given.
13064if test "${with_tsc+set}" = set; then
13065 withval="$with_tsc"
13066
13067if test "$withval" != no
13068then
13069
13070cat >>confdefs.h <<\_ACEOF
13071#define WITH_TSC 1
13072_ACEOF
13073
13074 echo "$as_me:$LINENO: result: yes" >&5
13075echo "${ECHO_T}yes" >&6
13076else echo "$as_me:$LINENO: result: no" >&5
13077echo "${ECHO_T}no" >&6
13078fi
13079else
13080 echo "$as_me:$LINENO: result: no" >&5
13081echo "${ECHO_T}no" >&6
13082fi;
13083
13084# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000013085echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
13086echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
13087
Neil Schemenauera35c6882001-02-27 04:45:05 +000013088# Check whether --with-pymalloc or --without-pymalloc was given.
13089if test "${with_pymalloc+set}" = set; then
13090 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000013091
Martin v. Löwis11437992002-04-12 09:54:03 +000013092fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000013093
Neil Schemenauer16c22972002-03-22 15:34:49 +000013094if test -z "$with_pymalloc"
13095then with_pymalloc="yes"
13096fi
13097if test "$with_pymalloc" != "no"
13098then
Martin v. Löwis11437992002-04-12 09:54:03 +000013099
13100cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013101#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013102_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000013103
13104fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013105echo "$as_me:$LINENO: result: $with_pymalloc" >&5
13106echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000013107
Barry Warsawef82cd72000-06-30 16:21:01 +000013108# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013109echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
13110echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
13111
Barry Warsawef82cd72000-06-30 16:21:01 +000013112# Check whether --with-wctype-functions or --without-wctype-functions was given.
13113if test "${with_wctype_functions+set}" = set; then
13114 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000013115
Barry Warsawef82cd72000-06-30 16:21:01 +000013116if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000013117then
13118
13119cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000013120#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013121_ACEOF
13122
13123 echo "$as_me:$LINENO: result: yes" >&5
13124echo "${ECHO_T}yes" >&6
13125else echo "$as_me:$LINENO: result: no" >&5
13126echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000013127fi
13128else
Martin v. Löwis11437992002-04-12 09:54:03 +000013129 echo "$as_me:$LINENO: result: no" >&5
13130echo "${ECHO_T}no" >&6
13131fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000013132
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013133# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000013134
Guido van Rossum98935bf2001-09-05 19:13:16 +000013135DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000013136
Guido van Rossume97ee181999-12-20 21:27:22 +000013137# the dlopen() function means we might want to use dynload_shlib.o. some
13138# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000013139
Thomas Wouters3a584202000-08-05 23:28:51 +000013140for ac_func in dlopen
13141do
Martin v. Löwis11437992002-04-12 09:54:03 +000013142as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13143echo "$as_me:$LINENO: checking for $ac_func" >&5
13144echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13145if eval "test \"\${$as_ac_var+set}\" = set"; then
13146 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013147else
Martin v. Löwis11437992002-04-12 09:54:03 +000013148 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013149/* confdefs.h. */
13150_ACEOF
13151cat confdefs.h >>conftest.$ac_ext
13152cat >>conftest.$ac_ext <<_ACEOF
13153/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000013154/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013155 which can conflict with char $ac_func (); below.
13156 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013157 <limits.h> exists even on freestanding compilers. Under hpux,
13158 including <limits.h> includes <sys/time.h> and causes problems
13159 checking for functions defined therein. */
13160#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013161# include <limits.h>
13162#else
13163# include <assert.h>
13164#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013165/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013166#ifdef __cplusplus
13167extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013168{
Martin v. Löwis11437992002-04-12 09:54:03 +000013169#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000013170/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013171 builtin and then its argument prototype would still apply. */
13172char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000013173/* The GNU C library defines this for functions which it implements
13174 to always fail with ENOSYS. Some functions are actually named
13175 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013176#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000013177choke me
13178#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013179char (*f) () = $ac_func;
13180#endif
13181#ifdef __cplusplus
13182}
Guido van Rossume97ee181999-12-20 21:27:22 +000013183#endif
13184
Skip Montanaro6dead952003-09-25 14:50:04 +000013185int
13186main ()
13187{
13188return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013189 ;
13190 return 0;
13191}
13192_ACEOF
13193rm -f conftest.$ac_objext conftest$ac_exeext
13194if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013195 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013197 grep -v '^ *+' conftest.er1 >conftest.err
13198 rm -f conftest.er1
13199 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13201 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013202 { ac_try='test -z "$ac_c_werror_flag"
13203 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13205 (eval $ac_try) 2>&5
13206 ac_status=$?
13207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13208 (exit $ac_status); }; } &&
13209 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13211 (eval $ac_try) 2>&5
13212 ac_status=$?
13213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13214 (exit $ac_status); }; }; then
13215 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013216else
Martin v. Löwis11437992002-04-12 09:54:03 +000013217 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013218sed 's/^/| /' conftest.$ac_ext >&5
13219
Martin v. Löwis11437992002-04-12 09:54:03 +000013220eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013221fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013222rm -f conftest.err conftest.$ac_objext \
13223 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013224fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013225echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13226echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13227if test `eval echo '${'$as_ac_var'}'` = yes; then
13228 cat >>confdefs.h <<_ACEOF
13229#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13230_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013231
Guido van Rossume97ee181999-12-20 21:27:22 +000013232fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013233done
Guido van Rossume97ee181999-12-20 21:27:22 +000013234
Michael W. Hudson54241132001-12-07 15:38:26 +000013235
Guido van Rossume97ee181999-12-20 21:27:22 +000013236# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
13237# loading of modules.
13238
Martin v. Löwis11437992002-04-12 09:54:03 +000013239echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
13240echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013241if test -z "$DYNLOADFILE"
13242then
13243 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000013244 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
13245 if test "$ac_cv_func_dlopen" = yes
13246 then DYNLOADFILE="dynload_shlib.o"
13247 else DYNLOADFILE="dynload_aix.o"
13248 fi
13249 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000013250 BeOS*) DYNLOADFILE="dynload_beos.o";;
13251 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000013252 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013253 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000013254 *)
13255 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
13256 # out any dynamic loading
13257 if test "$ac_cv_func_dlopen" = yes
13258 then DYNLOADFILE="dynload_shlib.o"
13259 else DYNLOADFILE="dynload_stub.o"
13260 fi
13261 ;;
13262 esac
13263fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013264echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
13265echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000013266if test "$DYNLOADFILE" != "dynload_stub.o"
13267then
Martin v. Löwis11437992002-04-12 09:54:03 +000013268
13269cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013270#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013271_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000013272
13273fi
13274
Neil Schemenauer4e425612001-06-19 15:44:15 +000013275# MACHDEP_OBJS can be set to platform-specific object files needed by Python
13276
Michael W. Hudson54241132001-12-07 15:38:26 +000013277
Martin v. Löwis11437992002-04-12 09:54:03 +000013278echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
13279echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013280if test -z "$MACHDEP_OBJS"
13281then
Jack Jansene578a632001-08-15 01:27:14 +000013282 MACHDEP_OBJS=$extra_machdep_objs
13283else
13284 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000013285fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013286echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
13287echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000013288
Guido van Rossum627b2d71993-12-24 10:39:16 +000013289# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013290
13291
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314
13315
13316
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330
13331
13332
13333
13334
13335
13336
13337
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350
13351
13352
13353
13354
13355
13356
13357
13358
13359
13360
Martin v. Löwisd6320502004-08-12 13:45:08 +000013361
13362for ac_func in alarm bind_textdomain_codeset chown clock confstr ctermid \
13363 execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013364 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000013365 getpriority getpwent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000013366 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000013367 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000013368 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000013369 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000013370 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000013371 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000013372 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000013373 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000013374do
Martin v. Löwis11437992002-04-12 09:54:03 +000013375as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13376echo "$as_me:$LINENO: checking for $ac_func" >&5
13377echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13378if eval "test \"\${$as_ac_var+set}\" = set"; then
13379 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013380else
Martin v. Löwis11437992002-04-12 09:54:03 +000013381 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013382/* confdefs.h. */
13383_ACEOF
13384cat confdefs.h >>conftest.$ac_ext
13385cat >>conftest.$ac_ext <<_ACEOF
13386/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013387/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013388 which can conflict with char $ac_func (); below.
13389 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013390 <limits.h> exists even on freestanding compilers. Under hpux,
13391 including <limits.h> includes <sys/time.h> and causes problems
13392 checking for functions defined therein. */
13393#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013394# include <limits.h>
13395#else
13396# include <assert.h>
13397#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013398/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013399#ifdef __cplusplus
13400extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013401{
Martin v. Löwis11437992002-04-12 09:54:03 +000013402#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013403/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013404 builtin and then its argument prototype would still apply. */
13405char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013406/* The GNU C library defines this for functions which it implements
13407 to always fail with ENOSYS. Some functions are actually named
13408 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013409#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013410choke me
13411#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013412char (*f) () = $ac_func;
13413#endif
13414#ifdef __cplusplus
13415}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013416#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013417
Skip Montanaro6dead952003-09-25 14:50:04 +000013418int
13419main ()
13420{
13421return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013422 ;
13423 return 0;
13424}
13425_ACEOF
13426rm -f conftest.$ac_objext conftest$ac_exeext
13427if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013428 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013429 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013430 grep -v '^ *+' conftest.er1 >conftest.err
13431 rm -f conftest.er1
13432 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13434 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013435 { ac_try='test -z "$ac_c_werror_flag"
13436 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013437 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13438 (eval $ac_try) 2>&5
13439 ac_status=$?
13440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13441 (exit $ac_status); }; } &&
13442 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013443 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13444 (eval $ac_try) 2>&5
13445 ac_status=$?
13446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13447 (exit $ac_status); }; }; then
13448 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013449else
Martin v. Löwis11437992002-04-12 09:54:03 +000013450 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013451sed 's/^/| /' conftest.$ac_ext >&5
13452
Martin v. Löwis11437992002-04-12 09:54:03 +000013453eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013454fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013455rm -f conftest.err conftest.$ac_objext \
13456 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013457fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013458echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13459echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13460if test `eval echo '${'$as_ac_var'}'` = yes; then
13461 cat >>confdefs.h <<_ACEOF
13462#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13463_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013464
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013465fi
13466done
13467
Michael W. Hudson54241132001-12-07 15:38:26 +000013468
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013469# For some functions, having a definition is not sufficient, since
13470# we want to take their address.
13471echo "$as_me:$LINENO: checking for chroot" >&5
13472echo $ECHO_N "checking for chroot... $ECHO_C" >&6
13473cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013474/* confdefs.h. */
13475_ACEOF
13476cat confdefs.h >>conftest.$ac_ext
13477cat >>conftest.$ac_ext <<_ACEOF
13478/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013479#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013480int
13481main ()
13482{
13483void *x=chroot
13484 ;
13485 return 0;
13486}
13487_ACEOF
13488rm -f conftest.$ac_objext
13489if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013490 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013491 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013492 grep -v '^ *+' conftest.er1 >conftest.err
13493 rm -f conftest.er1
13494 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13496 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013497 { ac_try='test -z "$ac_c_werror_flag"
13498 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013499 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13500 (eval $ac_try) 2>&5
13501 ac_status=$?
13502 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13503 (exit $ac_status); }; } &&
13504 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013505 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13506 (eval $ac_try) 2>&5
13507 ac_status=$?
13508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13509 (exit $ac_status); }; }; then
13510
13511cat >>confdefs.h <<\_ACEOF
13512#define HAVE_CHROOT 1
13513_ACEOF
13514
13515 echo "$as_me:$LINENO: result: yes" >&5
13516echo "${ECHO_T}yes" >&6
13517else
13518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013519sed 's/^/| /' conftest.$ac_ext >&5
13520
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013521echo "$as_me:$LINENO: result: no" >&5
13522echo "${ECHO_T}no" >&6
13523
13524fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013525rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013526echo "$as_me:$LINENO: checking for link" >&5
13527echo $ECHO_N "checking for link... $ECHO_C" >&6
13528cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013529/* confdefs.h. */
13530_ACEOF
13531cat confdefs.h >>conftest.$ac_ext
13532cat >>conftest.$ac_ext <<_ACEOF
13533/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013534#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013535int
13536main ()
13537{
13538void *x=link
13539 ;
13540 return 0;
13541}
13542_ACEOF
13543rm -f conftest.$ac_objext
13544if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013545 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013546 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013547 grep -v '^ *+' conftest.er1 >conftest.err
13548 rm -f conftest.er1
13549 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13551 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013552 { ac_try='test -z "$ac_c_werror_flag"
13553 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13555 (eval $ac_try) 2>&5
13556 ac_status=$?
13557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13558 (exit $ac_status); }; } &&
13559 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013560 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13561 (eval $ac_try) 2>&5
13562 ac_status=$?
13563 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13564 (exit $ac_status); }; }; then
13565
13566cat >>confdefs.h <<\_ACEOF
13567#define HAVE_LINK 1
13568_ACEOF
13569
13570 echo "$as_me:$LINENO: result: yes" >&5
13571echo "${ECHO_T}yes" >&6
13572else
13573 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013574sed 's/^/| /' conftest.$ac_ext >&5
13575
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013576echo "$as_me:$LINENO: result: no" >&5
13577echo "${ECHO_T}no" >&6
13578
13579fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013580rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013581echo "$as_me:$LINENO: checking for symlink" >&5
13582echo $ECHO_N "checking for symlink... $ECHO_C" >&6
13583cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013584/* confdefs.h. */
13585_ACEOF
13586cat confdefs.h >>conftest.$ac_ext
13587cat >>conftest.$ac_ext <<_ACEOF
13588/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013589#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013590int
13591main ()
13592{
13593void *x=symlink
13594 ;
13595 return 0;
13596}
13597_ACEOF
13598rm -f conftest.$ac_objext
13599if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013600 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013602 grep -v '^ *+' conftest.er1 >conftest.err
13603 rm -f conftest.er1
13604 cat conftest.err >&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13606 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013607 { ac_try='test -z "$ac_c_werror_flag"
13608 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013609 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13610 (eval $ac_try) 2>&5
13611 ac_status=$?
13612 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13613 (exit $ac_status); }; } &&
13614 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013615 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13616 (eval $ac_try) 2>&5
13617 ac_status=$?
13618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13619 (exit $ac_status); }; }; then
13620
13621cat >>confdefs.h <<\_ACEOF
13622#define HAVE_SYMLINK 1
13623_ACEOF
13624
13625 echo "$as_me:$LINENO: result: yes" >&5
13626echo "${ECHO_T}yes" >&6
13627else
13628 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013629sed 's/^/| /' conftest.$ac_ext >&5
13630
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013631echo "$as_me:$LINENO: result: no" >&5
13632echo "${ECHO_T}no" >&6
13633
13634fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013635rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013636echo "$as_me:$LINENO: checking for fchdir" >&5
13637echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
13638cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013639/* confdefs.h. */
13640_ACEOF
13641cat confdefs.h >>conftest.$ac_ext
13642cat >>conftest.$ac_ext <<_ACEOF
13643/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013644#include <unistd.h>
13645int
13646main ()
13647{
13648void *x=fchdir
13649 ;
13650 return 0;
13651}
13652_ACEOF
13653rm -f conftest.$ac_objext
13654if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013655 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013657 grep -v '^ *+' conftest.er1 >conftest.err
13658 rm -f conftest.er1
13659 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013660 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13661 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013662 { ac_try='test -z "$ac_c_werror_flag"
13663 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13665 (eval $ac_try) 2>&5
13666 ac_status=$?
13667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13668 (exit $ac_status); }; } &&
13669 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013670 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13671 (eval $ac_try) 2>&5
13672 ac_status=$?
13673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13674 (exit $ac_status); }; }; then
13675
13676cat >>confdefs.h <<\_ACEOF
13677#define HAVE_FCHDIR 1
13678_ACEOF
13679
13680 echo "$as_me:$LINENO: result: yes" >&5
13681echo "${ECHO_T}yes" >&6
13682else
13683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013684sed 's/^/| /' conftest.$ac_ext >&5
13685
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013686echo "$as_me:$LINENO: result: no" >&5
13687echo "${ECHO_T}no" >&6
13688
13689fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013690rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013691echo "$as_me:$LINENO: checking for fsync" >&5
13692echo $ECHO_N "checking for fsync... $ECHO_C" >&6
13693cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013694/* confdefs.h. */
13695_ACEOF
13696cat confdefs.h >>conftest.$ac_ext
13697cat >>conftest.$ac_ext <<_ACEOF
13698/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013699#include <unistd.h>
13700int
13701main ()
13702{
13703void *x=fsync
13704 ;
13705 return 0;
13706}
13707_ACEOF
13708rm -f conftest.$ac_objext
13709if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013710 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013711 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013712 grep -v '^ *+' conftest.er1 >conftest.err
13713 rm -f conftest.er1
13714 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13716 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013717 { ac_try='test -z "$ac_c_werror_flag"
13718 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013719 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13720 (eval $ac_try) 2>&5
13721 ac_status=$?
13722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13723 (exit $ac_status); }; } &&
13724 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13726 (eval $ac_try) 2>&5
13727 ac_status=$?
13728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13729 (exit $ac_status); }; }; then
13730
13731cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013732#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013733_ACEOF
13734
13735 echo "$as_me:$LINENO: result: yes" >&5
13736echo "${ECHO_T}yes" >&6
13737else
13738 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013739sed 's/^/| /' conftest.$ac_ext >&5
13740
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013741echo "$as_me:$LINENO: result: no" >&5
13742echo "${ECHO_T}no" >&6
13743
13744fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013745rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013746echo "$as_me:$LINENO: checking for fdatasync" >&5
13747echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
13748cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013749/* confdefs.h. */
13750_ACEOF
13751cat confdefs.h >>conftest.$ac_ext
13752cat >>conftest.$ac_ext <<_ACEOF
13753/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013754#include <unistd.h>
13755int
13756main ()
13757{
13758void *x=fdatasync
13759 ;
13760 return 0;
13761}
13762_ACEOF
13763rm -f conftest.$ac_objext
13764if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013765 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013767 grep -v '^ *+' conftest.er1 >conftest.err
13768 rm -f conftest.er1
13769 cat conftest.err >&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13771 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013772 { ac_try='test -z "$ac_c_werror_flag"
13773 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13775 (eval $ac_try) 2>&5
13776 ac_status=$?
13777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13778 (exit $ac_status); }; } &&
13779 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013780 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13781 (eval $ac_try) 2>&5
13782 ac_status=$?
13783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13784 (exit $ac_status); }; }; then
13785
13786cat >>confdefs.h <<\_ACEOF
13787#define HAVE_FDATASYNC 1
13788_ACEOF
13789
13790 echo "$as_me:$LINENO: result: yes" >&5
13791echo "${ECHO_T}yes" >&6
13792else
13793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013794sed 's/^/| /' conftest.$ac_ext >&5
13795
Martin v. Löwisa64988c2003-09-20 15:30:20 +000013796echo "$as_me:$LINENO: result: no" >&5
13797echo "${ECHO_T}no" >&6
13798
13799fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013800rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000013801
Martin v. Löwisd5843682002-11-21 20:41:28 +000013802# On some systems (eg. FreeBSD 5), we would find a definition of the
13803# functions ctermid_r, setgroups in the library, but no prototype
13804# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
13805# address to avoid compiler warnings and potential miscompilations
13806# because of the missing prototypes.
13807
13808echo "$as_me:$LINENO: checking for ctermid_r" >&5
13809echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
13810cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013811/* confdefs.h. */
13812_ACEOF
13813cat confdefs.h >>conftest.$ac_ext
13814cat >>conftest.$ac_ext <<_ACEOF
13815/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013816
13817#include "confdefs.h"
13818#include <stdio.h>
13819
Martin v. Löwisd5843682002-11-21 20:41:28 +000013820int
13821main ()
13822{
13823void* p = ctermid_r
13824 ;
13825 return 0;
13826}
13827_ACEOF
13828rm -f conftest.$ac_objext
13829if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013830 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000013831 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013832 grep -v '^ *+' conftest.er1 >conftest.err
13833 rm -f conftest.er1
13834 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000013835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13836 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013837 { ac_try='test -z "$ac_c_werror_flag"
13838 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013839 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13840 (eval $ac_try) 2>&5
13841 ac_status=$?
13842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13843 (exit $ac_status); }; } &&
13844 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000013845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13846 (eval $ac_try) 2>&5
13847 ac_status=$?
13848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13849 (exit $ac_status); }; }; then
13850
13851cat >>confdefs.h <<\_ACEOF
13852#define HAVE_CTERMID_R 1
13853_ACEOF
13854
13855 echo "$as_me:$LINENO: result: yes" >&5
13856echo "${ECHO_T}yes" >&6
13857else
13858 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013859sed 's/^/| /' conftest.$ac_ext >&5
13860
Martin v. Löwisd5843682002-11-21 20:41:28 +000013861echo "$as_me:$LINENO: result: no" >&5
13862echo "${ECHO_T}no" >&6
13863
13864fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013865rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000013866
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013867echo "$as_me:$LINENO: checking for flock" >&5
13868echo $ECHO_N "checking for flock... $ECHO_C" >&6
13869cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013870/* confdefs.h. */
13871_ACEOF
13872cat confdefs.h >>conftest.$ac_ext
13873cat >>conftest.$ac_ext <<_ACEOF
13874/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013875
13876#include "confdefs.h"
13877#include <sys/file.h>
13878
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013879int
13880main ()
13881{
13882void* p = flock
13883 ;
13884 return 0;
13885}
13886_ACEOF
13887rm -f conftest.$ac_objext
13888if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013889 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013890 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013891 grep -v '^ *+' conftest.er1 >conftest.err
13892 rm -f conftest.er1
13893 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13895 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013896 { ac_try='test -z "$ac_c_werror_flag"
13897 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013898 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13899 (eval $ac_try) 2>&5
13900 ac_status=$?
13901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13902 (exit $ac_status); }; } &&
13903 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13905 (eval $ac_try) 2>&5
13906 ac_status=$?
13907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13908 (exit $ac_status); }; }; then
13909
13910cat >>confdefs.h <<\_ACEOF
13911#define HAVE_FLOCK 1
13912_ACEOF
13913
13914 echo "$as_me:$LINENO: result: yes" >&5
13915echo "${ECHO_T}yes" >&6
13916else
13917 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013918sed 's/^/| /' conftest.$ac_ext >&5
13919
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013920echo "$as_me:$LINENO: result: no" >&5
13921echo "${ECHO_T}no" >&6
13922
13923fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013924rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013925
13926echo "$as_me:$LINENO: checking for getpagesize" >&5
13927echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
13928cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013929/* confdefs.h. */
13930_ACEOF
13931cat confdefs.h >>conftest.$ac_ext
13932cat >>conftest.$ac_ext <<_ACEOF
13933/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013934
13935#include "confdefs.h"
13936#include <unistd.h>
13937
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013938int
13939main ()
13940{
13941void* p = getpagesize
13942 ;
13943 return 0;
13944}
13945_ACEOF
13946rm -f conftest.$ac_objext
13947if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000013948 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013949 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013950 grep -v '^ *+' conftest.er1 >conftest.err
13951 rm -f conftest.er1
13952 cat conftest.err >&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13954 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000013955 { ac_try='test -z "$ac_c_werror_flag"
13956 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000013957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13958 (eval $ac_try) 2>&5
13959 ac_status=$?
13960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13961 (exit $ac_status); }; } &&
13962 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13964 (eval $ac_try) 2>&5
13965 ac_status=$?
13966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13967 (exit $ac_status); }; }; then
13968
13969cat >>confdefs.h <<\_ACEOF
13970#define HAVE_GETPAGESIZE 1
13971_ACEOF
13972
13973 echo "$as_me:$LINENO: result: yes" >&5
13974echo "${ECHO_T}yes" >&6
13975else
13976 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013977sed 's/^/| /' conftest.$ac_ext >&5
13978
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013979echo "$as_me:$LINENO: result: no" >&5
13980echo "${ECHO_T}no" >&6
13981
13982fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000013983rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000013984
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013985for ac_prog in true
13986do
13987 # Extract the first word of "$ac_prog", so it can be a program name with args.
13988set dummy $ac_prog; ac_word=$2
13989echo "$as_me:$LINENO: checking for $ac_word" >&5
13990echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
13991if test "${ac_cv_prog_TRUE+set}" = set; then
13992 echo $ECHO_N "(cached) $ECHO_C" >&6
13993else
13994 if test -n "$TRUE"; then
13995 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
13996else
13997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13998for as_dir in $PATH
13999do
14000 IFS=$as_save_IFS
14001 test -z "$as_dir" && as_dir=.
14002 for ac_exec_ext in '' $ac_executable_extensions; do
14003 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14004 ac_cv_prog_TRUE="$ac_prog"
14005 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
14006 break 2
14007 fi
14008done
14009done
14010
14011fi
14012fi
14013TRUE=$ac_cv_prog_TRUE
14014if test -n "$TRUE"; then
14015 echo "$as_me:$LINENO: result: $TRUE" >&5
14016echo "${ECHO_T}$TRUE" >&6
14017else
14018 echo "$as_me:$LINENO: result: no" >&5
14019echo "${ECHO_T}no" >&6
14020fi
14021
14022 test -n "$TRUE" && break
14023done
14024test -n "$TRUE" || TRUE="/bin/true"
14025
14026
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014027echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
14028echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
14029if test "${ac_cv_lib_c_inet_aton+set}" = set; then
14030 echo $ECHO_N "(cached) $ECHO_C" >&6
14031else
14032 ac_check_lib_save_LIBS=$LIBS
14033LIBS="-lc $LIBS"
14034cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014035/* confdefs.h. */
14036_ACEOF
14037cat confdefs.h >>conftest.$ac_ext
14038cat >>conftest.$ac_ext <<_ACEOF
14039/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014040
14041/* Override any gcc2 internal prototype to avoid an error. */
14042#ifdef __cplusplus
14043extern "C"
14044#endif
14045/* We use char because int might match the return type of a gcc2
14046 builtin and then its argument prototype would still apply. */
14047char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014048int
14049main ()
14050{
14051inet_aton ();
14052 ;
14053 return 0;
14054}
14055_ACEOF
14056rm -f conftest.$ac_objext conftest$ac_exeext
14057if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014058 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014059 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014060 grep -v '^ *+' conftest.er1 >conftest.err
14061 rm -f conftest.er1
14062 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014063 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14064 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014065 { ac_try='test -z "$ac_c_werror_flag"
14066 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14068 (eval $ac_try) 2>&5
14069 ac_status=$?
14070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14071 (exit $ac_status); }; } &&
14072 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014073 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14074 (eval $ac_try) 2>&5
14075 ac_status=$?
14076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14077 (exit $ac_status); }; }; then
14078 ac_cv_lib_c_inet_aton=yes
14079else
14080 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014081sed 's/^/| /' conftest.$ac_ext >&5
14082
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014083ac_cv_lib_c_inet_aton=no
14084fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014085rm -f conftest.err conftest.$ac_objext \
14086 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014087LIBS=$ac_check_lib_save_LIBS
14088fi
14089echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
14090echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
14091if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014092 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014093else
14094
14095echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
14096echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
14097if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
14098 echo $ECHO_N "(cached) $ECHO_C" >&6
14099else
14100 ac_check_lib_save_LIBS=$LIBS
14101LIBS="-lresolv $LIBS"
14102cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014103/* confdefs.h. */
14104_ACEOF
14105cat confdefs.h >>conftest.$ac_ext
14106cat >>conftest.$ac_ext <<_ACEOF
14107/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014108
14109/* Override any gcc2 internal prototype to avoid an error. */
14110#ifdef __cplusplus
14111extern "C"
14112#endif
14113/* We use char because int might match the return type of a gcc2
14114 builtin and then its argument prototype would still apply. */
14115char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014116int
14117main ()
14118{
14119inet_aton ();
14120 ;
14121 return 0;
14122}
14123_ACEOF
14124rm -f conftest.$ac_objext conftest$ac_exeext
14125if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014126 (eval $ac_link) 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014127 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014128 grep -v '^ *+' conftest.er1 >conftest.err
14129 rm -f conftest.er1
14130 cat conftest.err >&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14132 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014133 { ac_try='test -z "$ac_c_werror_flag"
14134 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014135 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14136 (eval $ac_try) 2>&5
14137 ac_status=$?
14138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14139 (exit $ac_status); }; } &&
14140 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014141 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14142 (eval $ac_try) 2>&5
14143 ac_status=$?
14144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14145 (exit $ac_status); }; }; then
14146 ac_cv_lib_resolv_inet_aton=yes
14147else
14148 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014149sed 's/^/| /' conftest.$ac_ext >&5
14150
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014151ac_cv_lib_resolv_inet_aton=no
14152fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014153rm -f conftest.err conftest.$ac_objext \
14154 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014155LIBS=$ac_check_lib_save_LIBS
14156fi
14157echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
14158echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
14159if test $ac_cv_lib_resolv_inet_aton = yes; then
14160 cat >>confdefs.h <<_ACEOF
14161#define HAVE_LIBRESOLV 1
14162_ACEOF
14163
14164 LIBS="-lresolv $LIBS"
14165
14166fi
14167
14168
14169fi
14170
14171
Martin v. Löwise9416172003-05-03 10:12:45 +000014172echo "$as_me:$LINENO: checking for hstrerror" >&5
14173echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
14174cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014175/* confdefs.h. */
14176_ACEOF
14177cat confdefs.h >>conftest.$ac_ext
14178cat >>conftest.$ac_ext <<_ACEOF
14179/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014180
14181#include "confdefs.h"
14182#include <netdb.h>
14183
Martin v. Löwise9416172003-05-03 10:12:45 +000014184int
14185main ()
14186{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014187void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014188 ;
14189 return 0;
14190}
14191_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014192rm -f conftest.$ac_objext conftest$ac_exeext
14193if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014194 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014195 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014196 grep -v '^ *+' conftest.er1 >conftest.err
14197 rm -f conftest.er1
14198 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14200 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014201 { ac_try='test -z "$ac_c_werror_flag"
14202 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014203 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14204 (eval $ac_try) 2>&5
14205 ac_status=$?
14206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14207 (exit $ac_status); }; } &&
14208 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014209 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14210 (eval $ac_try) 2>&5
14211 ac_status=$?
14212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14213 (exit $ac_status); }; }; then
14214
14215cat >>confdefs.h <<\_ACEOF
14216#define HAVE_HSTRERROR 1
14217_ACEOF
14218
14219 echo "$as_me:$LINENO: result: yes" >&5
14220echo "${ECHO_T}yes" >&6
14221else
14222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014223sed 's/^/| /' conftest.$ac_ext >&5
14224
Martin v. Löwise9416172003-05-03 10:12:45 +000014225echo "$as_me:$LINENO: result: no" >&5
14226echo "${ECHO_T}no" >&6
14227
14228fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014229rm -f conftest.err conftest.$ac_objext \
14230 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014231
14232echo "$as_me:$LINENO: checking for inet_aton" >&5
14233echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
14234cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014235/* confdefs.h. */
14236_ACEOF
14237cat confdefs.h >>conftest.$ac_ext
14238cat >>conftest.$ac_ext <<_ACEOF
14239/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014240
14241#include "confdefs.h"
14242#include <sys/socket.h>
14243#include <netinet/in.h>
14244#include <arpa/inet.h>
14245
Martin v. Löwise9416172003-05-03 10:12:45 +000014246int
14247main ()
14248{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014249void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000014250 ;
14251 return 0;
14252}
14253_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000014254rm -f conftest.$ac_objext conftest$ac_exeext
14255if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014256 (eval $ac_link) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014257 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014258 grep -v '^ *+' conftest.er1 >conftest.err
14259 rm -f conftest.er1
14260 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14262 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014263 { ac_try='test -z "$ac_c_werror_flag"
14264 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14266 (eval $ac_try) 2>&5
14267 ac_status=$?
14268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14269 (exit $ac_status); }; } &&
14270 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014271 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14272 (eval $ac_try) 2>&5
14273 ac_status=$?
14274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14275 (exit $ac_status); }; }; then
14276
14277cat >>confdefs.h <<\_ACEOF
14278#define HAVE_INET_ATON 1
14279_ACEOF
14280
14281 echo "$as_me:$LINENO: result: yes" >&5
14282echo "${ECHO_T}yes" >&6
14283else
14284 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014285sed 's/^/| /' conftest.$ac_ext >&5
14286
Martin v. Löwise9416172003-05-03 10:12:45 +000014287echo "$as_me:$LINENO: result: no" >&5
14288echo "${ECHO_T}no" >&6
14289
14290fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014291rm -f conftest.err conftest.$ac_objext \
14292 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014293
14294echo "$as_me:$LINENO: checking for inet_pton" >&5
14295echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
14296cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014297/* confdefs.h. */
14298_ACEOF
14299cat confdefs.h >>conftest.$ac_ext
14300cat >>conftest.$ac_ext <<_ACEOF
14301/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000014302
14303#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014304#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000014305#include <sys/socket.h>
14306#include <netinet/in.h>
14307#include <arpa/inet.h>
14308
Martin v. Löwise9416172003-05-03 10:12:45 +000014309int
14310main ()
14311{
14312void* p = inet_pton
14313 ;
14314 return 0;
14315}
14316_ACEOF
14317rm -f conftest.$ac_objext
14318if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014319 (eval $ac_compile) 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000014320 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014321 grep -v '^ *+' conftest.er1 >conftest.err
14322 rm -f conftest.er1
14323 cat conftest.err >&5
Martin v. Löwise9416172003-05-03 10:12:45 +000014324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14325 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014326 { ac_try='test -z "$ac_c_werror_flag"
14327 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014328 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14329 (eval $ac_try) 2>&5
14330 ac_status=$?
14331 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14332 (exit $ac_status); }; } &&
14333 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwise9416172003-05-03 10:12:45 +000014334 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14335 (eval $ac_try) 2>&5
14336 ac_status=$?
14337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14338 (exit $ac_status); }; }; then
14339
14340cat >>confdefs.h <<\_ACEOF
14341#define HAVE_INET_PTON 1
14342_ACEOF
14343
14344 echo "$as_me:$LINENO: result: yes" >&5
14345echo "${ECHO_T}yes" >&6
14346else
14347 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014348sed 's/^/| /' conftest.$ac_ext >&5
14349
Martin v. Löwise9416172003-05-03 10:12:45 +000014350echo "$as_me:$LINENO: result: no" >&5
14351echo "${ECHO_T}no" >&6
14352
14353fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014354rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000014355
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014356# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000014357echo "$as_me:$LINENO: checking for setgroups" >&5
14358echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
14359cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014360/* confdefs.h. */
14361_ACEOF
14362cat confdefs.h >>conftest.$ac_ext
14363cat >>conftest.$ac_ext <<_ACEOF
14364/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000014365
14366#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000014367#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000014368#ifdef HAVE_GRP_H
14369#include <grp.h>
14370#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000014371
Martin v. Löwisd5843682002-11-21 20:41:28 +000014372int
14373main ()
14374{
14375void* p = setgroups
14376 ;
14377 return 0;
14378}
14379_ACEOF
14380rm -f conftest.$ac_objext
14381if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014382 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000014383 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014384 grep -v '^ *+' conftest.er1 >conftest.err
14385 rm -f conftest.er1
14386 cat conftest.err >&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000014387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14388 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014389 { ac_try='test -z "$ac_c_werror_flag"
14390 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014391 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14392 (eval $ac_try) 2>&5
14393 ac_status=$?
14394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14395 (exit $ac_status); }; } &&
14396 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000014397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14398 (eval $ac_try) 2>&5
14399 ac_status=$?
14400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14401 (exit $ac_status); }; }; then
14402
14403cat >>confdefs.h <<\_ACEOF
14404#define HAVE_SETGROUPS 1
14405_ACEOF
14406
14407 echo "$as_me:$LINENO: result: yes" >&5
14408echo "${ECHO_T}yes" >&6
14409else
14410 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014411sed 's/^/| /' conftest.$ac_ext >&5
14412
Martin v. Löwisd5843682002-11-21 20:41:28 +000014413echo "$as_me:$LINENO: result: no" >&5
14414echo "${ECHO_T}no" >&6
14415
14416fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014417rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000014418
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014419# check for openpty and forkpty
14420
Martin v. Löwis11437992002-04-12 09:54:03 +000014421
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014422for ac_func in openpty
14423do
Martin v. Löwis11437992002-04-12 09:54:03 +000014424as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14425echo "$as_me:$LINENO: checking for $ac_func" >&5
14426echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14427if eval "test \"\${$as_ac_var+set}\" = set"; then
14428 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014429else
Martin v. Löwis11437992002-04-12 09:54:03 +000014430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014431/* confdefs.h. */
14432_ACEOF
14433cat confdefs.h >>conftest.$ac_ext
14434cat >>conftest.$ac_ext <<_ACEOF
14435/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014436/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014437 which can conflict with char $ac_func (); below.
14438 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014439 <limits.h> exists even on freestanding compilers. Under hpux,
14440 including <limits.h> includes <sys/time.h> and causes problems
14441 checking for functions defined therein. */
14442#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014443# include <limits.h>
14444#else
14445# include <assert.h>
14446#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014447/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014448#ifdef __cplusplus
14449extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014450{
Martin v. Löwis11437992002-04-12 09:54:03 +000014451#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014452/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014453 builtin and then its argument prototype would still apply. */
14454char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014455/* The GNU C library defines this for functions which it implements
14456 to always fail with ENOSYS. Some functions are actually named
14457 something starting with __ and the normal name is an alias. */
14458#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14459choke me
14460#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014461char (*f) () = $ac_func;
14462#endif
14463#ifdef __cplusplus
14464}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014465#endif
14466
Skip Montanaro6dead952003-09-25 14:50:04 +000014467int
14468main ()
14469{
14470return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014471 ;
14472 return 0;
14473}
14474_ACEOF
14475rm -f conftest.$ac_objext conftest$ac_exeext
14476if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014477 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014478 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014479 grep -v '^ *+' conftest.er1 >conftest.err
14480 rm -f conftest.er1
14481 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14483 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014484 { ac_try='test -z "$ac_c_werror_flag"
14485 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14487 (eval $ac_try) 2>&5
14488 ac_status=$?
14489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14490 (exit $ac_status); }; } &&
14491 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014492 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14493 (eval $ac_try) 2>&5
14494 ac_status=$?
14495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14496 (exit $ac_status); }; }; then
14497 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014498else
Martin v. Löwis11437992002-04-12 09:54:03 +000014499 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014500sed 's/^/| /' conftest.$ac_ext >&5
14501
Martin v. Löwis11437992002-04-12 09:54:03 +000014502eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014503fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014504rm -f conftest.err conftest.$ac_objext \
14505 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014506fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014507echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14508echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14509if test `eval echo '${'$as_ac_var'}'` = yes; then
14510 cat >>confdefs.h <<_ACEOF
14511#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14512_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014513
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014514else
Martin v. Löwis11437992002-04-12 09:54:03 +000014515 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
14516echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14517if test "${ac_cv_lib_util_openpty+set}" = set; then
14518 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014519else
Martin v. Löwis11437992002-04-12 09:54:03 +000014520 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014521LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014522cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014523/* confdefs.h. */
14524_ACEOF
14525cat confdefs.h >>conftest.$ac_ext
14526cat >>conftest.$ac_ext <<_ACEOF
14527/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014528
Fred Drake8cef4cf2000-06-28 16:40:38 +000014529/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014530#ifdef __cplusplus
14531extern "C"
14532#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014533/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014534 builtin and then its argument prototype would still apply. */
14535char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014536int
14537main ()
14538{
14539openpty ();
14540 ;
14541 return 0;
14542}
14543_ACEOF
14544rm -f conftest.$ac_objext conftest$ac_exeext
14545if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014546 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014548 grep -v '^ *+' conftest.er1 >conftest.err
14549 rm -f conftest.er1
14550 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14552 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014553 { ac_try='test -z "$ac_c_werror_flag"
14554 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14556 (eval $ac_try) 2>&5
14557 ac_status=$?
14558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14559 (exit $ac_status); }; } &&
14560 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014561 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14562 (eval $ac_try) 2>&5
14563 ac_status=$?
14564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14565 (exit $ac_status); }; }; then
14566 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014567else
Martin v. Löwis11437992002-04-12 09:54:03 +000014568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014569sed 's/^/| /' conftest.$ac_ext >&5
14570
Martin v. Löwis11437992002-04-12 09:54:03 +000014571ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014572fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014573rm -f conftest.err conftest.$ac_objext \
14574 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014575LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014576fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014577echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
14578echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14579if test $ac_cv_lib_util_openpty = yes; then
14580 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014581#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014582_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014583 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014584fi
14585
14586fi
14587done
14588
Martin v. Löwis11437992002-04-12 09:54:03 +000014589
Fred Drake8cef4cf2000-06-28 16:40:38 +000014590for ac_func in forkpty
14591do
Martin v. Löwis11437992002-04-12 09:54:03 +000014592as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14593echo "$as_me:$LINENO: checking for $ac_func" >&5
14594echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14595if eval "test \"\${$as_ac_var+set}\" = set"; then
14596 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014597else
Martin v. Löwis11437992002-04-12 09:54:03 +000014598 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014599/* confdefs.h. */
14600_ACEOF
14601cat confdefs.h >>conftest.$ac_ext
14602cat >>conftest.$ac_ext <<_ACEOF
14603/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000014604/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014605 which can conflict with char $ac_func (); below.
14606 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014607 <limits.h> exists even on freestanding compilers. Under hpux,
14608 including <limits.h> includes <sys/time.h> and causes problems
14609 checking for functions defined therein. */
14610#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014611# include <limits.h>
14612#else
14613# include <assert.h>
14614#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014615/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014616#ifdef __cplusplus
14617extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014618{
Martin v. Löwis11437992002-04-12 09:54:03 +000014619#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014620/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014621 builtin and then its argument prototype would still apply. */
14622char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000014623/* The GNU C library defines this for functions which it implements
14624 to always fail with ENOSYS. Some functions are actually named
14625 something starting with __ and the normal name is an alias. */
14626#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14627choke me
14628#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014629char (*f) () = $ac_func;
14630#endif
14631#ifdef __cplusplus
14632}
Fred Drake8cef4cf2000-06-28 16:40:38 +000014633#endif
14634
Skip Montanaro6dead952003-09-25 14:50:04 +000014635int
14636main ()
14637{
14638return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014639 ;
14640 return 0;
14641}
14642_ACEOF
14643rm -f conftest.$ac_objext conftest$ac_exeext
14644if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014645 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014647 grep -v '^ *+' conftest.er1 >conftest.err
14648 rm -f conftest.er1
14649 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014650 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14651 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014652 { ac_try='test -z "$ac_c_werror_flag"
14653 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14655 (eval $ac_try) 2>&5
14656 ac_status=$?
14657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14658 (exit $ac_status); }; } &&
14659 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014660 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14661 (eval $ac_try) 2>&5
14662 ac_status=$?
14663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14664 (exit $ac_status); }; }; then
14665 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014666else
Martin v. Löwis11437992002-04-12 09:54:03 +000014667 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014668sed 's/^/| /' conftest.$ac_ext >&5
14669
Martin v. Löwis11437992002-04-12 09:54:03 +000014670eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014671fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014672rm -f conftest.err conftest.$ac_objext \
14673 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014674fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014675echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14676echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14677if test `eval echo '${'$as_ac_var'}'` = yes; then
14678 cat >>confdefs.h <<_ACEOF
14679#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14680_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014681
Fred Drake8cef4cf2000-06-28 16:40:38 +000014682else
Martin v. Löwis11437992002-04-12 09:54:03 +000014683 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
14684echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
14685if test "${ac_cv_lib_util_forkpty+set}" = set; then
14686 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000014687else
Martin v. Löwis11437992002-04-12 09:54:03 +000014688 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014689LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014690cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014691/* confdefs.h. */
14692_ACEOF
14693cat confdefs.h >>conftest.$ac_ext
14694cat >>conftest.$ac_ext <<_ACEOF
14695/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014696
Fred Drake8cef4cf2000-06-28 16:40:38 +000014697/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014698#ifdef __cplusplus
14699extern "C"
14700#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000014701/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014702 builtin and then its argument prototype would still apply. */
14703char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014704int
14705main ()
14706{
14707forkpty ();
14708 ;
14709 return 0;
14710}
14711_ACEOF
14712rm -f conftest.$ac_objext conftest$ac_exeext
14713if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014714 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014716 grep -v '^ *+' conftest.er1 >conftest.err
14717 rm -f conftest.er1
14718 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14720 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014721 { ac_try='test -z "$ac_c_werror_flag"
14722 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014723 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14724 (eval $ac_try) 2>&5
14725 ac_status=$?
14726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14727 (exit $ac_status); }; } &&
14728 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14730 (eval $ac_try) 2>&5
14731 ac_status=$?
14732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14733 (exit $ac_status); }; }; then
14734 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000014735else
Martin v. Löwis11437992002-04-12 09:54:03 +000014736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014737sed 's/^/| /' conftest.$ac_ext >&5
14738
Martin v. Löwis11437992002-04-12 09:54:03 +000014739ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000014740fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014741rm -f conftest.err conftest.$ac_objext \
14742 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014743LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000014744fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014745echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
14746echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
14747if test $ac_cv_lib_util_forkpty = yes; then
14748 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014749#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014750_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000014751 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000014752fi
14753
14754fi
14755done
14756
Jack Jansendd19cf82001-12-06 22:36:17 +000014757
Michael W. Hudson54241132001-12-07 15:38:26 +000014758# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000014759
14760
14761
14762
14763
14764
Fred Drake8cef4cf2000-06-28 16:40:38 +000014765for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
14766do
Martin v. Löwis11437992002-04-12 09:54:03 +000014767as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14768echo "$as_me:$LINENO: checking for $ac_func" >&5
14769echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14770if eval "test \"\${$as_ac_var+set}\" = set"; then
14771 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014772else
Martin v. Löwis11437992002-04-12 09:54:03 +000014773 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014774/* confdefs.h. */
14775_ACEOF
14776cat confdefs.h >>conftest.$ac_ext
14777cat >>conftest.$ac_ext <<_ACEOF
14778/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014779/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014780 which can conflict with char $ac_func (); below.
14781 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014782 <limits.h> exists even on freestanding compilers. Under hpux,
14783 including <limits.h> includes <sys/time.h> and causes problems
14784 checking for functions defined therein. */
14785#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014786# include <limits.h>
14787#else
14788# include <assert.h>
14789#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014790/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014791#ifdef __cplusplus
14792extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014793{
Martin v. Löwis11437992002-04-12 09:54:03 +000014794#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014795/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014796 builtin and then its argument prototype would still apply. */
14797char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014798/* The GNU C library defines this for functions which it implements
14799 to always fail with ENOSYS. Some functions are actually named
14800 something starting with __ and the normal name is an alias. */
14801#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14802choke me
14803#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014804char (*f) () = $ac_func;
14805#endif
14806#ifdef __cplusplus
14807}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000014808#endif
14809
Skip Montanaro6dead952003-09-25 14:50:04 +000014810int
14811main ()
14812{
14813return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014814 ;
14815 return 0;
14816}
14817_ACEOF
14818rm -f conftest.$ac_objext conftest$ac_exeext
14819if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014820 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014821 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014822 grep -v '^ *+' conftest.er1 >conftest.err
14823 rm -f conftest.er1
14824 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14826 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014827 { ac_try='test -z "$ac_c_werror_flag"
14828 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14830 (eval $ac_try) 2>&5
14831 ac_status=$?
14832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14833 (exit $ac_status); }; } &&
14834 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14836 (eval $ac_try) 2>&5
14837 ac_status=$?
14838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14839 (exit $ac_status); }; }; then
14840 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014841else
Martin v. Löwis11437992002-04-12 09:54:03 +000014842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014843sed 's/^/| /' conftest.$ac_ext >&5
14844
Martin v. Löwis11437992002-04-12 09:54:03 +000014845eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014846fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014847rm -f conftest.err conftest.$ac_objext \
14848 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014849fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014850echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14851echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14852if test `eval echo '${'$as_ac_var'}'` = yes; then
14853 cat >>confdefs.h <<_ACEOF
14854#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14855_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000014856
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014857fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000014858done
14859
Michael W. Hudson54241132001-12-07 15:38:26 +000014860
Martin v. Löwis11437992002-04-12 09:54:03 +000014861
14862
14863
14864
14865
Martin v. Löwis1142de32002-03-29 16:28:31 +000014866for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000014867do
Martin v. Löwis11437992002-04-12 09:54:03 +000014868as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14869echo "$as_me:$LINENO: checking for $ac_func" >&5
14870echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14871if eval "test \"\${$as_ac_var+set}\" = set"; then
14872 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014873else
Martin v. Löwis11437992002-04-12 09:54:03 +000014874 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014875/* confdefs.h. */
14876_ACEOF
14877cat confdefs.h >>conftest.$ac_ext
14878cat >>conftest.$ac_ext <<_ACEOF
14879/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014880/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014881 which can conflict with char $ac_func (); below.
14882 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014883 <limits.h> exists even on freestanding compilers. Under hpux,
14884 including <limits.h> includes <sys/time.h> and causes problems
14885 checking for functions defined therein. */
14886#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014887# include <limits.h>
14888#else
14889# include <assert.h>
14890#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014891/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014892#ifdef __cplusplus
14893extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014894{
Martin v. Löwis11437992002-04-12 09:54:03 +000014895#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014896/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014897 builtin and then its argument prototype would still apply. */
14898char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000014899/* The GNU C library defines this for functions which it implements
14900 to always fail with ENOSYS. Some functions are actually named
14901 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014902#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000014903choke me
14904#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014905char (*f) () = $ac_func;
14906#endif
14907#ifdef __cplusplus
14908}
Guido van Rossum627b2d71993-12-24 10:39:16 +000014909#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014910
Skip Montanaro6dead952003-09-25 14:50:04 +000014911int
14912main ()
14913{
14914return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014915 ;
14916 return 0;
14917}
14918_ACEOF
14919rm -f conftest.$ac_objext conftest$ac_exeext
14920if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000014921 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014922 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014923 grep -v '^ *+' conftest.er1 >conftest.err
14924 rm -f conftest.er1
14925 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014926 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14927 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000014928 { ac_try='test -z "$ac_c_werror_flag"
14929 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000014930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14931 (eval $ac_try) 2>&5
14932 ac_status=$?
14933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14934 (exit $ac_status); }; } &&
14935 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014936 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14937 (eval $ac_try) 2>&5
14938 ac_status=$?
14939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14940 (exit $ac_status); }; }; then
14941 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000014942else
Martin v. Löwis11437992002-04-12 09:54:03 +000014943 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014944sed 's/^/| /' conftest.$ac_ext >&5
14945
Martin v. Löwis11437992002-04-12 09:54:03 +000014946eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000014947fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000014948rm -f conftest.err conftest.$ac_objext \
14949 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000014950fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014951echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14952echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14953if test `eval echo '${'$as_ac_var'}'` = yes; then
14954 cat >>confdefs.h <<_ACEOF
14955#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14956_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000014957
Martin v. Löwis1142de32002-03-29 16:28:31 +000014958else
Skip Montanarof0d5f792004-08-15 14:08:23 +000014959 case $LIBOBJS in
14960 "$ac_func.$ac_objext" | \
14961 *" $ac_func.$ac_objext" | \
14962 "$ac_func.$ac_objext "* | \
14963 *" $ac_func.$ac_objext "* ) ;;
14964 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
14965esac
14966
Martin v. Löwis1142de32002-03-29 16:28:31 +000014967fi
14968done
14969
14970
Martin v. Löwis11437992002-04-12 09:54:03 +000014971
Martin v. Löwis1142de32002-03-29 16:28:31 +000014972for ac_func in getpgrp
14973do
Martin v. Löwis11437992002-04-12 09:54:03 +000014974as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14975echo "$as_me:$LINENO: checking for $ac_func" >&5
14976echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14977if eval "test \"\${$as_ac_var+set}\" = set"; then
14978 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000014979else
Martin v. Löwis11437992002-04-12 09:54:03 +000014980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014981/* confdefs.h. */
14982_ACEOF
14983cat confdefs.h >>conftest.$ac_ext
14984cat >>conftest.$ac_ext <<_ACEOF
14985/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000014986/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014987 which can conflict with char $ac_func (); below.
14988 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014989 <limits.h> exists even on freestanding compilers. Under hpux,
14990 including <limits.h> includes <sys/time.h> and causes problems
14991 checking for functions defined therein. */
14992#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014993# include <limits.h>
14994#else
14995# include <assert.h>
14996#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000014997/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014998#ifdef __cplusplus
14999extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015000{
Martin v. Löwis11437992002-04-12 09:54:03 +000015001#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000015002/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015003 builtin and then its argument prototype would still apply. */
15004char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000015005/* The GNU C library defines this for functions which it implements
15006 to always fail with ENOSYS. Some functions are actually named
15007 something starting with __ and the normal name is an alias. */
15008#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15009choke me
15010#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015011char (*f) () = $ac_func;
15012#endif
15013#ifdef __cplusplus
15014}
Martin v. Löwis1142de32002-03-29 16:28:31 +000015015#endif
15016
Skip Montanaro6dead952003-09-25 14:50:04 +000015017int
15018main ()
15019{
15020return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015021 ;
15022 return 0;
15023}
15024_ACEOF
15025rm -f conftest.$ac_objext conftest$ac_exeext
15026if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015027 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015028 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015029 grep -v '^ *+' conftest.er1 >conftest.err
15030 rm -f conftest.er1
15031 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15033 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015034 { ac_try='test -z "$ac_c_werror_flag"
15035 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015036 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15037 (eval $ac_try) 2>&5
15038 ac_status=$?
15039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15040 (exit $ac_status); }; } &&
15041 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015042 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15043 (eval $ac_try) 2>&5
15044 ac_status=$?
15045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15046 (exit $ac_status); }; }; then
15047 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015048else
Martin v. Löwis11437992002-04-12 09:54:03 +000015049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015050sed 's/^/| /' conftest.$ac_ext >&5
15051
Martin v. Löwis11437992002-04-12 09:54:03 +000015052eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015053fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015054rm -f conftest.err conftest.$ac_objext \
15055 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015056fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015057echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15058echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15059if test `eval echo '${'$as_ac_var'}'` = yes; then
15060 cat >>confdefs.h <<_ACEOF
15061#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15062_ACEOF
15063 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015064/* confdefs.h. */
15065_ACEOF
15066cat confdefs.h >>conftest.$ac_ext
15067cat >>conftest.$ac_ext <<_ACEOF
15068/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015069#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015070int
15071main ()
15072{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015073getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015074 ;
15075 return 0;
15076}
15077_ACEOF
15078rm -f conftest.$ac_objext
15079if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015080 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015082 grep -v '^ *+' conftest.er1 >conftest.err
15083 rm -f conftest.er1
15084 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15086 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015087 { ac_try='test -z "$ac_c_werror_flag"
15088 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015089 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15090 (eval $ac_try) 2>&5
15091 ac_status=$?
15092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15093 (exit $ac_status); }; } &&
15094 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15096 (eval $ac_try) 2>&5
15097 ac_status=$?
15098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15099 (exit $ac_status); }; }; then
15100
15101cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015102#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015103_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015104
Martin v. Löwis11437992002-04-12 09:54:03 +000015105
Guido van Rossumf78abae1997-01-21 22:02:36 +000015106else
Martin v. Löwis11437992002-04-12 09:54:03 +000015107 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015108sed 's/^/| /' conftest.$ac_ext >&5
15109
Guido van Rossum627b2d71993-12-24 10:39:16 +000015110fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015111rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015112
Guido van Rossum627b2d71993-12-24 10:39:16 +000015113fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015114done
Guido van Rossum627b2d71993-12-24 10:39:16 +000015115
Jack Jansen150753c2003-03-29 22:07:47 +000015116
15117for ac_func in setpgrp
15118do
15119as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15120echo "$as_me:$LINENO: checking for $ac_func" >&5
15121echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15122if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015123 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015124else
Martin v. Löwis11437992002-04-12 09:54:03 +000015125 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015126/* confdefs.h. */
15127_ACEOF
15128cat confdefs.h >>conftest.$ac_ext
15129cat >>conftest.$ac_ext <<_ACEOF
15130/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015131/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015132 which can conflict with char $ac_func (); below.
15133 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015134 <limits.h> exists even on freestanding compilers. Under hpux,
15135 including <limits.h> includes <sys/time.h> and causes problems
15136 checking for functions defined therein. */
15137#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015138# include <limits.h>
15139#else
15140# include <assert.h>
15141#endif
Jack Jansen150753c2003-03-29 22:07:47 +000015142/* Override any gcc2 internal prototype to avoid an error. */
15143#ifdef __cplusplus
15144extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015145{
Martin v. Löwis11437992002-04-12 09:54:03 +000015146#endif
Jack Jansen150753c2003-03-29 22:07:47 +000015147/* We use char because int might match the return type of a gcc2
15148 builtin and then its argument prototype would still apply. */
15149char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000015150/* The GNU C library defines this for functions which it implements
15151 to always fail with ENOSYS. Some functions are actually named
15152 something starting with __ and the normal name is an alias. */
15153#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15154choke me
15155#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015156char (*f) () = $ac_func;
15157#endif
15158#ifdef __cplusplus
15159}
Jack Jansen150753c2003-03-29 22:07:47 +000015160#endif
15161
Skip Montanaro6dead952003-09-25 14:50:04 +000015162int
15163main ()
15164{
15165return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015166 ;
15167 return 0;
15168}
15169_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000015170rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000015171if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015172 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015174 grep -v '^ *+' conftest.er1 >conftest.err
15175 rm -f conftest.er1
15176 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000015178 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015179 { ac_try='test -z "$ac_c_werror_flag"
15180 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15182 (eval $ac_try) 2>&5
15183 ac_status=$?
15184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15185 (exit $ac_status); }; } &&
15186 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15188 (eval $ac_try) 2>&5
15189 ac_status=$?
15190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15191 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000015192 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015193else
Jack Jansen150753c2003-03-29 22:07:47 +000015194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015195sed 's/^/| /' conftest.$ac_ext >&5
15196
Jack Jansen150753c2003-03-29 22:07:47 +000015197eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015198fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015199rm -f conftest.err conftest.$ac_objext \
15200 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015201fi
Jack Jansen150753c2003-03-29 22:07:47 +000015202echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15203echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15204if test `eval echo '${'$as_ac_var'}'` = yes; then
15205 cat >>confdefs.h <<_ACEOF
15206#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15207_ACEOF
15208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015209/* confdefs.h. */
15210_ACEOF
15211cat confdefs.h >>conftest.$ac_ext
15212cat >>conftest.$ac_ext <<_ACEOF
15213/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000015214#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000015215int
15216main ()
15217{
15218setpgrp(0,0);
15219 ;
15220 return 0;
15221}
15222_ACEOF
15223rm -f conftest.$ac_objext
15224if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015225 (eval $ac_compile) 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000015226 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015227 grep -v '^ *+' conftest.er1 >conftest.err
15228 rm -f conftest.er1
15229 cat conftest.err >&5
Jack Jansen150753c2003-03-29 22:07:47 +000015230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15231 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015232 { ac_try='test -z "$ac_c_werror_flag"
15233 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015234 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15235 (eval $ac_try) 2>&5
15236 ac_status=$?
15237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15238 (exit $ac_status); }; } &&
15239 { ac_try='test -s conftest.$ac_objext'
Jack Jansen150753c2003-03-29 22:07:47 +000015240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15241 (eval $ac_try) 2>&5
15242 ac_status=$?
15243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15244 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015245
15246cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000015247#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015248_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015249
Jack Jansen150753c2003-03-29 22:07:47 +000015250
15251else
15252 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015253sed 's/^/| /' conftest.$ac_ext >&5
15254
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015255fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015256rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000015257
15258fi
15259done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000015260
Martin v. Löwis11437992002-04-12 09:54:03 +000015261
Thomas Wouters3a584202000-08-05 23:28:51 +000015262for ac_func in gettimeofday
15263do
Martin v. Löwis11437992002-04-12 09:54:03 +000015264as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15265echo "$as_me:$LINENO: checking for $ac_func" >&5
15266echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15267if eval "test \"\${$as_ac_var+set}\" = set"; then
15268 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015269else
Martin v. Löwis11437992002-04-12 09:54:03 +000015270 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015271/* confdefs.h. */
15272_ACEOF
15273cat confdefs.h >>conftest.$ac_ext
15274cat >>conftest.$ac_ext <<_ACEOF
15275/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015276/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015277 which can conflict with char $ac_func (); below.
15278 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015279 <limits.h> exists even on freestanding compilers. Under hpux,
15280 including <limits.h> includes <sys/time.h> and causes problems
15281 checking for functions defined therein. */
15282#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015283# include <limits.h>
15284#else
15285# include <assert.h>
15286#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015287/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015288#ifdef __cplusplus
15289extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015290{
Martin v. Löwis11437992002-04-12 09:54:03 +000015291#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015292/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015293 builtin and then its argument prototype would still apply. */
15294char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015295/* The GNU C library defines this for functions which it implements
15296 to always fail with ENOSYS. Some functions are actually named
15297 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000015298#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015299choke me
15300#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015301char (*f) () = $ac_func;
15302#endif
15303#ifdef __cplusplus
15304}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015305#endif
15306
Skip Montanaro6dead952003-09-25 14:50:04 +000015307int
15308main ()
15309{
15310return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015311 ;
15312 return 0;
15313}
15314_ACEOF
15315rm -f conftest.$ac_objext conftest$ac_exeext
15316if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015317 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015319 grep -v '^ *+' conftest.er1 >conftest.err
15320 rm -f conftest.er1
15321 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15323 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015324 { ac_try='test -z "$ac_c_werror_flag"
15325 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15327 (eval $ac_try) 2>&5
15328 ac_status=$?
15329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15330 (exit $ac_status); }; } &&
15331 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15333 (eval $ac_try) 2>&5
15334 ac_status=$?
15335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15336 (exit $ac_status); }; }; then
15337 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015338else
Martin v. Löwis11437992002-04-12 09:54:03 +000015339 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015340sed 's/^/| /' conftest.$ac_ext >&5
15341
Martin v. Löwis11437992002-04-12 09:54:03 +000015342eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015343fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015344rm -f conftest.err conftest.$ac_objext \
15345 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015346fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015347echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15348echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15349if test `eval echo '${'$as_ac_var'}'` = yes; then
15350 cat >>confdefs.h <<_ACEOF
15351#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15352_ACEOF
15353 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015354/* confdefs.h. */
15355_ACEOF
15356cat confdefs.h >>conftest.$ac_ext
15357cat >>conftest.$ac_ext <<_ACEOF
15358/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015359#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015360int
15361main ()
15362{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015363gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000015364 ;
15365 return 0;
15366}
15367_ACEOF
15368rm -f conftest.$ac_objext
15369if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015370 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015371 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015372 grep -v '^ *+' conftest.er1 >conftest.err
15373 rm -f conftest.er1
15374 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015375 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15376 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015377 { ac_try='test -z "$ac_c_werror_flag"
15378 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015379 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15380 (eval $ac_try) 2>&5
15381 ac_status=$?
15382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15383 (exit $ac_status); }; } &&
15384 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15386 (eval $ac_try) 2>&5
15387 ac_status=$?
15388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15389 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000015390 :
15391else
Martin v. Löwis11437992002-04-12 09:54:03 +000015392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015393sed 's/^/| /' conftest.$ac_ext >&5
15394
Martin v. Löwis11437992002-04-12 09:54:03 +000015395
15396cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015397#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015398_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015399
Martin v. Löwis11437992002-04-12 09:54:03 +000015400
Guido van Rossum627b2d71993-12-24 10:39:16 +000015401fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015402rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015403
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015404fi
Thomas Wouters3a584202000-08-05 23:28:51 +000015405done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015406
Michael W. Hudson54241132001-12-07 15:38:26 +000015407
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015408echo "$as_me:$LINENO: checking for major" >&5
15409echo $ECHO_N "checking for major... $ECHO_C" >&6
15410cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015411/* confdefs.h. */
15412_ACEOF
15413cat confdefs.h >>conftest.$ac_ext
15414cat >>conftest.$ac_ext <<_ACEOF
15415/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015416
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015417#if defined(MAJOR_IN_MKDEV)
15418#include <sys/mkdev.h>
15419#elif defined(MAJOR_IN_SYSMACROS)
15420#include <sys/sysmacros.h>
15421#else
15422#include <sys/types.h>
15423#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015424
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015425int
15426main ()
15427{
15428
15429 makedev(major(0),minor(0));
15430
15431 ;
15432 return 0;
15433}
15434_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000015435rm -f conftest.$ac_objext conftest$ac_exeext
15436if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015437 (eval $ac_link) 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015439 grep -v '^ *+' conftest.er1 >conftest.err
15440 rm -f conftest.er1
15441 cat conftest.err >&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15443 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015444 { ac_try='test -z "$ac_c_werror_flag"
15445 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015446 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15447 (eval $ac_try) 2>&5
15448 ac_status=$?
15449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15450 (exit $ac_status); }; } &&
15451 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +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); }; }; then
15457
15458
15459cat >>confdefs.h <<\_ACEOF
15460#define HAVE_DEVICE_MACROS 1
15461_ACEOF
15462
15463 echo "$as_me:$LINENO: result: yes" >&5
15464echo "${ECHO_T}yes" >&6
15465
15466else
15467 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015468sed 's/^/| /' conftest.$ac_ext >&5
15469
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000015470
15471 echo "$as_me:$LINENO: result: no" >&5
15472echo "${ECHO_T}no" >&6
15473
15474fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015475rm -f conftest.err conftest.$ac_objext \
15476 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015477
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015478# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000015479# for [no]getaddrinfo in netdb.h.
15480echo "$as_me:$LINENO: checking for getaddrinfo" >&5
15481echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
15482cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015483/* confdefs.h. */
15484_ACEOF
15485cat confdefs.h >>conftest.$ac_ext
15486cat >>conftest.$ac_ext <<_ACEOF
15487/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015488
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015489#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015490#include <sys/socket.h>
15491#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000015492#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015493
Martin v. Löwis11437992002-04-12 09:54:03 +000015494int
15495main ()
15496{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015497
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015498getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015499
Martin v. Löwis11437992002-04-12 09:54:03 +000015500 ;
15501 return 0;
15502}
15503_ACEOF
15504rm -f conftest.$ac_objext conftest$ac_exeext
15505if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015506 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015507 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015508 grep -v '^ *+' conftest.er1 >conftest.err
15509 rm -f conftest.er1
15510 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15512 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015513 { ac_try='test -z "$ac_c_werror_flag"
15514 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15516 (eval $ac_try) 2>&5
15517 ac_status=$?
15518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15519 (exit $ac_status); }; } &&
15520 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015521 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15522 (eval $ac_try) 2>&5
15523 ac_status=$?
15524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15525 (exit $ac_status); }; }; then
15526
15527echo "$as_me:$LINENO: result: yes" >&5
15528echo "${ECHO_T}yes" >&6
15529echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
15530echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015531if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015532 echo "$as_me:$LINENO: result: buggy" >&5
15533echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015534buggygetaddrinfo=yes
15535else
Martin v. Löwis11437992002-04-12 09:54:03 +000015536 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015537/* confdefs.h. */
15538_ACEOF
15539cat confdefs.h >>conftest.$ac_ext
15540cat >>conftest.$ac_ext <<_ACEOF
15541/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015542
15543#include <sys/types.h>
15544#include <netdb.h>
15545#include <string.h>
15546#include <sys/socket.h>
15547#include <netinet/in.h>
15548
15549main()
15550{
15551 int passive, gaierr, inet4 = 0, inet6 = 0;
15552 struct addrinfo hints, *ai, *aitop;
15553 char straddr[INET6_ADDRSTRLEN], strport[16];
15554
15555 for (passive = 0; passive <= 1; passive++) {
15556 memset(&hints, 0, sizeof(hints));
15557 hints.ai_family = AF_UNSPEC;
15558 hints.ai_flags = passive ? AI_PASSIVE : 0;
15559 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000015560 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015561 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
15562 (void)gai_strerror(gaierr);
15563 goto bad;
15564 }
15565 for (ai = aitop; ai; ai = ai->ai_next) {
15566 if (ai->ai_addr == NULL ||
15567 ai->ai_addrlen == 0 ||
15568 getnameinfo(ai->ai_addr, ai->ai_addrlen,
15569 straddr, sizeof(straddr), strport, sizeof(strport),
15570 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
15571 goto bad;
15572 }
15573 switch (ai->ai_family) {
15574 case AF_INET:
15575 if (strcmp(strport, "54321") != 0) {
15576 goto bad;
15577 }
15578 if (passive) {
15579 if (strcmp(straddr, "0.0.0.0") != 0) {
15580 goto bad;
15581 }
15582 } else {
15583 if (strcmp(straddr, "127.0.0.1") != 0) {
15584 goto bad;
15585 }
15586 }
15587 inet4++;
15588 break;
15589 case AF_INET6:
15590 if (strcmp(strport, "54321") != 0) {
15591 goto bad;
15592 }
15593 if (passive) {
15594 if (strcmp(straddr, "::") != 0) {
15595 goto bad;
15596 }
15597 } else {
15598 if (strcmp(straddr, "::1") != 0) {
15599 goto bad;
15600 }
15601 }
15602 inet6++;
15603 break;
15604 case AF_UNSPEC:
15605 goto bad;
15606 break;
15607 default:
15608 /* another family support? */
15609 break;
15610 }
15611 }
15612 }
15613
15614 if (!(inet4 == 0 || inet4 == 2))
15615 goto bad;
15616 if (!(inet6 == 0 || inet6 == 2))
15617 goto bad;
15618
15619 if (aitop)
15620 freeaddrinfo(aitop);
15621 exit(0);
15622
15623 bad:
15624 if (aitop)
15625 freeaddrinfo(aitop);
15626 exit(1);
15627}
15628
Martin v. Löwis11437992002-04-12 09:54:03 +000015629_ACEOF
15630rm -f conftest$ac_exeext
15631if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
15632 (eval $ac_link) 2>&5
15633 ac_status=$?
15634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15635 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15637 (eval $ac_try) 2>&5
15638 ac_status=$?
15639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15640 (exit $ac_status); }; }; then
15641 echo "$as_me:$LINENO: result: good" >&5
15642echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015643buggygetaddrinfo=no
15644else
Martin v. Löwis11437992002-04-12 09:54:03 +000015645 echo "$as_me: program exited with status $ac_status" >&5
15646echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015647sed 's/^/| /' conftest.$ac_ext >&5
15648
Martin v. Löwis11437992002-04-12 09:54:03 +000015649( exit $ac_status )
15650echo "$as_me:$LINENO: result: buggy" >&5
15651echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015652buggygetaddrinfo=yes
15653fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015654rm -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 +000015655fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015656else
Martin v. Löwis11437992002-04-12 09:54:03 +000015657 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015658sed 's/^/| /' conftest.$ac_ext >&5
15659
Martin v. Löwis11437992002-04-12 09:54:03 +000015660
15661echo "$as_me:$LINENO: result: no" >&5
15662echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015663buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015664
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015665fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015666rm -f conftest.err conftest.$ac_objext \
15667 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015668
15669if test "$buggygetaddrinfo" = "yes"; then
15670 if test "$ipv6" = "yes"; then
15671 echo 'Fatal: You must get working getaddrinfo() function.'
15672 echo ' or you can specify "--disable-ipv6"'.
15673 exit 1
15674 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015675else
Martin v. Löwis11437992002-04-12 09:54:03 +000015676
15677cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015678#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015679_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000015680
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015681fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015682
Jack Jansen9a66b6d2001-08-08 13:56:14 +000015683for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015684do
Martin v. Löwis11437992002-04-12 09:54:03 +000015685as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15686echo "$as_me:$LINENO: checking for $ac_func" >&5
15687echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15688if eval "test \"\${$as_ac_var+set}\" = set"; then
15689 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015690else
Martin v. Löwis11437992002-04-12 09:54:03 +000015691 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015692/* confdefs.h. */
15693_ACEOF
15694cat confdefs.h >>conftest.$ac_ext
15695cat >>conftest.$ac_ext <<_ACEOF
15696/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015697/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015698 which can conflict with char $ac_func (); below.
15699 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015700 <limits.h> exists even on freestanding compilers. Under hpux,
15701 including <limits.h> includes <sys/time.h> and causes problems
15702 checking for functions defined therein. */
15703#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015704# include <limits.h>
15705#else
15706# include <assert.h>
15707#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015708/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015709#ifdef __cplusplus
15710extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015711{
Martin v. Löwis11437992002-04-12 09:54:03 +000015712#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015713/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015714 builtin and then its argument prototype would still apply. */
15715char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015716/* The GNU C library defines this for functions which it implements
15717 to always fail with ENOSYS. Some functions are actually named
15718 something starting with __ and the normal name is an alias. */
15719#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15720choke me
15721#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015722char (*f) () = $ac_func;
15723#endif
15724#ifdef __cplusplus
15725}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015726#endif
15727
Skip Montanaro6dead952003-09-25 14:50:04 +000015728int
15729main ()
15730{
15731return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000015732 ;
15733 return 0;
15734}
15735_ACEOF
15736rm -f conftest.$ac_objext conftest$ac_exeext
15737if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015738 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015739 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015740 grep -v '^ *+' conftest.er1 >conftest.err
15741 rm -f conftest.er1
15742 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015743 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15744 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015745 { ac_try='test -z "$ac_c_werror_flag"
15746 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15748 (eval $ac_try) 2>&5
15749 ac_status=$?
15750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15751 (exit $ac_status); }; } &&
15752 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15754 (eval $ac_try) 2>&5
15755 ac_status=$?
15756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15757 (exit $ac_status); }; }; then
15758 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000015759else
Martin v. Löwis11437992002-04-12 09:54:03 +000015760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015761sed 's/^/| /' conftest.$ac_ext >&5
15762
Martin v. Löwis11437992002-04-12 09:54:03 +000015763eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000015764fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015765rm -f conftest.err conftest.$ac_objext \
15766 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015767fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015768echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
15769echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15770if test `eval echo '${'$as_ac_var'}'` = yes; then
15771 cat >>confdefs.h <<_ACEOF
15772#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15773_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015774
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015775fi
15776done
15777
Michael W. Hudson54241132001-12-07 15:38:26 +000015778
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015779# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000015780echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
15781echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
15782if test "${ac_cv_header_time+set}" = set; then
15783 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015784else
Martin v. Löwis11437992002-04-12 09:54:03 +000015785 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015786/* confdefs.h. */
15787_ACEOF
15788cat confdefs.h >>conftest.$ac_ext
15789cat >>conftest.$ac_ext <<_ACEOF
15790/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015791#include <sys/types.h>
15792#include <sys/time.h>
15793#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015794
Martin v. Löwis11437992002-04-12 09:54:03 +000015795int
15796main ()
15797{
15798if ((struct tm *) 0)
15799return 0;
15800 ;
15801 return 0;
15802}
15803_ACEOF
15804rm -f conftest.$ac_objext
15805if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015806 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015808 grep -v '^ *+' conftest.er1 >conftest.err
15809 rm -f conftest.er1
15810 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15812 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015813 { ac_try='test -z "$ac_c_werror_flag"
15814 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015815 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15816 (eval $ac_try) 2>&5
15817 ac_status=$?
15818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15819 (exit $ac_status); }; } &&
15820 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15822 (eval $ac_try) 2>&5
15823 ac_status=$?
15824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15825 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015826 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015827else
Martin v. Löwis11437992002-04-12 09:54:03 +000015828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015829sed 's/^/| /' conftest.$ac_ext >&5
15830
Martin v. Löwis11437992002-04-12 09:54:03 +000015831ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015832fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015833rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015834fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015835echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
15836echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015837if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015838
15839cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015840#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015841_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015842
15843fi
15844
Martin v. Löwis11437992002-04-12 09:54:03 +000015845echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
15846echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
15847if test "${ac_cv_struct_tm+set}" = set; then
15848 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015849else
Martin v. Löwis11437992002-04-12 09:54:03 +000015850 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015851/* confdefs.h. */
15852_ACEOF
15853cat confdefs.h >>conftest.$ac_ext
15854cat >>conftest.$ac_ext <<_ACEOF
15855/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015856#include <sys/types.h>
15857#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015858
Martin v. Löwis11437992002-04-12 09:54:03 +000015859int
15860main ()
15861{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015862struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000015863 ;
15864 return 0;
15865}
15866_ACEOF
15867rm -f conftest.$ac_objext
15868if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015869 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015870 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015871 grep -v '^ *+' conftest.er1 >conftest.err
15872 rm -f conftest.er1
15873 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15875 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015876 { ac_try='test -z "$ac_c_werror_flag"
15877 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015878 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15879 (eval $ac_try) 2>&5
15880 ac_status=$?
15881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15882 (exit $ac_status); }; } &&
15883 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015884 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15885 (eval $ac_try) 2>&5
15886 ac_status=$?
15887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15888 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015889 ac_cv_struct_tm=time.h
15890else
Martin v. Löwis11437992002-04-12 09:54:03 +000015891 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015892sed 's/^/| /' conftest.$ac_ext >&5
15893
Martin v. Löwis11437992002-04-12 09:54:03 +000015894ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015895fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000015896rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015897fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015898echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
15899echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000015900if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015901
15902cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015903#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015904_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015905
15906fi
15907
Martin v. Löwis11437992002-04-12 09:54:03 +000015908echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
15909echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
15910if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
15911 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015912else
Martin v. Löwis11437992002-04-12 09:54:03 +000015913 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015914/* confdefs.h. */
15915_ACEOF
15916cat confdefs.h >>conftest.$ac_ext
15917cat >>conftest.$ac_ext <<_ACEOF
15918/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015919#include <sys/types.h>
15920#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000015921
15922
Martin v. Löwis11437992002-04-12 09:54:03 +000015923int
15924main ()
15925{
15926static struct tm ac_aggr;
15927if (ac_aggr.tm_zone)
15928return 0;
15929 ;
15930 return 0;
15931}
15932_ACEOF
15933rm -f conftest.$ac_objext
15934if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015935 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015936 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015937 grep -v '^ *+' conftest.er1 >conftest.err
15938 rm -f conftest.er1
15939 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15941 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015942 { ac_try='test -z "$ac_c_werror_flag"
15943 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15945 (eval $ac_try) 2>&5
15946 ac_status=$?
15947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15948 (exit $ac_status); }; } &&
15949 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015950 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15951 (eval $ac_try) 2>&5
15952 ac_status=$?
15953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15954 (exit $ac_status); }; }; then
15955 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000015956else
Martin v. Löwis11437992002-04-12 09:54:03 +000015957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015958sed 's/^/| /' conftest.$ac_ext >&5
15959
15960cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015961/* confdefs.h. */
15962_ACEOF
15963cat confdefs.h >>conftest.$ac_ext
15964cat >>conftest.$ac_ext <<_ACEOF
15965/* end confdefs.h. */
15966#include <sys/types.h>
15967#include <$ac_cv_struct_tm>
15968
15969
15970int
15971main ()
15972{
15973static struct tm ac_aggr;
15974if (sizeof ac_aggr.tm_zone)
15975return 0;
15976 ;
15977 return 0;
15978}
15979_ACEOF
15980rm -f conftest.$ac_objext
15981if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000015982 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000015983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015984 grep -v '^ *+' conftest.er1 >conftest.err
15985 rm -f conftest.er1
15986 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15988 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000015989 { ac_try='test -z "$ac_c_werror_flag"
15990 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000015991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15992 (eval $ac_try) 2>&5
15993 ac_status=$?
15994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15995 (exit $ac_status); }; } &&
15996 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000015997 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15998 (eval $ac_try) 2>&5
15999 ac_status=$?
16000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16001 (exit $ac_status); }; }; then
16002 ac_cv_member_struct_tm_tm_zone=yes
16003else
16004 echo "$as_me: failed program was:" >&5
16005sed 's/^/| /' conftest.$ac_ext >&5
16006
Martin v. Löwis11437992002-04-12 09:54:03 +000016007ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016008fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016009rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016010fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016011rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016012fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016013echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
16014echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
16015if test $ac_cv_member_struct_tm_tm_zone = yes; then
16016
16017cat >>confdefs.h <<_ACEOF
16018#define HAVE_STRUCT_TM_TM_ZONE 1
16019_ACEOF
16020
16021
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016022fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016023
Martin v. Löwis11437992002-04-12 09:54:03 +000016024if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16025
16026cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016027#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016028_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016029
16030else
Martin v. Löwis11437992002-04-12 09:54:03 +000016031 echo "$as_me:$LINENO: checking for tzname" >&5
16032echo $ECHO_N "checking for tzname... $ECHO_C" >&6
16033if test "${ac_cv_var_tzname+set}" = set; then
16034 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016035else
Martin v. Löwis11437992002-04-12 09:54:03 +000016036 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016037/* confdefs.h. */
16038_ACEOF
16039cat confdefs.h >>conftest.$ac_ext
16040cat >>conftest.$ac_ext <<_ACEOF
16041/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016042#include <time.h>
16043#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016044extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016045#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016046
Martin v. Löwis11437992002-04-12 09:54:03 +000016047int
16048main ()
16049{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016050atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000016051 ;
16052 return 0;
16053}
16054_ACEOF
16055rm -f conftest.$ac_objext conftest$ac_exeext
16056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016057 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016059 grep -v '^ *+' conftest.er1 >conftest.err
16060 rm -f conftest.er1
16061 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16063 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016064 { ac_try='test -z "$ac_c_werror_flag"
16065 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016066 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16067 (eval $ac_try) 2>&5
16068 ac_status=$?
16069 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16070 (exit $ac_status); }; } &&
16071 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016072 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16073 (eval $ac_try) 2>&5
16074 ac_status=$?
16075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16076 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016077 ac_cv_var_tzname=yes
16078else
Martin v. Löwis11437992002-04-12 09:54:03 +000016079 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016080sed 's/^/| /' conftest.$ac_ext >&5
16081
Martin v. Löwis11437992002-04-12 09:54:03 +000016082ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016083fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016084rm -f conftest.err conftest.$ac_objext \
16085 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000016086fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016087echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
16088echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000016089 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016090
16091cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016092#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016093_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016094
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016095 fi
16096fi
16097
Martin v. Löwis11437992002-04-12 09:54:03 +000016098echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
16099echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
16100if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
16101 echo $ECHO_N "(cached) $ECHO_C" >&6
16102else
16103 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016104/* confdefs.h. */
16105_ACEOF
16106cat confdefs.h >>conftest.$ac_ext
16107cat >>conftest.$ac_ext <<_ACEOF
16108/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016109$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016110int
16111main ()
16112{
16113static struct stat ac_aggr;
16114if (ac_aggr.st_rdev)
16115return 0;
16116 ;
16117 return 0;
16118}
16119_ACEOF
16120rm -f conftest.$ac_objext
16121if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016122 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016124 grep -v '^ *+' conftest.er1 >conftest.err
16125 rm -f conftest.er1
16126 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16128 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016129 { ac_try='test -z "$ac_c_werror_flag"
16130 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16132 (eval $ac_try) 2>&5
16133 ac_status=$?
16134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16135 (exit $ac_status); }; } &&
16136 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016137 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16138 (eval $ac_try) 2>&5
16139 ac_status=$?
16140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16141 (exit $ac_status); }; }; then
16142 ac_cv_member_struct_stat_st_rdev=yes
16143else
16144 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016145sed 's/^/| /' conftest.$ac_ext >&5
16146
16147cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016148/* confdefs.h. */
16149_ACEOF
16150cat confdefs.h >>conftest.$ac_ext
16151cat >>conftest.$ac_ext <<_ACEOF
16152/* end confdefs.h. */
16153$ac_includes_default
16154int
16155main ()
16156{
16157static struct stat ac_aggr;
16158if (sizeof ac_aggr.st_rdev)
16159return 0;
16160 ;
16161 return 0;
16162}
16163_ACEOF
16164rm -f conftest.$ac_objext
16165if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016166 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016168 grep -v '^ *+' conftest.er1 >conftest.err
16169 rm -f conftest.er1
16170 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16172 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016173 { ac_try='test -z "$ac_c_werror_flag"
16174 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016175 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16176 (eval $ac_try) 2>&5
16177 ac_status=$?
16178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16179 (exit $ac_status); }; } &&
16180 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016181 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16182 (eval $ac_try) 2>&5
16183 ac_status=$?
16184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16185 (exit $ac_status); }; }; then
16186 ac_cv_member_struct_stat_st_rdev=yes
16187else
16188 echo "$as_me: failed program was:" >&5
16189sed 's/^/| /' conftest.$ac_ext >&5
16190
Martin v. Löwis11437992002-04-12 09:54:03 +000016191ac_cv_member_struct_stat_st_rdev=no
16192fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016193rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016194fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016195rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016196fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016197echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
16198echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
16199if test $ac_cv_member_struct_stat_st_rdev = yes; then
16200
16201cat >>confdefs.h <<_ACEOF
16202#define HAVE_STRUCT_STAT_ST_RDEV 1
16203_ACEOF
16204
16205
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016206fi
16207
Martin v. Löwis11437992002-04-12 09:54:03 +000016208echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
16209echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
16210if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
16211 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016212else
Martin v. Löwis11437992002-04-12 09:54:03 +000016213 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016214/* confdefs.h. */
16215_ACEOF
16216cat confdefs.h >>conftest.$ac_ext
16217cat >>conftest.$ac_ext <<_ACEOF
16218/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016219$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016220int
16221main ()
16222{
16223static struct stat ac_aggr;
16224if (ac_aggr.st_blksize)
16225return 0;
16226 ;
16227 return 0;
16228}
16229_ACEOF
16230rm -f conftest.$ac_objext
16231if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016232 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016234 grep -v '^ *+' conftest.er1 >conftest.err
16235 rm -f conftest.er1
16236 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16238 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016239 { ac_try='test -z "$ac_c_werror_flag"
16240 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16242 (eval $ac_try) 2>&5
16243 ac_status=$?
16244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16245 (exit $ac_status); }; } &&
16246 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016247 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16248 (eval $ac_try) 2>&5
16249 ac_status=$?
16250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16251 (exit $ac_status); }; }; then
16252 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016253else
Martin v. Löwis11437992002-04-12 09:54:03 +000016254 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016255sed 's/^/| /' conftest.$ac_ext >&5
16256
16257cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016258/* confdefs.h. */
16259_ACEOF
16260cat confdefs.h >>conftest.$ac_ext
16261cat >>conftest.$ac_ext <<_ACEOF
16262/* end confdefs.h. */
16263$ac_includes_default
16264int
16265main ()
16266{
16267static struct stat ac_aggr;
16268if (sizeof ac_aggr.st_blksize)
16269return 0;
16270 ;
16271 return 0;
16272}
16273_ACEOF
16274rm -f conftest.$ac_objext
16275if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016276 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016277 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016278 grep -v '^ *+' conftest.er1 >conftest.err
16279 rm -f conftest.er1
16280 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16282 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016283 { ac_try='test -z "$ac_c_werror_flag"
16284 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016285 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16286 (eval $ac_try) 2>&5
16287 ac_status=$?
16288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16289 (exit $ac_status); }; } &&
16290 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16292 (eval $ac_try) 2>&5
16293 ac_status=$?
16294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16295 (exit $ac_status); }; }; then
16296 ac_cv_member_struct_stat_st_blksize=yes
16297else
16298 echo "$as_me: failed program was:" >&5
16299sed 's/^/| /' conftest.$ac_ext >&5
16300
Martin v. Löwis11437992002-04-12 09:54:03 +000016301ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016302fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016303rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016304fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016305rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016306fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016307echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
16308echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
16309if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000016310
Martin v. Löwis11437992002-04-12 09:54:03 +000016311cat >>confdefs.h <<_ACEOF
16312#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
16313_ACEOF
16314
16315
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016316fi
16317
Martin v. Löwis11437992002-04-12 09:54:03 +000016318echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
16319echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
16320if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
16321 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016322else
Martin v. Löwis11437992002-04-12 09:54:03 +000016323 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016324/* confdefs.h. */
16325_ACEOF
16326cat confdefs.h >>conftest.$ac_ext
16327cat >>conftest.$ac_ext <<_ACEOF
16328/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016329$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016330int
16331main ()
16332{
16333static struct stat ac_aggr;
16334if (ac_aggr.st_blocks)
16335return 0;
16336 ;
16337 return 0;
16338}
16339_ACEOF
16340rm -f conftest.$ac_objext
16341if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016342 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016343 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016344 grep -v '^ *+' conftest.er1 >conftest.err
16345 rm -f conftest.er1
16346 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16348 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016349 { ac_try='test -z "$ac_c_werror_flag"
16350 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016351 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16352 (eval $ac_try) 2>&5
16353 ac_status=$?
16354 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16355 (exit $ac_status); }; } &&
16356 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016357 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16358 (eval $ac_try) 2>&5
16359 ac_status=$?
16360 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16361 (exit $ac_status); }; }; then
16362 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000016363else
Martin v. Löwis11437992002-04-12 09:54:03 +000016364 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016365sed 's/^/| /' conftest.$ac_ext >&5
16366
16367cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016368/* confdefs.h. */
16369_ACEOF
16370cat confdefs.h >>conftest.$ac_ext
16371cat >>conftest.$ac_ext <<_ACEOF
16372/* end confdefs.h. */
16373$ac_includes_default
16374int
16375main ()
16376{
16377static struct stat ac_aggr;
16378if (sizeof ac_aggr.st_blocks)
16379return 0;
16380 ;
16381 return 0;
16382}
16383_ACEOF
16384rm -f conftest.$ac_objext
16385if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016386 (eval $ac_compile) 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000016387 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016388 grep -v '^ *+' conftest.er1 >conftest.err
16389 rm -f conftest.er1
16390 cat conftest.err >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16392 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016393 { ac_try='test -z "$ac_c_werror_flag"
16394 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016395 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16396 (eval $ac_try) 2>&5
16397 ac_status=$?
16398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16399 (exit $ac_status); }; } &&
16400 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000016401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16402 (eval $ac_try) 2>&5
16403 ac_status=$?
16404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16405 (exit $ac_status); }; }; then
16406 ac_cv_member_struct_stat_st_blocks=yes
16407else
16408 echo "$as_me: failed program was:" >&5
16409sed 's/^/| /' conftest.$ac_ext >&5
16410
Martin v. Löwis11437992002-04-12 09:54:03 +000016411ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000016412fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016413rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016414fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016415rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000016416fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016417echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
16418echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
16419if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000016420
Martin v. Löwis11437992002-04-12 09:54:03 +000016421cat >>confdefs.h <<_ACEOF
16422#define HAVE_STRUCT_STAT_ST_BLOCKS 1
16423_ACEOF
16424
16425
16426cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016427#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016428_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016429
16430else
Skip Montanarof0d5f792004-08-15 14:08:23 +000016431 case $LIBOBJS in
16432 "fileblocks.$ac_objext" | \
16433 *" fileblocks.$ac_objext" | \
16434 "fileblocks.$ac_objext "* | \
16435 *" fileblocks.$ac_objext "* ) ;;
16436 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext" ;;
16437esac
16438
Guido van Rossum98bf58f2001-10-18 20:34:25 +000016439fi
16440
Michael W. Hudson54241132001-12-07 15:38:26 +000016441
Martin v. Löwis11437992002-04-12 09:54:03 +000016442
16443echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
16444echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
16445if test "${ac_cv_header_time_altzone+set}" = set; then
16446 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016447else
Martin v. Löwis11437992002-04-12 09:54:03 +000016448 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016449/* confdefs.h. */
16450_ACEOF
16451cat confdefs.h >>conftest.$ac_ext
16452cat >>conftest.$ac_ext <<_ACEOF
16453/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016454#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016455int
16456main ()
16457{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016458return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000016459 ;
16460 return 0;
16461}
16462_ACEOF
16463rm -f conftest.$ac_objext
16464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016465 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016466 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016467 grep -v '^ *+' conftest.er1 >conftest.err
16468 rm -f conftest.er1
16469 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16471 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016472 { ac_try='test -z "$ac_c_werror_flag"
16473 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +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); }; } &&
16479 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016480 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16481 (eval $ac_try) 2>&5
16482 ac_status=$?
16483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16484 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016485 ac_cv_header_time_altzone=yes
16486else
Martin v. Löwis11437992002-04-12 09:54:03 +000016487 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016488sed 's/^/| /' conftest.$ac_ext >&5
16489
Martin v. Löwis11437992002-04-12 09:54:03 +000016490ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000016491fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016492rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016493fi
16494
Martin v. Löwis11437992002-04-12 09:54:03 +000016495echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
16496echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016497if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016498
16499cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016500#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016501_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016502
16503fi
16504
Guido van Rossumda88dad1995-01-26 00:46:29 +000016505was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016506echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
16507echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
16508cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016509/* confdefs.h. */
16510_ACEOF
16511cat confdefs.h >>conftest.$ac_ext
16512cat >>conftest.$ac_ext <<_ACEOF
16513/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016514
16515#include <sys/types.h>
16516#include <sys/select.h>
16517#include <sys/time.h>
16518
Martin v. Löwis11437992002-04-12 09:54:03 +000016519int
16520main ()
16521{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016522;
Martin v. Löwis11437992002-04-12 09:54:03 +000016523 ;
16524 return 0;
16525}
16526_ACEOF
16527rm -f conftest.$ac_objext
16528if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016529 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016530 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016531 grep -v '^ *+' conftest.er1 >conftest.err
16532 rm -f conftest.er1
16533 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16535 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016536 { ac_try='test -z "$ac_c_werror_flag"
16537 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16539 (eval $ac_try) 2>&5
16540 ac_status=$?
16541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16542 (exit $ac_status); }; } &&
16543 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016544 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16545 (eval $ac_try) 2>&5
16546 ac_status=$?
16547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16548 (exit $ac_status); }; }; then
16549
16550
16551cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016552#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016553_ACEOF
16554
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016555 was_it_defined=yes
16556
Guido van Rossumf78abae1997-01-21 22:02:36 +000016557else
Martin v. Löwis11437992002-04-12 09:54:03 +000016558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016559sed 's/^/| /' conftest.$ac_ext >&5
16560
Guido van Rossum7f43da71994-08-01 12:15:30 +000016561fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016562rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016563echo "$as_me:$LINENO: result: $was_it_defined" >&5
16564echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000016565
Martin v. Löwis11437992002-04-12 09:54:03 +000016566echo "$as_me:$LINENO: checking for addrinfo" >&5
16567echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
16568if test "${ac_cv_struct_addrinfo+set}" = set; then
16569 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016570else
Martin v. Löwis11437992002-04-12 09:54:03 +000016571 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016572/* confdefs.h. */
16573_ACEOF
16574cat confdefs.h >>conftest.$ac_ext
16575cat >>conftest.$ac_ext <<_ACEOF
16576/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016577
16578# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016579int
16580main ()
16581{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016582struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000016583 ;
16584 return 0;
16585}
16586_ACEOF
16587rm -f conftest.$ac_objext
16588if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016589 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016591 grep -v '^ *+' conftest.er1 >conftest.err
16592 rm -f conftest.er1
16593 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16595 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016596 { ac_try='test -z "$ac_c_werror_flag"
16597 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016598 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16599 (eval $ac_try) 2>&5
16600 ac_status=$?
16601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16602 (exit $ac_status); }; } &&
16603 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016604 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16605 (eval $ac_try) 2>&5
16606 ac_status=$?
16607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16608 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016609 ac_cv_struct_addrinfo=yes
16610else
Martin v. Löwis11437992002-04-12 09:54:03 +000016611 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016612sed 's/^/| /' conftest.$ac_ext >&5
16613
Martin v. Löwis11437992002-04-12 09:54:03 +000016614ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016615fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016616rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016617fi
16618
Martin v. Löwis11437992002-04-12 09:54:03 +000016619echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
16620echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016621if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016622
16623cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016624#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016625_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016626
16627fi
16628
Martin v. Löwis11437992002-04-12 09:54:03 +000016629echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
16630echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
16631if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
16632 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016633else
Martin v. Löwis11437992002-04-12 09:54:03 +000016634 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016635/* confdefs.h. */
16636_ACEOF
16637cat confdefs.h >>conftest.$ac_ext
16638cat >>conftest.$ac_ext <<_ACEOF
16639/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016640
16641# include <sys/types.h>
16642# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016643int
16644main ()
16645{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016646struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000016647 ;
16648 return 0;
16649}
16650_ACEOF
16651rm -f conftest.$ac_objext
16652if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016653 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016654 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016655 grep -v '^ *+' conftest.er1 >conftest.err
16656 rm -f conftest.er1
16657 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16659 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016660 { ac_try='test -z "$ac_c_werror_flag"
16661 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16663 (eval $ac_try) 2>&5
16664 ac_status=$?
16665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16666 (exit $ac_status); }; } &&
16667 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016668 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16669 (eval $ac_try) 2>&5
16670 ac_status=$?
16671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16672 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016673 ac_cv_struct_sockaddr_storage=yes
16674else
Martin v. Löwis11437992002-04-12 09:54:03 +000016675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016676sed 's/^/| /' conftest.$ac_ext >&5
16677
Martin v. Löwis11437992002-04-12 09:54:03 +000016678ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016679fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016680rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016681fi
16682
Martin v. Löwis11437992002-04-12 09:54:03 +000016683echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
16684echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016685if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016686
16687cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016688#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016689_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000016690
16691fi
16692
Guido van Rossum627b2d71993-12-24 10:39:16 +000016693# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000016694
Michael W. Hudson54241132001-12-07 15:38:26 +000016695
Martin v. Löwis11437992002-04-12 09:54:03 +000016696echo "$as_me:$LINENO: checking whether char is unsigned" >&5
16697echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
16698if test "${ac_cv_c_char_unsigned+set}" = set; then
16699 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000016700else
Martin v. Löwis11437992002-04-12 09:54:03 +000016701 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016702/* confdefs.h. */
16703_ACEOF
16704cat confdefs.h >>conftest.$ac_ext
16705cat >>conftest.$ac_ext <<_ACEOF
16706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016707$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000016708int
16709main ()
16710{
16711static int test_array [1 - 2 * !(((char) -1) < 0)];
16712test_array [0] = 0
16713
16714 ;
16715 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000016716}
Martin v. Löwis11437992002-04-12 09:54:03 +000016717_ACEOF
16718rm -f conftest.$ac_objext
16719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016720 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016721 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016722 grep -v '^ *+' conftest.er1 >conftest.err
16723 rm -f conftest.er1
16724 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16726 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016727 { ac_try='test -z "$ac_c_werror_flag"
16728 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16730 (eval $ac_try) 2>&5
16731 ac_status=$?
16732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16733 (exit $ac_status); }; } &&
16734 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000016740 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016741else
16742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016743sed 's/^/| /' conftest.$ac_ext >&5
16744
Martin v. Löwis11437992002-04-12 09:54:03 +000016745ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016746fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016747rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016748fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016749echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
16750echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016751if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016752 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016753#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016754_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016755
16756fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000016757
Martin v. Löwis11437992002-04-12 09:54:03 +000016758echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
16759echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
16760if test "${ac_cv_c_const+set}" = set; then
16761 echo $ECHO_N "(cached) $ECHO_C" >&6
16762else
16763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016764/* confdefs.h. */
16765_ACEOF
16766cat confdefs.h >>conftest.$ac_ext
16767cat >>conftest.$ac_ext <<_ACEOF
16768/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016769
Martin v. Löwis11437992002-04-12 09:54:03 +000016770int
16771main ()
16772{
16773/* FIXME: Include the comments suggested by Paul. */
16774#ifndef __cplusplus
16775 /* Ultrix mips cc rejects this. */
16776 typedef int charset[2];
16777 const charset x;
16778 /* SunOS 4.1.1 cc rejects this. */
16779 char const *const *ccp;
16780 char **p;
16781 /* NEC SVR4.0.2 mips cc rejects this. */
16782 struct point {int x, y;};
16783 static struct point const zero = {0,0};
16784 /* AIX XL C 1.02.0.0 rejects this.
16785 It does not let you subtract one const X* pointer from another in
16786 an arm of an if-expression whose if-part is not a constant
16787 expression */
16788 const char *g = "string";
16789 ccp = &g + (g ? g-g : 0);
16790 /* HPUX 7.0 cc rejects these. */
16791 ++ccp;
16792 p = (char**) ccp;
16793 ccp = (char const *const *) p;
16794 { /* SCO 3.2v4 cc rejects this. */
16795 char *t;
16796 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016797
Martin v. Löwis11437992002-04-12 09:54:03 +000016798 *t++ = 0;
16799 }
16800 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
16801 int x[] = {25, 17};
16802 const int *foo = &x[0];
16803 ++foo;
16804 }
16805 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
16806 typedef const int *iptr;
16807 iptr p = 0;
16808 ++p;
16809 }
16810 { /* AIX XL C 1.02.0.0 rejects this saying
16811 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
16812 struct s { int j; const int *ap[3]; };
16813 struct s *b; b->j = 5;
16814 }
16815 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
16816 const int foo = 10;
16817 }
16818#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000016819
Martin v. Löwis11437992002-04-12 09:54:03 +000016820 ;
16821 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000016822}
Martin v. Löwis11437992002-04-12 09:54:03 +000016823_ACEOF
16824rm -f conftest.$ac_objext
16825if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016826 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016828 grep -v '^ *+' conftest.er1 >conftest.err
16829 rm -f conftest.er1
16830 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16832 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016833 { ac_try='test -z "$ac_c_werror_flag"
16834 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16836 (eval $ac_try) 2>&5
16837 ac_status=$?
16838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16839 (exit $ac_status); }; } &&
16840 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016841 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16842 (eval $ac_try) 2>&5
16843 ac_status=$?
16844 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16845 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016846 ac_cv_c_const=yes
16847else
Martin v. Löwis11437992002-04-12 09:54:03 +000016848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016849sed 's/^/| /' conftest.$ac_ext >&5
16850
Martin v. Löwis11437992002-04-12 09:54:03 +000016851ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016852fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016853rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016854fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016855echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
16856echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016857if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016858
16859cat >>confdefs.h <<\_ACEOF
16860#define const
16861_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016862
16863fi
16864
Michael W. Hudson54241132001-12-07 15:38:26 +000016865
Guido van Rossumda88dad1995-01-26 00:46:29 +000016866works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016867echo "$as_me:$LINENO: checking for working volatile" >&5
16868echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
16869cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016870/* confdefs.h. */
16871_ACEOF
16872cat confdefs.h >>conftest.$ac_ext
16873cat >>conftest.$ac_ext <<_ACEOF
16874/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000016875
Martin v. Löwis11437992002-04-12 09:54:03 +000016876int
16877main ()
16878{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016879volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000016880 ;
16881 return 0;
16882}
16883_ACEOF
16884rm -f conftest.$ac_objext
16885if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016886 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016888 grep -v '^ *+' conftest.er1 >conftest.err
16889 rm -f conftest.er1
16890 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16892 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016893 { ac_try='test -z "$ac_c_werror_flag"
16894 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16896 (eval $ac_try) 2>&5
16897 ac_status=$?
16898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16899 (exit $ac_status); }; } &&
16900 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16902 (eval $ac_try) 2>&5
16903 ac_status=$?
16904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16905 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000016906 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016907else
Martin v. Löwis11437992002-04-12 09:54:03 +000016908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016909sed 's/^/| /' conftest.$ac_ext >&5
16910
Martin v. Löwis11437992002-04-12 09:54:03 +000016911
16912cat >>confdefs.h <<\_ACEOF
16913#define volatile
16914_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016915
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016916
Guido van Rossum627b2d71993-12-24 10:39:16 +000016917fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016918rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016919echo "$as_me:$LINENO: result: $works" >&5
16920echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000016921
Guido van Rossumda88dad1995-01-26 00:46:29 +000016922works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016923echo "$as_me:$LINENO: checking for working signed char" >&5
16924echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
16925cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016926/* confdefs.h. */
16927_ACEOF
16928cat confdefs.h >>conftest.$ac_ext
16929cat >>conftest.$ac_ext <<_ACEOF
16930/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000016931
Martin v. Löwis11437992002-04-12 09:54:03 +000016932int
16933main ()
16934{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016935signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000016936 ;
16937 return 0;
16938}
16939_ACEOF
16940rm -f conftest.$ac_objext
16941if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016942 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016944 grep -v '^ *+' conftest.er1 >conftest.err
16945 rm -f conftest.er1
16946 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16948 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000016949 { ac_try='test -z "$ac_c_werror_flag"
16950 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000016951 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16952 (eval $ac_try) 2>&5
16953 ac_status=$?
16954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16955 (exit $ac_status); }; } &&
16956 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16958 (eval $ac_try) 2>&5
16959 ac_status=$?
16960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16961 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000016962 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000016963else
Martin v. Löwis11437992002-04-12 09:54:03 +000016964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016965sed 's/^/| /' conftest.$ac_ext >&5
16966
Martin v. Löwis11437992002-04-12 09:54:03 +000016967
16968cat >>confdefs.h <<\_ACEOF
16969#define signed
16970_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000016971
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016972
Guido van Rossum7f43da71994-08-01 12:15:30 +000016973fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000016974rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016975echo "$as_me:$LINENO: result: $works" >&5
16976echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000016977
Guido van Rossumda88dad1995-01-26 00:46:29 +000016978have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016979echo "$as_me:$LINENO: checking for prototypes" >&5
16980echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
16981cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016982/* confdefs.h. */
16983_ACEOF
16984cat confdefs.h >>conftest.$ac_ext
16985cat >>conftest.$ac_ext <<_ACEOF
16986/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000016987int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016988int
16989main ()
16990{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016991return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000016992 ;
16993 return 0;
16994}
16995_ACEOF
16996rm -f conftest.$ac_objext
16997if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000016998 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016999 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017000 grep -v '^ *+' conftest.er1 >conftest.err
17001 rm -f conftest.er1
17002 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17004 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017005 { ac_try='test -z "$ac_c_werror_flag"
17006 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17008 (eval $ac_try) 2>&5
17009 ac_status=$?
17010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17011 (exit $ac_status); }; } &&
17012 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017013 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17014 (eval $ac_try) 2>&5
17015 ac_status=$?
17016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17017 (exit $ac_status); }; }; then
17018
17019
17020cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017021#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017022_ACEOF
17023
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017024 have_prototypes=yes
17025
Guido van Rossumf78abae1997-01-21 22:02:36 +000017026else
Martin v. Löwis11437992002-04-12 09:54:03 +000017027 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017028sed 's/^/| /' conftest.$ac_ext >&5
17029
Guido van Rossum7f43da71994-08-01 12:15:30 +000017030fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017031rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017032echo "$as_me:$LINENO: result: $have_prototypes" >&5
17033echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017034
Guido van Rossumda88dad1995-01-26 00:46:29 +000017035works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017036echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
17037echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
17038cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017039/* confdefs.h. */
17040_ACEOF
17041cat confdefs.h >>conftest.$ac_ext
17042cat >>conftest.$ac_ext <<_ACEOF
17043/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000017044
17045#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000017046int foo(int x, ...) {
17047 va_list va;
17048 va_start(va, x);
17049 va_arg(va, int);
17050 va_arg(va, char *);
17051 va_arg(va, double);
17052 return 0;
17053}
Guido van Rossum7f43da71994-08-01 12:15:30 +000017054
Martin v. Löwis11437992002-04-12 09:54:03 +000017055int
17056main ()
17057{
Guido van Rossum90eea071996-08-30 20:58:57 +000017058return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000017059 ;
17060 return 0;
17061}
17062_ACEOF
17063rm -f conftest.$ac_objext
17064if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017065 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017066 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017067 grep -v '^ *+' conftest.er1 >conftest.err
17068 rm -f conftest.er1
17069 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17071 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017072 { ac_try='test -z "$ac_c_werror_flag"
17073 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017074 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17075 (eval $ac_try) 2>&5
17076 ac_status=$?
17077 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17078 (exit $ac_status); }; } &&
17079 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
17085
17086
17087cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017088#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017089_ACEOF
17090
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017091 works=yes
17092
Guido van Rossumf78abae1997-01-21 22:02:36 +000017093else
Martin v. Löwis11437992002-04-12 09:54:03 +000017094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017095sed 's/^/| /' conftest.$ac_ext >&5
17096
Guido van Rossum627b2d71993-12-24 10:39:16 +000017097fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017098rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017099echo "$as_me:$LINENO: result: $works" >&5
17100echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017101
Martin v. Löwisd6320502004-08-12 13:45:08 +000017102# check for socketpair
17103echo "$as_me:$LINENO: checking for socketpair" >&5
17104echo $ECHO_N "checking for socketpair... $ECHO_C" >&6
17105cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000017106/* confdefs.h. */
17107_ACEOF
17108cat confdefs.h >>conftest.$ac_ext
17109cat >>conftest.$ac_ext <<_ACEOF
17110/* end confdefs.h. */
17111
17112#include <sys/types.h>
17113#include <sys/socket.h>
17114
17115int
17116main ()
17117{
17118void *x=socketpair
17119 ;
17120 return 0;
17121}
17122_ACEOF
17123rm -f conftest.$ac_objext
17124if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017125 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000017126 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017127 grep -v '^ *+' conftest.er1 >conftest.err
17128 rm -f conftest.er1
17129 cat conftest.err >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000017130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17131 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017132 { ac_try='test -z "$ac_c_werror_flag"
17133 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017134 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17135 (eval $ac_try) 2>&5
17136 ac_status=$?
17137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17138 (exit $ac_status); }; } &&
17139 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd6320502004-08-12 13:45:08 +000017140 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17141 (eval $ac_try) 2>&5
17142 ac_status=$?
17143 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17144 (exit $ac_status); }; }; then
17145
17146cat >>confdefs.h <<\_ACEOF
17147#define HAVE_SOCKETPAIR 1
17148_ACEOF
17149
17150 echo "$as_me:$LINENO: result: yes" >&5
17151echo "${ECHO_T}yes" >&6
17152else
17153 echo "$as_me: failed program was:" >&5
17154sed 's/^/| /' conftest.$ac_ext >&5
17155
17156echo "$as_me:$LINENO: result: no" >&5
17157echo "${ECHO_T}no" >&6
17158
17159fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017160rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000017161
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017162# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000017163echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
17164echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
17165cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017166/* confdefs.h. */
17167_ACEOF
17168cat confdefs.h >>conftest.$ac_ext
17169cat >>conftest.$ac_ext <<_ACEOF
17170/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017171#include <sys/types.h>
17172#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017173int
17174main ()
17175{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017176struct sockaddr x;
17177x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000017178 ;
17179 return 0;
17180}
17181_ACEOF
17182rm -f conftest.$ac_objext
17183if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017184 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017186 grep -v '^ *+' conftest.er1 >conftest.err
17187 rm -f conftest.er1
17188 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17190 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017191 { ac_try='test -z "$ac_c_werror_flag"
17192 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17194 (eval $ac_try) 2>&5
17195 ac_status=$?
17196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17197 (exit $ac_status); }; } &&
17198 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017199 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17200 (eval $ac_try) 2>&5
17201 ac_status=$?
17202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17203 (exit $ac_status); }; }; then
17204 echo "$as_me:$LINENO: result: yes" >&5
17205echo "${ECHO_T}yes" >&6
17206
17207cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017208#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017209_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017210
17211else
Martin v. Löwis11437992002-04-12 09:54:03 +000017212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017213sed 's/^/| /' conftest.$ac_ext >&5
17214
Martin v. Löwis11437992002-04-12 09:54:03 +000017215echo "$as_me:$LINENO: result: no" >&5
17216echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017217fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017218rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000017219
Guido van Rossumda88dad1995-01-26 00:46:29 +000017220va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000017221echo "$as_me:$LINENO: checking whether va_list is an array" >&5
17222echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
17223cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017224/* confdefs.h. */
17225_ACEOF
17226cat confdefs.h >>conftest.$ac_ext
17227cat >>conftest.$ac_ext <<_ACEOF
17228/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017229
17230#ifdef HAVE_STDARG_PROTOTYPES
17231#include <stdarg.h>
17232#else
17233#include <varargs.h>
17234#endif
17235
Martin v. Löwis11437992002-04-12 09:54:03 +000017236int
17237main ()
17238{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017239va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000017240 ;
17241 return 0;
17242}
17243_ACEOF
17244rm -f conftest.$ac_objext
17245if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017246 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017247 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017248 grep -v '^ *+' conftest.er1 >conftest.err
17249 rm -f conftest.er1
17250 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017251 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17252 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017253 { ac_try='test -z "$ac_c_werror_flag"
17254 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017255 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17256 (eval $ac_try) 2>&5
17257 ac_status=$?
17258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17259 (exit $ac_status); }; } &&
17260 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017261 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17262 (eval $ac_try) 2>&5
17263 ac_status=$?
17264 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17265 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017266 :
17267else
Martin v. Löwis11437992002-04-12 09:54:03 +000017268 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017269sed 's/^/| /' conftest.$ac_ext >&5
17270
Martin v. Löwis11437992002-04-12 09:54:03 +000017271
17272
17273cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017274#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017275_ACEOF
17276
Guido van Rossumda88dad1995-01-26 00:46:29 +000017277 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000017278
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017279fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017280rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017281echo "$as_me:$LINENO: result: $va_list_is_array" >&5
17282echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017283
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017284# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000017285
17286
17287
17288echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
17289echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
17290if test "${ac_cv_func_gethostbyname_r+set}" = set; then
17291 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017292else
Martin v. Löwis11437992002-04-12 09:54:03 +000017293 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017294/* confdefs.h. */
17295_ACEOF
17296cat confdefs.h >>conftest.$ac_ext
17297cat >>conftest.$ac_ext <<_ACEOF
17298/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017299/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017300 which can conflict with char gethostbyname_r (); below.
17301 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017302 <limits.h> exists even on freestanding compilers. Under hpux,
17303 including <limits.h> includes <sys/time.h> and causes problems
17304 checking for functions defined therein. */
17305#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017306# include <limits.h>
17307#else
17308# include <assert.h>
17309#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017310/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017311#ifdef __cplusplus
17312extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017313{
Martin v. Löwis11437992002-04-12 09:54:03 +000017314#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017315/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017316 builtin and then its argument prototype would still apply. */
17317char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017318/* The GNU C library defines this for functions which it implements
17319 to always fail with ENOSYS. Some functions are actually named
17320 something starting with __ and the normal name is an alias. */
17321#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
17322choke me
17323#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017324char (*f) () = gethostbyname_r;
17325#endif
17326#ifdef __cplusplus
17327}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017328#endif
17329
Skip Montanaro6dead952003-09-25 14:50:04 +000017330int
17331main ()
17332{
17333return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000017334 ;
17335 return 0;
17336}
17337_ACEOF
17338rm -f conftest.$ac_objext conftest$ac_exeext
17339if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017340 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017341 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017342 grep -v '^ *+' conftest.er1 >conftest.err
17343 rm -f conftest.er1
17344 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017345 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17346 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017347 { ac_try='test -z "$ac_c_werror_flag"
17348 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017349 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17350 (eval $ac_try) 2>&5
17351 ac_status=$?
17352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17353 (exit $ac_status); }; } &&
17354 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017355 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17356 (eval $ac_try) 2>&5
17357 ac_status=$?
17358 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17359 (exit $ac_status); }; }; then
17360 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017361else
Martin v. Löwis11437992002-04-12 09:54:03 +000017362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017363sed 's/^/| /' conftest.$ac_ext >&5
17364
Martin v. Löwis11437992002-04-12 09:54:03 +000017365ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017366fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017367rm -f conftest.err conftest.$ac_objext \
17368 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017369fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017370echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
17371echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
17372if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017373
Martin v. Löwis11437992002-04-12 09:54:03 +000017374 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017375#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017376_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017377
Martin v. Löwis11437992002-04-12 09:54:03 +000017378 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
17379echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017380 OLD_CFLAGS=$CFLAGS
17381 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017382 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017383/* confdefs.h. */
17384_ACEOF
17385cat confdefs.h >>conftest.$ac_ext
17386cat >>conftest.$ac_ext <<_ACEOF
17387/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017388
17389# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017390
Martin v. Löwis11437992002-04-12 09:54:03 +000017391int
17392main ()
17393{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017394
17395 char *name;
17396 struct hostent *he, *res;
17397 char buffer[2048];
17398 int buflen = 2048;
17399 int h_errnop;
17400
17401 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000017402
17403 ;
17404 return 0;
17405}
17406_ACEOF
17407rm -f conftest.$ac_objext
17408if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017409 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017411 grep -v '^ *+' conftest.er1 >conftest.err
17412 rm -f conftest.er1
17413 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17415 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017416 { ac_try='test -z "$ac_c_werror_flag"
17417 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017418 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17419 (eval $ac_try) 2>&5
17420 ac_status=$?
17421 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17422 (exit $ac_status); }; } &&
17423 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017424 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17425 (eval $ac_try) 2>&5
17426 ac_status=$?
17427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17428 (exit $ac_status); }; }; then
17429
17430 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017431#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017432_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017433
Martin v. Löwis11437992002-04-12 09:54:03 +000017434
17435cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017436#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017437_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017438
Martin v. Löwis11437992002-04-12 09:54:03 +000017439 echo "$as_me:$LINENO: result: yes" >&5
17440echo "${ECHO_T}yes" >&6
17441
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017442else
Martin v. Löwis11437992002-04-12 09:54:03 +000017443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017444sed 's/^/| /' conftest.$ac_ext >&5
17445
Martin v. Löwis11437992002-04-12 09:54:03 +000017446
17447 echo "$as_me:$LINENO: result: no" >&5
17448echo "${ECHO_T}no" >&6
17449 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
17450echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
17451 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017452/* confdefs.h. */
17453_ACEOF
17454cat confdefs.h >>conftest.$ac_ext
17455cat >>conftest.$ac_ext <<_ACEOF
17456/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017457
17458# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017459
Martin v. Löwis11437992002-04-12 09:54:03 +000017460int
17461main ()
17462{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017463
17464 char *name;
17465 struct hostent *he;
17466 char buffer[2048];
17467 int buflen = 2048;
17468 int h_errnop;
17469
17470 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000017471
17472 ;
17473 return 0;
17474}
17475_ACEOF
17476rm -f conftest.$ac_objext
17477if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017478 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017479 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017480 grep -v '^ *+' conftest.er1 >conftest.err
17481 rm -f conftest.er1
17482 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17484 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017485 { ac_try='test -z "$ac_c_werror_flag"
17486 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17488 (eval $ac_try) 2>&5
17489 ac_status=$?
17490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17491 (exit $ac_status); }; } &&
17492 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017493 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17494 (eval $ac_try) 2>&5
17495 ac_status=$?
17496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17497 (exit $ac_status); }; }; then
17498
17499 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017500#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017501_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017502
Martin v. Löwis11437992002-04-12 09:54:03 +000017503
17504cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017505#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017506_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017507
Martin v. Löwis11437992002-04-12 09:54:03 +000017508 echo "$as_me:$LINENO: result: yes" >&5
17509echo "${ECHO_T}yes" >&6
17510
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017511else
Martin v. Löwis11437992002-04-12 09:54:03 +000017512 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017513sed 's/^/| /' conftest.$ac_ext >&5
17514
Martin v. Löwis11437992002-04-12 09:54:03 +000017515
17516 echo "$as_me:$LINENO: result: no" >&5
17517echo "${ECHO_T}no" >&6
17518 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
17519echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
17520 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017521/* confdefs.h. */
17522_ACEOF
17523cat confdefs.h >>conftest.$ac_ext
17524cat >>conftest.$ac_ext <<_ACEOF
17525/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017526
17527# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017528
Martin v. Löwis11437992002-04-12 09:54:03 +000017529int
17530main ()
17531{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017532
17533 char *name;
17534 struct hostent *he;
17535 struct hostent_data data;
17536
17537 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000017538
17539 ;
17540 return 0;
17541}
17542_ACEOF
17543rm -f conftest.$ac_objext
17544if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017545 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017546 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017547 grep -v '^ *+' conftest.er1 >conftest.err
17548 rm -f conftest.er1
17549 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17551 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017552 { ac_try='test -z "$ac_c_werror_flag"
17553 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017554 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17555 (eval $ac_try) 2>&5
17556 ac_status=$?
17557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17558 (exit $ac_status); }; } &&
17559 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
17565
17566 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017567#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017568_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000017569
Martin v. Löwis11437992002-04-12 09:54:03 +000017570
17571cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017572#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017573_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017574
Martin v. Löwis11437992002-04-12 09:54:03 +000017575 echo "$as_me:$LINENO: result: yes" >&5
17576echo "${ECHO_T}yes" >&6
17577
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017578else
Martin v. Löwis11437992002-04-12 09:54:03 +000017579 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017580sed 's/^/| /' conftest.$ac_ext >&5
17581
Martin v. Löwis11437992002-04-12 09:54:03 +000017582
17583 echo "$as_me:$LINENO: result: no" >&5
17584echo "${ECHO_T}no" >&6
17585
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017586fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017587rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017588
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017589fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017590rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017591
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017592fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017593rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017594 CFLAGS=$OLD_CFLAGS
17595
17596else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017597
Martin v. Löwis11437992002-04-12 09:54:03 +000017598
17599for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000017600do
Martin v. Löwis11437992002-04-12 09:54:03 +000017601as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17602echo "$as_me:$LINENO: checking for $ac_func" >&5
17603echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17604if eval "test \"\${$as_ac_var+set}\" = set"; then
17605 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017606else
Martin v. Löwis11437992002-04-12 09:54:03 +000017607 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017608/* confdefs.h. */
17609_ACEOF
17610cat confdefs.h >>conftest.$ac_ext
17611cat >>conftest.$ac_ext <<_ACEOF
17612/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017613/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017614 which can conflict with char $ac_func (); below.
17615 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017616 <limits.h> exists even on freestanding compilers. Under hpux,
17617 including <limits.h> includes <sys/time.h> and causes problems
17618 checking for functions defined therein. */
17619#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017620# include <limits.h>
17621#else
17622# include <assert.h>
17623#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017624/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017625#ifdef __cplusplus
17626extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017627{
Martin v. Löwis11437992002-04-12 09:54:03 +000017628#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017629/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017630 builtin and then its argument prototype would still apply. */
17631char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017632/* The GNU C library defines this for functions which it implements
17633 to always fail with ENOSYS. Some functions are actually named
17634 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000017635#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017636choke me
17637#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017638char (*f) () = $ac_func;
17639#endif
17640#ifdef __cplusplus
17641}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017642#endif
17643
Skip Montanaro6dead952003-09-25 14:50:04 +000017644int
17645main ()
17646{
17647return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000017648 ;
17649 return 0;
17650}
17651_ACEOF
17652rm -f conftest.$ac_objext conftest$ac_exeext
17653if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017654 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017655 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017656 grep -v '^ *+' conftest.er1 >conftest.err
17657 rm -f conftest.er1
17658 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17660 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017661 { ac_try='test -z "$ac_c_werror_flag"
17662 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017663 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17664 (eval $ac_try) 2>&5
17665 ac_status=$?
17666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17667 (exit $ac_status); }; } &&
17668 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17670 (eval $ac_try) 2>&5
17671 ac_status=$?
17672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17673 (exit $ac_status); }; }; then
17674 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017675else
Martin v. Löwis11437992002-04-12 09:54:03 +000017676 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017677sed 's/^/| /' conftest.$ac_ext >&5
17678
Martin v. Löwis11437992002-04-12 09:54:03 +000017679eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017680fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017681rm -f conftest.err conftest.$ac_objext \
17682 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017683fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017684echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
17685echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17686if test `eval echo '${'$as_ac_var'}'` = yes; then
17687 cat >>confdefs.h <<_ACEOF
17688#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17689_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017690
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017691fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017692done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017693
Michael W. Hudson54241132001-12-07 15:38:26 +000017694
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000017695fi
17696
Michael W. Hudson54241132001-12-07 15:38:26 +000017697
17698
17699
17700
17701
17702
Guido van Rossum627b2d71993-12-24 10:39:16 +000017703# checks for system services
17704# (none yet)
17705
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017706# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000017707echo "$as_me:$LINENO: checking for __fpu_control" >&5
17708echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
17709if test "${ac_cv_func___fpu_control+set}" = set; then
17710 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017711else
Martin v. Löwis11437992002-04-12 09:54:03 +000017712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017713/* confdefs.h. */
17714_ACEOF
17715cat confdefs.h >>conftest.$ac_ext
17716cat >>conftest.$ac_ext <<_ACEOF
17717/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017718/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017719 which can conflict with char __fpu_control (); below.
17720 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017721 <limits.h> exists even on freestanding compilers. Under hpux,
17722 including <limits.h> includes <sys/time.h> and causes problems
17723 checking for functions defined therein. */
17724#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017725# include <limits.h>
17726#else
17727# include <assert.h>
17728#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017729/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017730#ifdef __cplusplus
17731extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017732{
Martin v. Löwis11437992002-04-12 09:54:03 +000017733#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017734/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017735 builtin and then its argument prototype would still apply. */
17736char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017737/* The GNU C library defines this for functions which it implements
17738 to always fail with ENOSYS. Some functions are actually named
17739 something starting with __ and the normal name is an alias. */
17740#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
17741choke me
17742#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017743char (*f) () = __fpu_control;
17744#endif
17745#ifdef __cplusplus
17746}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017747#endif
17748
Skip Montanaro6dead952003-09-25 14:50:04 +000017749int
17750main ()
17751{
17752return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000017753 ;
17754 return 0;
17755}
17756_ACEOF
17757rm -f conftest.$ac_objext conftest$ac_exeext
17758if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017759 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017760 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017761 grep -v '^ *+' conftest.er1 >conftest.err
17762 rm -f conftest.er1
17763 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17765 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017766 { ac_try='test -z "$ac_c_werror_flag"
17767 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017768 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17769 (eval $ac_try) 2>&5
17770 ac_status=$?
17771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17772 (exit $ac_status); }; } &&
17773 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17775 (eval $ac_try) 2>&5
17776 ac_status=$?
17777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17778 (exit $ac_status); }; }; then
17779 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017780else
Martin v. Löwis11437992002-04-12 09:54:03 +000017781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017782sed 's/^/| /' conftest.$ac_ext >&5
17783
Martin v. Löwis11437992002-04-12 09:54:03 +000017784ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017785fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017786rm -f conftest.err conftest.$ac_objext \
17787 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017788fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017789echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
17790echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
17791if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017792 :
17793else
Martin v. Löwis11437992002-04-12 09:54:03 +000017794
17795echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
17796echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
17797if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
17798 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017799else
Martin v. Löwis11437992002-04-12 09:54:03 +000017800 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017801LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017802cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017803/* confdefs.h. */
17804_ACEOF
17805cat confdefs.h >>conftest.$ac_ext
17806cat >>conftest.$ac_ext <<_ACEOF
17807/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017808
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017809/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017810#ifdef __cplusplus
17811extern "C"
17812#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017813/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017814 builtin and then its argument prototype would still apply. */
17815char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017816int
17817main ()
17818{
17819__fpu_control ();
17820 ;
17821 return 0;
17822}
17823_ACEOF
17824rm -f conftest.$ac_objext conftest$ac_exeext
17825if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000017826 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017828 grep -v '^ *+' conftest.er1 >conftest.err
17829 rm -f conftest.er1
17830 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017831 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17832 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000017833 { ac_try='test -z "$ac_c_werror_flag"
17834 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000017835 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17836 (eval $ac_try) 2>&5
17837 ac_status=$?
17838 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17839 (exit $ac_status); }; } &&
17840 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
17846 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000017847else
Martin v. Löwis11437992002-04-12 09:54:03 +000017848 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017849sed 's/^/| /' conftest.$ac_ext >&5
17850
Martin v. Löwis11437992002-04-12 09:54:03 +000017851ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017852fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000017853rm -f conftest.err conftest.$ac_objext \
17854 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017855LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017856fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017857echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
17858echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
17859if test $ac_cv_lib_ieee___fpu_control = yes; then
17860 cat >>confdefs.h <<_ACEOF
17861#define HAVE_LIBIEEE 1
17862_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017863
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017864 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017865
Guido van Rossum627b2d71993-12-24 10:39:16 +000017866fi
17867
Michael W. Hudson54241132001-12-07 15:38:26 +000017868
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000017869fi
17870
Michael W. Hudson54241132001-12-07 15:38:26 +000017871
Guido van Rossum7f253911997-05-09 02:42:48 +000017872# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000017873echo "$as_me:$LINENO: checking for --with-fpectl" >&5
17874echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
17875
Guido van Rossum7f253911997-05-09 02:42:48 +000017876# Check whether --with-fpectl or --without-fpectl was given.
17877if test "${with_fpectl+set}" = set; then
17878 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000017879
Guido van Rossum7f253911997-05-09 02:42:48 +000017880if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017881then
17882
17883cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000017884#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017885_ACEOF
17886
17887 echo "$as_me:$LINENO: result: yes" >&5
17888echo "${ECHO_T}yes" >&6
17889else echo "$as_me:$LINENO: result: no" >&5
17890echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017891fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017892else
Martin v. Löwis11437992002-04-12 09:54:03 +000017893 echo "$as_me:$LINENO: result: no" >&5
17894echo "${ECHO_T}no" >&6
17895fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000017896
Guido van Rossum7f43da71994-08-01 12:15:30 +000017897# check for --with-libm=...
17898
Guido van Rossum563e7081996-09-10 18:20:48 +000017899case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000017900Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000017901BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000017902*) LIBM=-lm
17903esac
Martin v. Löwis11437992002-04-12 09:54:03 +000017904echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
17905echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
17906
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017907# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017908if test "${with_libm+set}" = set; then
17909 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000017910
Guido van Rossum7f253911997-05-09 02:42:48 +000017911if test "$withval" = no
17912then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000017913 echo "$as_me:$LINENO: result: force LIBM empty" >&5
17914echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017915elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000017916then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000017917 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
17918echo "${ECHO_T}set LIBM=\"$withval\"" >&6
17919else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
17920echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
17921 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000017922fi
Guido van Rossum7f253911997-05-09 02:42:48 +000017923else
Martin v. Löwis11437992002-04-12 09:54:03 +000017924 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
17925echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
17926fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017927
17928# check for --with-libc=...
17929
Martin v. Löwis11437992002-04-12 09:54:03 +000017930echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
17931echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
17932
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017933# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017934if test "${with_libc+set}" = set; then
17935 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000017936
Guido van Rossum7f253911997-05-09 02:42:48 +000017937if test "$withval" = no
17938then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000017939 echo "$as_me:$LINENO: result: force LIBC empty" >&5
17940echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000017941elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000017942then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000017943 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
17944echo "${ECHO_T}set LIBC=\"$withval\"" >&6
17945else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
17946echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
17947 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000017948fi
Guido van Rossum7f253911997-05-09 02:42:48 +000017949else
Martin v. Löwis11437992002-04-12 09:54:03 +000017950 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
17951echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
17952fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000017953
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017954# check for hypot() in math library
17955LIBS_SAVE=$LIBS
17956LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000017957
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017958for ac_func in hypot
17959do
Martin v. Löwis11437992002-04-12 09:54:03 +000017960as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17961echo "$as_me:$LINENO: checking for $ac_func" >&5
17962echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17963if eval "test \"\${$as_ac_var+set}\" = set"; then
17964 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017965else
Martin v. Löwis11437992002-04-12 09:54:03 +000017966 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017967/* confdefs.h. */
17968_ACEOF
17969cat confdefs.h >>conftest.$ac_ext
17970cat >>conftest.$ac_ext <<_ACEOF
17971/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017972/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017973 which can conflict with char $ac_func (); below.
17974 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000017975 <limits.h> exists even on freestanding compilers. Under hpux,
17976 including <limits.h> includes <sys/time.h> and causes problems
17977 checking for functions defined therein. */
17978#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000017979# include <limits.h>
17980#else
17981# include <assert.h>
17982#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017983/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017984#ifdef __cplusplus
17985extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000017986{
Martin v. Löwis11437992002-04-12 09:54:03 +000017987#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017988/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017989 builtin and then its argument prototype would still apply. */
17990char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000017991/* The GNU C library defines this for functions which it implements
17992 to always fail with ENOSYS. Some functions are actually named
17993 something starting with __ and the normal name is an alias. */
17994#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17995choke me
17996#else
Skip Montanaro6dead952003-09-25 14:50:04 +000017997char (*f) () = $ac_func;
17998#endif
17999#ifdef __cplusplus
18000}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018001#endif
18002
Skip Montanaro6dead952003-09-25 14:50:04 +000018003int
18004main ()
18005{
18006return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000018007 ;
18008 return 0;
18009}
18010_ACEOF
18011rm -f conftest.$ac_objext conftest$ac_exeext
18012if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018013 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018014 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018015 grep -v '^ *+' conftest.er1 >conftest.err
18016 rm -f conftest.er1
18017 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18019 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018020 { ac_try='test -z "$ac_c_werror_flag"
18021 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018022 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18023 (eval $ac_try) 2>&5
18024 ac_status=$?
18025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18026 (exit $ac_status); }; } &&
18027 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018028 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18029 (eval $ac_try) 2>&5
18030 ac_status=$?
18031 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18032 (exit $ac_status); }; }; then
18033 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018034else
Martin v. Löwis11437992002-04-12 09:54:03 +000018035 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018036sed 's/^/| /' conftest.$ac_ext >&5
18037
Martin v. Löwis11437992002-04-12 09:54:03 +000018038eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018039fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018040rm -f conftest.err conftest.$ac_objext \
18041 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018042fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018043echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
18044echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
18045if test `eval echo '${'$as_ac_var'}'` = yes; then
18046 cat >>confdefs.h <<_ACEOF
18047#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18048_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018049
Michael W. Hudson54241132001-12-07 15:38:26 +000018050else
Skip Montanarof0d5f792004-08-15 14:08:23 +000018051 case $LIBOBJS in
18052 "$ac_func.$ac_objext" | \
18053 *" $ac_func.$ac_objext" | \
18054 "$ac_func.$ac_objext "* | \
18055 *" $ac_func.$ac_objext "* ) ;;
18056 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;;
18057esac
18058
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018059fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000018060done
18061
Michael W. Hudson54241132001-12-07 15:38:26 +000018062
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000018063LIBS=$LIBS_SAVE
18064
Guido van Rossumef2255b2000-03-10 22:30:29 +000018065# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000018066if test "${ac_cv_header_wchar_h+set}" = set; then
18067 echo "$as_me:$LINENO: checking for wchar.h" >&5
18068echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
18069if test "${ac_cv_header_wchar_h+set}" = set; then
18070 echo $ECHO_N "(cached) $ECHO_C" >&6
18071fi
18072echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
18073echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000018074else
Martin v. Löwis11437992002-04-12 09:54:03 +000018075 # Is the header compilable?
18076echo "$as_me:$LINENO: checking wchar.h usability" >&5
18077echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
18078cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018079/* confdefs.h. */
18080_ACEOF
18081cat confdefs.h >>conftest.$ac_ext
18082cat >>conftest.$ac_ext <<_ACEOF
18083/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018084$ac_includes_default
18085#include <wchar.h>
18086_ACEOF
18087rm -f conftest.$ac_objext
18088if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018089 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018090 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018091 grep -v '^ *+' conftest.er1 >conftest.err
18092 rm -f conftest.er1
18093 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18095 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018096 { ac_try='test -z "$ac_c_werror_flag"
18097 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18099 (eval $ac_try) 2>&5
18100 ac_status=$?
18101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18102 (exit $ac_status); }; } &&
18103 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18105 (eval $ac_try) 2>&5
18106 ac_status=$?
18107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18108 (exit $ac_status); }; }; then
18109 ac_header_compiler=yes
18110else
18111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018112sed 's/^/| /' conftest.$ac_ext >&5
18113
Martin v. Löwis11437992002-04-12 09:54:03 +000018114ac_header_compiler=no
18115fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018116rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018117echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
18118echo "${ECHO_T}$ac_header_compiler" >&6
18119
18120# Is the header present?
18121echo "$as_me:$LINENO: checking wchar.h presence" >&5
18122echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
18123cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018124/* confdefs.h. */
18125_ACEOF
18126cat confdefs.h >>conftest.$ac_ext
18127cat >>conftest.$ac_ext <<_ACEOF
18128/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000018129#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018130_ACEOF
18131if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
18132 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18133 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000018134 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000018135 rm -f conftest.er1
18136 cat conftest.err >&5
18137 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18138 (exit $ac_status); } >/dev/null; then
18139 if test -s conftest.err; then
18140 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000018141 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Martin v. Löwis11437992002-04-12 09:54:03 +000018142 else
18143 ac_cpp_err=
18144 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018145else
Martin v. Löwis11437992002-04-12 09:54:03 +000018146 ac_cpp_err=yes
18147fi
18148if test -z "$ac_cpp_err"; then
18149 ac_header_preproc=yes
18150else
18151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018152sed 's/^/| /' conftest.$ac_ext >&5
18153
Martin v. Löwis11437992002-04-12 09:54:03 +000018154 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000018155fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018156rm -f conftest.err conftest.$ac_ext
18157echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
18158echo "${ECHO_T}$ac_header_preproc" >&6
18159
18160# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018161case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
18162 yes:no: )
Martin v. Löwis11437992002-04-12 09:54:03 +000018163 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
18164echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018165 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
18166echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
18167 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018168 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018169 no:yes:* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018170 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
18171echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018172 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
18173echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
18174 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
18175echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
18176 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
18177echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018178 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
18179echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000018180 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
18181echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018182 (
18183 cat <<\_ASBOX
Skip Montanarof0d5f792004-08-15 14:08:23 +000018184## --------------------------------- ##
18185## Report this to the python lists. ##
18186## --------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000018187_ASBOX
18188 ) |
18189 sed "s/^/$as_me: WARNING: /" >&2
18190 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018191esac
18192echo "$as_me:$LINENO: checking for wchar.h" >&5
18193echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
18194if test "${ac_cv_header_wchar_h+set}" = set; then
18195 echo $ECHO_N "(cached) $ECHO_C" >&6
18196else
18197 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000018198fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018199echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
18200echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
18201
18202fi
18203if test $ac_cv_header_wchar_h = yes; then
18204
18205
18206cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000018207#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018208_ACEOF
18209
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018210 wchar_h="yes"
18211
Guido van Rossumef2255b2000-03-10 22:30:29 +000018212else
Martin v. Löwis11437992002-04-12 09:54:03 +000018213 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000018214
18215fi
18216
Michael W. Hudson54241132001-12-07 15:38:26 +000018217
Martin v. Löwis11437992002-04-12 09:54:03 +000018218
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018219# determine wchar_t size
18220if test "$wchar_h" = yes
18221then
Martin v. Löwis11437992002-04-12 09:54:03 +000018222 echo "$as_me:$LINENO: checking for wchar_t" >&5
18223echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
18224if test "${ac_cv_type_wchar_t+set}" = set; then
18225 echo $ECHO_N "(cached) $ECHO_C" >&6
18226else
18227 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018228/* confdefs.h. */
18229_ACEOF
18230cat confdefs.h >>conftest.$ac_ext
18231cat >>conftest.$ac_ext <<_ACEOF
18232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018233#include <wchar.h>
18234
Martin v. Löwis11437992002-04-12 09:54:03 +000018235int
18236main ()
18237{
18238if ((wchar_t *) 0)
18239 return 0;
18240if (sizeof (wchar_t))
18241 return 0;
18242 ;
18243 return 0;
18244}
18245_ACEOF
18246rm -f conftest.$ac_objext
18247if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018248 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018249 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018250 grep -v '^ *+' conftest.er1 >conftest.err
18251 rm -f conftest.er1
18252 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18254 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018255 { ac_try='test -z "$ac_c_werror_flag"
18256 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018257 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18258 (eval $ac_try) 2>&5
18259 ac_status=$?
18260 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18261 (exit $ac_status); }; } &&
18262 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018263 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18264 (eval $ac_try) 2>&5
18265 ac_status=$?
18266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18267 (exit $ac_status); }; }; then
18268 ac_cv_type_wchar_t=yes
18269else
18270 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018271sed 's/^/| /' conftest.$ac_ext >&5
18272
Martin v. Löwis11437992002-04-12 09:54:03 +000018273ac_cv_type_wchar_t=no
18274fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018275rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018276fi
18277echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
18278echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
18279
18280echo "$as_me:$LINENO: checking size of wchar_t" >&5
18281echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
18282if test "${ac_cv_sizeof_wchar_t+set}" = set; then
18283 echo $ECHO_N "(cached) $ECHO_C" >&6
18284else
18285 if test "$ac_cv_type_wchar_t" = yes; then
18286 # The cast to unsigned long works around a bug in the HP C Compiler
18287 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
18288 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
18289 # This bug is HP SR number 8606223364.
18290 if test "$cross_compiling" = yes; then
18291 # Depending upon the size, compute the lo and hi bounds.
18292cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018293/* confdefs.h. */
18294_ACEOF
18295cat confdefs.h >>conftest.$ac_ext
18296cat >>conftest.$ac_ext <<_ACEOF
18297/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018298#include <wchar.h>
18299
Martin v. Löwis11437992002-04-12 09:54:03 +000018300int
18301main ()
18302{
18303static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
18304test_array [0] = 0
18305
18306 ;
18307 return 0;
18308}
18309_ACEOF
18310rm -f conftest.$ac_objext
18311if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018312 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018314 grep -v '^ *+' conftest.er1 >conftest.err
18315 rm -f conftest.er1
18316 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018317 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18318 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018319 { ac_try='test -z "$ac_c_werror_flag"
18320 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18322 (eval $ac_try) 2>&5
18323 ac_status=$?
18324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18325 (exit $ac_status); }; } &&
18326 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018327 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18328 (eval $ac_try) 2>&5
18329 ac_status=$?
18330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18331 (exit $ac_status); }; }; then
18332 ac_lo=0 ac_mid=0
18333 while :; do
18334 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018335/* confdefs.h. */
18336_ACEOF
18337cat confdefs.h >>conftest.$ac_ext
18338cat >>conftest.$ac_ext <<_ACEOF
18339/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018340#include <wchar.h>
18341
Martin v. Löwis11437992002-04-12 09:54:03 +000018342int
18343main ()
18344{
18345static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
18346test_array [0] = 0
18347
18348 ;
18349 return 0;
18350}
18351_ACEOF
18352rm -f conftest.$ac_objext
18353if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018354 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018355 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018356 grep -v '^ *+' conftest.er1 >conftest.err
18357 rm -f conftest.er1
18358 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18360 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018361 { ac_try='test -z "$ac_c_werror_flag"
18362 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018363 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18364 (eval $ac_try) 2>&5
18365 ac_status=$?
18366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18367 (exit $ac_status); }; } &&
18368 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018369 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18370 (eval $ac_try) 2>&5
18371 ac_status=$?
18372 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18373 (exit $ac_status); }; }; then
18374 ac_hi=$ac_mid; break
18375else
18376 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018377sed 's/^/| /' conftest.$ac_ext >&5
18378
Martin v. Löwis11437992002-04-12 09:54:03 +000018379ac_lo=`expr $ac_mid + 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000018380 if test $ac_lo -le $ac_mid; then
18381 ac_lo= ac_hi=
18382 break
18383 fi
18384 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000018385fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018386rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018387 done
18388else
18389 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018390sed 's/^/| /' conftest.$ac_ext >&5
18391
Martin v. Löwis11437992002-04-12 09:54:03 +000018392cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018393/* confdefs.h. */
18394_ACEOF
18395cat confdefs.h >>conftest.$ac_ext
18396cat >>conftest.$ac_ext <<_ACEOF
18397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018398#include <wchar.h>
18399
Martin v. Löwis11437992002-04-12 09:54:03 +000018400int
18401main ()
18402{
18403static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
18404test_array [0] = 0
18405
18406 ;
18407 return 0;
18408}
18409_ACEOF
18410rm -f conftest.$ac_objext
18411if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018412 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018413 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018414 grep -v '^ *+' conftest.er1 >conftest.err
18415 rm -f conftest.er1
18416 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18418 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018419 { ac_try='test -z "$ac_c_werror_flag"
18420 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18422 (eval $ac_try) 2>&5
18423 ac_status=$?
18424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18425 (exit $ac_status); }; } &&
18426 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18428 (eval $ac_try) 2>&5
18429 ac_status=$?
18430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18431 (exit $ac_status); }; }; then
18432 ac_hi=-1 ac_mid=-1
18433 while :; do
18434 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018435/* confdefs.h. */
18436_ACEOF
18437cat confdefs.h >>conftest.$ac_ext
18438cat >>conftest.$ac_ext <<_ACEOF
18439/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018440#include <wchar.h>
18441
Martin v. Löwis11437992002-04-12 09:54:03 +000018442int
18443main ()
18444{
18445static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
18446test_array [0] = 0
18447
18448 ;
18449 return 0;
18450}
18451_ACEOF
18452rm -f conftest.$ac_objext
18453if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018454 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018456 grep -v '^ *+' conftest.er1 >conftest.err
18457 rm -f conftest.er1
18458 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18460 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018461 { ac_try='test -z "$ac_c_werror_flag"
18462 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018463 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18464 (eval $ac_try) 2>&5
18465 ac_status=$?
18466 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18467 (exit $ac_status); }; } &&
18468 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018469 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18470 (eval $ac_try) 2>&5
18471 ac_status=$?
18472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18473 (exit $ac_status); }; }; then
18474 ac_lo=$ac_mid; break
18475else
18476 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018477sed 's/^/| /' conftest.$ac_ext >&5
18478
Martin v. Löwis11437992002-04-12 09:54:03 +000018479ac_hi=`expr '(' $ac_mid ')' - 1`
Skip Montanarof0d5f792004-08-15 14:08:23 +000018480 if test $ac_mid -le $ac_hi; then
18481 ac_lo= ac_hi=
18482 break
18483 fi
18484 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000018485fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018486rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018487 done
18488else
18489 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018490sed 's/^/| /' conftest.$ac_ext >&5
18491
Martin v. Löwis11437992002-04-12 09:54:03 +000018492ac_lo= ac_hi=
18493fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018494rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018495fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018496rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018497# Binary search between lo and hi bounds.
18498while test "x$ac_lo" != "x$ac_hi"; do
18499 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
18500 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018501/* confdefs.h. */
18502_ACEOF
18503cat confdefs.h >>conftest.$ac_ext
18504cat >>conftest.$ac_ext <<_ACEOF
18505/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018506#include <wchar.h>
18507
Martin v. Löwis11437992002-04-12 09:54:03 +000018508int
18509main ()
18510{
18511static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
18512test_array [0] = 0
18513
18514 ;
18515 return 0;
18516}
18517_ACEOF
18518rm -f conftest.$ac_objext
18519if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018520 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018521 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018522 grep -v '^ *+' conftest.er1 >conftest.err
18523 rm -f conftest.er1
18524 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18526 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018527 { ac_try='test -z "$ac_c_werror_flag"
18528 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018529 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18530 (eval $ac_try) 2>&5
18531 ac_status=$?
18532 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18533 (exit $ac_status); }; } &&
18534 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018535 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18536 (eval $ac_try) 2>&5
18537 ac_status=$?
18538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18539 (exit $ac_status); }; }; then
18540 ac_hi=$ac_mid
18541else
18542 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018543sed 's/^/| /' conftest.$ac_ext >&5
18544
Martin v. Löwis11437992002-04-12 09:54:03 +000018545ac_lo=`expr '(' $ac_mid ')' + 1`
18546fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018547rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018548done
18549case $ac_lo in
18550?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018551'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
18552See \`config.log' for more details." >&5
18553echo "$as_me: error: cannot compute sizeof (wchar_t), 77
18554See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018555 { (exit 1); exit 1; }; } ;;
18556esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018557else
18558 if test "$cross_compiling" = yes; then
Trent Mickc5625ba2004-08-25 23:59:39 +000018559 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
18560See \`config.log' for more details." >&5
18561echo "$as_me: error: cannot run test program while cross compiling
18562See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018563 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000018564else
Martin v. Löwis11437992002-04-12 09:54:03 +000018565 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018566/* confdefs.h. */
18567_ACEOF
18568cat confdefs.h >>conftest.$ac_ext
18569cat >>conftest.$ac_ext <<_ACEOF
18570/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018571#include <wchar.h>
18572
18573long longval () { return (long) (sizeof (wchar_t)); }
18574unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000018575#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018576#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018577int
18578main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018579{
Martin v. Löwis11437992002-04-12 09:54:03 +000018580
18581 FILE *f = fopen ("conftest.val", "w");
18582 if (! f)
18583 exit (1);
18584 if (((long) (sizeof (wchar_t))) < 0)
18585 {
18586 long i = longval ();
18587 if (i != ((long) (sizeof (wchar_t))))
18588 exit (1);
18589 fprintf (f, "%ld\n", i);
18590 }
18591 else
18592 {
18593 unsigned long i = ulongval ();
18594 if (i != ((long) (sizeof (wchar_t))))
18595 exit (1);
18596 fprintf (f, "%lu\n", i);
18597 }
18598 exit (ferror (f) || fclose (f) != 0);
18599
18600 ;
18601 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000018602}
Martin v. Löwis11437992002-04-12 09:54:03 +000018603_ACEOF
18604rm -f conftest$ac_exeext
18605if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18606 (eval $ac_link) 2>&5
18607 ac_status=$?
18608 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18609 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18610 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18611 (eval $ac_try) 2>&5
18612 ac_status=$?
18613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18614 (exit $ac_status); }; }; then
18615 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000018616else
Martin v. Löwis11437992002-04-12 09:54:03 +000018617 echo "$as_me: program exited with status $ac_status" >&5
18618echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018619sed 's/^/| /' conftest.$ac_ext >&5
18620
Martin v. Löwis11437992002-04-12 09:54:03 +000018621( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000018622{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
18623See \`config.log' for more details." >&5
18624echo "$as_me: error: cannot compute sizeof (wchar_t), 77
18625See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000018626 { (exit 1); exit 1; }; }
18627fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018628rm -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 +000018629fi
18630fi
18631rm -f conftest.val
18632else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018633 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000018634fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018635fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018636echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
18637echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
18638cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018639#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000018640_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018641
Michael W. Hudson54241132001-12-07 15:38:26 +000018642
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018643fi
18644
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018645echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
18646echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
18647have_ucs4_tcl=no
18648cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018649/* confdefs.h. */
18650_ACEOF
18651cat confdefs.h >>conftest.$ac_ext
18652cat >>conftest.$ac_ext <<_ACEOF
18653/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018654
18655#include <tcl.h>
18656#if TCL_UTF_MAX != 6
18657# error "NOT UCS4_TCL"
18658#endif
18659int
18660main ()
18661{
18662
18663 ;
18664 return 0;
18665}
18666_ACEOF
18667rm -f conftest.$ac_objext
18668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018669 (eval $ac_compile) 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018671 grep -v '^ *+' conftest.er1 >conftest.err
18672 rm -f conftest.er1
18673 cat conftest.err >&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18675 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018676 { ac_try='test -z "$ac_c_werror_flag"
18677 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018678 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18679 (eval $ac_try) 2>&5
18680 ac_status=$?
18681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18682 (exit $ac_status); }; } &&
18683 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018684 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18685 (eval $ac_try) 2>&5
18686 ac_status=$?
18687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18688 (exit $ac_status); }; }; then
18689
18690
18691cat >>confdefs.h <<\_ACEOF
18692#define HAVE_UCS4_TCL 1
18693_ACEOF
18694
18695 have_ucs4_tcl=yes
18696
18697else
18698 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018699sed 's/^/| /' conftest.$ac_ext >&5
18700
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018701fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018702rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018703echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
18704echo "${ECHO_T}$have_ucs4_tcl" >&6
18705
Skip Montanaro6dead952003-09-25 14:50:04 +000018706# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018707if test "$wchar_h" = yes
18708then
18709 # check whether wchar_t is signed or not
18710 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
18711echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
18712 if test "${ac_cv_wchar_t_signed+set}" = set; then
18713 echo $ECHO_N "(cached) $ECHO_C" >&6
18714else
18715
18716 if test "$cross_compiling" = yes; then
18717 ac_cv_wchar_t_signed=yes
18718else
18719 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018720/* confdefs.h. */
18721_ACEOF
18722cat confdefs.h >>conftest.$ac_ext
18723cat >>conftest.$ac_ext <<_ACEOF
18724/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018725
18726 #include <wchar.h>
18727 int main()
18728 {
18729 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
18730 }
18731
18732_ACEOF
18733rm -f conftest$ac_exeext
18734if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18735 (eval $ac_link) 2>&5
18736 ac_status=$?
18737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18738 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18739 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18740 (eval $ac_try) 2>&5
18741 ac_status=$?
18742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18743 (exit $ac_status); }; }; then
18744 ac_cv_wchar_t_signed=yes
18745else
18746 echo "$as_me: program exited with status $ac_status" >&5
18747echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018748sed 's/^/| /' conftest.$ac_ext >&5
18749
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018750( exit $ac_status )
18751ac_cv_wchar_t_signed=no
18752fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018753rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018754fi
18755fi
18756
18757 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
18758echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
18759fi
18760
Martin v. Löwis11437992002-04-12 09:54:03 +000018761echo "$as_me:$LINENO: checking what type to use for unicode" >&5
18762echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018763# Check whether --enable-unicode or --disable-unicode was given.
18764if test "${enable_unicode+set}" = set; then
18765 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000018766
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018767else
18768 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000018769fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018770
18771if test $enable_unicode = yes
18772then
Martin v. Löwisfd917792001-06-27 20:22:04 +000018773 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000018774 case "$have_ucs4_tcl" in
18775 yes) enable_unicode="ucs4"
18776 ;;
18777 *) enable_unicode="ucs2"
18778 ;;
18779 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018780fi
18781
Martin v. Löwis0036cba2002-04-12 09:58:45 +000018782
18783
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018784case "$enable_unicode" in
18785ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000018786 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018787#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000018788_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018789
18790 ;;
18791ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000018792 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018793#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000018794_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018795
18796 ;;
18797esac
18798
Michael W. Hudson54241132001-12-07 15:38:26 +000018799
Martin v. Löwis11437992002-04-12 09:54:03 +000018800
18801
Martin v. Löwis0036cba2002-04-12 09:58:45 +000018802
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018803if test "$enable_unicode" = "no"
18804then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000018805 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000018806 echo "$as_me:$LINENO: result: not used" >&5
18807echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018808else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000018809 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000018810
18811cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018812#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018813_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018814
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018815
18816 # wchar_t is only usable if it maps to an unsigned type
18817 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
18818 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018819 then
18820 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018821
Martin v. Löwis11437992002-04-12 09:54:03 +000018822cat >>confdefs.h <<\_ACEOF
18823#define HAVE_USABLE_WCHAR_T 1
18824_ACEOF
18825
18826 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018827#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000018828_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018829
18830 elif test "$ac_cv_sizeof_short" = "$unicode_size"
18831 then
18832 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000018833 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018834#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000018835_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018836
18837 elif test "$ac_cv_sizeof_long" = "$unicode_size"
18838 then
18839 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000018840 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018841#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000018842_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018843
18844 else
18845 PY_UNICODE_TYPE="no type found"
18846 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018847 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
18848echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000018849fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000018850
18851# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000018852echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
18853echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
18854if test "${ac_cv_c_bigendian+set}" = set; then
18855 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000018856else
Martin v. Löwis11437992002-04-12 09:54:03 +000018857 # See if sys/param.h defines the BYTE_ORDER macro.
18858cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018859/* confdefs.h. */
18860_ACEOF
18861cat confdefs.h >>conftest.$ac_ext
18862cat >>conftest.$ac_ext <<_ACEOF
18863/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000018864#include <sys/types.h>
18865#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000018866
Martin v. Löwis11437992002-04-12 09:54:03 +000018867int
18868main ()
18869{
Guido van Rossumef2255b2000-03-10 22:30:29 +000018870#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
18871 bogus endian macros
18872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018873
18874 ;
18875 return 0;
18876}
18877_ACEOF
18878rm -f conftest.$ac_objext
18879if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018880 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018882 grep -v '^ *+' conftest.er1 >conftest.err
18883 rm -f conftest.er1
18884 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18886 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018887 { ac_try='test -z "$ac_c_werror_flag"
18888 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018889 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18890 (eval $ac_try) 2>&5
18891 ac_status=$?
18892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18893 (exit $ac_status); }; } &&
18894 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018895 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18896 (eval $ac_try) 2>&5
18897 ac_status=$?
18898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18899 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000018900 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000018901cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018902/* confdefs.h. */
18903_ACEOF
18904cat confdefs.h >>conftest.$ac_ext
18905cat >>conftest.$ac_ext <<_ACEOF
18906/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000018907#include <sys/types.h>
18908#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000018909
Martin v. Löwis11437992002-04-12 09:54:03 +000018910int
18911main ()
18912{
Guido van Rossumef2255b2000-03-10 22:30:29 +000018913#if BYTE_ORDER != BIG_ENDIAN
18914 not big endian
18915#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018916
18917 ;
18918 return 0;
18919}
18920_ACEOF
18921rm -f conftest.$ac_objext
18922if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018923 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018924 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018925 grep -v '^ *+' conftest.er1 >conftest.err
18926 rm -f conftest.er1
18927 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018928 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18929 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018930 { ac_try='test -z "$ac_c_werror_flag"
18931 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018932 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18933 (eval $ac_try) 2>&5
18934 ac_status=$?
18935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18936 (exit $ac_status); }; } &&
18937 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18939 (eval $ac_try) 2>&5
18940 ac_status=$?
18941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18942 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000018943 ac_cv_c_bigendian=yes
18944else
Martin v. Löwis11437992002-04-12 09:54:03 +000018945 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018946sed 's/^/| /' conftest.$ac_ext >&5
18947
Martin v. Löwis11437992002-04-12 09:54:03 +000018948ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000018949fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000018950rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000018951else
Martin v. Löwis11437992002-04-12 09:54:03 +000018952 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018953sed 's/^/| /' conftest.$ac_ext >&5
18954
Martin v. Löwis11437992002-04-12 09:54:03 +000018955# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000018956if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018957 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000018958 ac_cv_c_bigendian=unknown
18959 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018960/* confdefs.h. */
18961_ACEOF
18962cat confdefs.h >>conftest.$ac_ext
18963cat >>conftest.$ac_ext <<_ACEOF
18964/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018965short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
18966short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
18967void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
18968short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
18969short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
18970void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018971int
18972main ()
18973{
18974 _ascii (); _ebcdic ();
18975 ;
18976 return 0;
18977}
18978_ACEOF
18979rm -f conftest.$ac_objext
18980if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000018981 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018983 grep -v '^ *+' conftest.er1 >conftest.err
18984 rm -f conftest.er1
18985 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18987 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000018988 { ac_try='test -z "$ac_c_werror_flag"
18989 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000018990 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18991 (eval $ac_try) 2>&5
18992 ac_status=$?
18993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18994 (exit $ac_status); }; } &&
18995 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018996 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18997 (eval $ac_try) 2>&5
18998 ac_status=$?
18999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19000 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019001 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019002 ac_cv_c_bigendian=yes
19003fi
Skip Montanaro6dead952003-09-25 14:50:04 +000019004if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019005 if test "$ac_cv_c_bigendian" = unknown; then
19006 ac_cv_c_bigendian=no
19007 else
19008 # finding both strings is unlikely to happen, but who knows?
19009 ac_cv_c_bigendian=unknown
19010 fi
19011fi
19012else
19013 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019014sed 's/^/| /' conftest.$ac_ext >&5
19015
Martin v. Löwis11437992002-04-12 09:54:03 +000019016fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019017rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019018else
19019 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019020/* confdefs.h. */
19021_ACEOF
19022cat confdefs.h >>conftest.$ac_ext
19023cat >>conftest.$ac_ext <<_ACEOF
19024/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019025int
19026main ()
19027{
Guido van Rossumef2255b2000-03-10 22:30:29 +000019028 /* Are we little or big endian? From Harbison&Steele. */
19029 union
19030 {
19031 long l;
19032 char c[sizeof (long)];
19033 } u;
19034 u.l = 1;
19035 exit (u.c[sizeof (long) - 1] == 1);
19036}
Martin v. Löwis11437992002-04-12 09:54:03 +000019037_ACEOF
19038rm -f conftest$ac_exeext
19039if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19040 (eval $ac_link) 2>&5
19041 ac_status=$?
19042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19043 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19044 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19045 (eval $ac_try) 2>&5
19046 ac_status=$?
19047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19048 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000019049 ac_cv_c_bigendian=no
19050else
Martin v. Löwis11437992002-04-12 09:54:03 +000019051 echo "$as_me: program exited with status $ac_status" >&5
19052echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019053sed 's/^/| /' conftest.$ac_ext >&5
19054
Martin v. Löwis11437992002-04-12 09:54:03 +000019055( exit $ac_status )
19056ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000019057fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019058rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000019059fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019060fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019061rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019062fi
19063echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
19064echo "${ECHO_T}$ac_cv_c_bigendian" >&6
19065case $ac_cv_c_bigendian in
19066 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000019067
Martin v. Löwis11437992002-04-12 09:54:03 +000019068cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000019069#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019070_ACEOF
19071 ;;
19072 no)
19073 ;;
19074 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000019075 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019076presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019077echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000019078presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
19079 { (exit 1); exit 1; }; } ;;
19080esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000019081
Michael W. Hudson54241132001-12-07 15:38:26 +000019082
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019083# Check whether right shifting a negative integer extends the sign bit
19084# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000019085echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
19086echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
19087if test "${ac_cv_rshift_extends_sign+set}" = set; then
19088 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000019089else
Martin v. Löwis11437992002-04-12 09:54:03 +000019090
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019091if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000019092 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019093else
Martin v. Löwis11437992002-04-12 09:54:03 +000019094 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019095/* confdefs.h. */
19096_ACEOF
19097cat confdefs.h >>conftest.$ac_ext
19098cat >>conftest.$ac_ext <<_ACEOF
19099/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019100
19101int main()
19102{
Vladimir Marangozova6180282000-07-12 05:05:06 +000019103 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019104}
19105
Martin v. Löwis11437992002-04-12 09:54:03 +000019106_ACEOF
19107rm -f conftest$ac_exeext
19108if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19109 (eval $ac_link) 2>&5
19110 ac_status=$?
19111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19112 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19114 (eval $ac_try) 2>&5
19115 ac_status=$?
19116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19117 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000019118 ac_cv_rshift_extends_sign=yes
19119else
Martin v. Löwis11437992002-04-12 09:54:03 +000019120 echo "$as_me: program exited with status $ac_status" >&5
19121echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019122sed 's/^/| /' conftest.$ac_ext >&5
19123
Martin v. Löwis11437992002-04-12 09:54:03 +000019124( exit $ac_status )
19125ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000019126fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019127rm -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 +000019128fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000019129fi
19130
Martin v. Löwis11437992002-04-12 09:54:03 +000019131echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
19132echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000019133if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019134then
Martin v. Löwis11437992002-04-12 09:54:03 +000019135
19136cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019137#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019138_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019139
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019140fi
19141
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019142# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019143echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
19144echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
19145if test "${ac_cv_have_getc_unlocked+set}" = set; then
19146 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019147else
Martin v. Löwis11437992002-04-12 09:54:03 +000019148
19149cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019150/* confdefs.h. */
19151_ACEOF
19152cat confdefs.h >>conftest.$ac_ext
19153cat >>conftest.$ac_ext <<_ACEOF
19154/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019155#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019156int
19157main ()
19158{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019159
19160 FILE *f = fopen("/dev/null", "r");
19161 flockfile(f);
19162 getc_unlocked(f);
19163 funlockfile(f);
19164
Martin v. Löwis11437992002-04-12 09:54:03 +000019165 ;
19166 return 0;
19167}
19168_ACEOF
19169rm -f conftest.$ac_objext conftest$ac_exeext
19170if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019171 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019172 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019173 grep -v '^ *+' conftest.er1 >conftest.err
19174 rm -f conftest.er1
19175 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19177 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000019178 { ac_try='test -z "$ac_c_werror_flag"
19179 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19181 (eval $ac_try) 2>&5
19182 ac_status=$?
19183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19184 (exit $ac_status); }; } &&
19185 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019186 { (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
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019191 ac_cv_have_getc_unlocked=yes
19192else
Martin v. Löwis11437992002-04-12 09:54:03 +000019193 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019194sed 's/^/| /' conftest.$ac_ext >&5
19195
Martin v. Löwis11437992002-04-12 09:54:03 +000019196ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019197fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019198rm -f conftest.err conftest.$ac_objext \
19199 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019200fi
19201
Martin v. Löwis11437992002-04-12 09:54:03 +000019202echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
19203echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019204if test "$ac_cv_have_getc_unlocked" = yes
19205then
Martin v. Löwis11437992002-04-12 09:54:03 +000019206
19207cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019208#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019209_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000019210
19211fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000019212
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019213# check for readline 2.1
19214echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
19215echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
19216if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
19217 echo $ECHO_N "(cached) $ECHO_C" >&6
19218else
19219 ac_check_lib_save_LIBS=$LIBS
19220LIBS="-lreadline -ltermcap $LIBS"
19221cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019222/* confdefs.h. */
19223_ACEOF
19224cat confdefs.h >>conftest.$ac_ext
19225cat >>conftest.$ac_ext <<_ACEOF
19226/* end confdefs.h. */
19227
19228/* Override any gcc2 internal prototype to avoid an error. */
19229#ifdef __cplusplus
19230extern "C"
19231#endif
19232/* We use char because int might match the return type of a gcc2
19233 builtin and then its argument prototype would still apply. */
19234char rl_callback_handler_install ();
19235int
19236main ()
19237{
19238rl_callback_handler_install ();
19239 ;
19240 return 0;
19241}
19242_ACEOF
19243rm -f conftest.$ac_objext conftest$ac_exeext
19244if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019245 (eval $ac_link) 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019246 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019247 grep -v '^ *+' conftest.er1 >conftest.err
19248 rm -f conftest.er1
19249 cat conftest.err >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19251 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000019252 { ac_try='test -z "$ac_c_werror_flag"
19253 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019254 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19255 (eval $ac_try) 2>&5
19256 ac_status=$?
19257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19258 (exit $ac_status); }; } &&
19259 { ac_try='test -s conftest$ac_exeext'
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019260 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19261 (eval $ac_try) 2>&5
19262 ac_status=$?
19263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19264 (exit $ac_status); }; }; then
19265 ac_cv_lib_readline_rl_callback_handler_install=yes
19266else
19267 echo "$as_me: failed program was:" >&5
19268sed 's/^/| /' conftest.$ac_ext >&5
19269
19270ac_cv_lib_readline_rl_callback_handler_install=no
19271fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019272rm -f conftest.err conftest.$ac_objext \
19273 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019274LIBS=$ac_check_lib_save_LIBS
19275fi
19276echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
19277echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
19278if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
19279
19280cat >>confdefs.h <<\_ACEOF
19281#define HAVE_RL_CALLBACK 1
19282_ACEOF
19283
19284fi
19285
19286
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019287# check for readline 2.2
19288cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019289/* confdefs.h. */
19290_ACEOF
19291cat confdefs.h >>conftest.$ac_ext
19292cat >>conftest.$ac_ext <<_ACEOF
19293/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019294#include <readline/readline.h>
19295_ACEOF
19296if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19297 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19298 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000019299 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019300 rm -f conftest.er1
19301 cat conftest.err >&5
19302 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19303 (exit $ac_status); } >/dev/null; then
19304 if test -s conftest.err; then
19305 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000019306 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019307 else
19308 ac_cpp_err=
19309 fi
19310else
19311 ac_cpp_err=yes
19312fi
19313if test -z "$ac_cpp_err"; then
19314 have_readline=yes
19315else
19316 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019317sed 's/^/| /' conftest.$ac_ext >&5
19318
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019319 have_readline=no
19320fi
19321rm -f conftest.err conftest.$ac_ext
19322if test $have_readline = yes
19323then
19324 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019325/* confdefs.h. */
19326_ACEOF
19327cat confdefs.h >>conftest.$ac_ext
19328cat >>conftest.$ac_ext <<_ACEOF
19329/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019330#include <readline/readline.h>
19331
19332_ACEOF
19333if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000019334 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000019335
19336cat >>confdefs.h <<\_ACEOF
19337#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
19338_ACEOF
19339
19340fi
19341rm -f conftest*
19342
19343fi
19344
Martin v. Löwis0daad592001-09-30 21:09:59 +000019345# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000019346echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
19347echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
19348if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
19349 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000019350else
Martin v. Löwis11437992002-04-12 09:54:03 +000019351 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000019352LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019353cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019354/* confdefs.h. */
19355_ACEOF
19356cat confdefs.h >>conftest.$ac_ext
19357cat >>conftest.$ac_ext <<_ACEOF
19358/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019359
Guido van Rossum353ae582001-07-10 16:45:32 +000019360/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019361#ifdef __cplusplus
19362extern "C"
19363#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000019364/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019365 builtin and then its argument prototype would still apply. */
19366char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019367int
19368main ()
19369{
19370rl_pre_input_hook ();
19371 ;
19372 return 0;
19373}
19374_ACEOF
19375rm -f conftest.$ac_objext conftest$ac_exeext
19376if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019377 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019378 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019379 grep -v '^ *+' conftest.er1 >conftest.err
19380 rm -f conftest.er1
19381 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19383 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000019384 { ac_try='test -z "$ac_c_werror_flag"
19385 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019386 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19387 (eval $ac_try) 2>&5
19388 ac_status=$?
19389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19390 (exit $ac_status); }; } &&
19391 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019392 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19393 (eval $ac_try) 2>&5
19394 ac_status=$?
19395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19396 (exit $ac_status); }; }; then
19397 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000019398else
Martin v. Löwis11437992002-04-12 09:54:03 +000019399 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019400sed 's/^/| /' conftest.$ac_ext >&5
19401
Martin v. Löwis11437992002-04-12 09:54:03 +000019402ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000019403fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019404rm -f conftest.err conftest.$ac_objext \
19405 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019406LIBS=$ac_check_lib_save_LIBS
19407fi
19408echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
19409echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
19410if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019411
Martin v. Löwis11437992002-04-12 09:54:03 +000019412cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000019413#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019414_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000019415
Martin v. Löwis0daad592001-09-30 21:09:59 +000019416fi
19417
Michael W. Hudson54241132001-12-07 15:38:26 +000019418
Martin v. Löwis0daad592001-09-30 21:09:59 +000019419# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000019420echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
19421echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
19422if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
19423 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000019424else
Martin v. Löwis11437992002-04-12 09:54:03 +000019425 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000019426LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019427cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019428/* confdefs.h. */
19429_ACEOF
19430cat confdefs.h >>conftest.$ac_ext
19431cat >>conftest.$ac_ext <<_ACEOF
19432/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019433
Martin v. Löwis0daad592001-09-30 21:09:59 +000019434/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019435#ifdef __cplusplus
19436extern "C"
19437#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000019438/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000019439 builtin and then its argument prototype would still apply. */
19440char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019441int
19442main ()
19443{
19444rl_completion_matches ();
19445 ;
19446 return 0;
19447}
19448_ACEOF
19449rm -f conftest.$ac_objext conftest$ac_exeext
19450if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019451 (eval $ac_link) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019453 grep -v '^ *+' conftest.er1 >conftest.err
19454 rm -f conftest.er1
19455 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19457 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000019458 { ac_try='test -z "$ac_c_werror_flag"
19459 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019460 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19461 (eval $ac_try) 2>&5
19462 ac_status=$?
19463 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19464 (exit $ac_status); }; } &&
19465 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019466 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19467 (eval $ac_try) 2>&5
19468 ac_status=$?
19469 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19470 (exit $ac_status); }; }; then
19471 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000019472else
Martin v. Löwis11437992002-04-12 09:54:03 +000019473 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019474sed 's/^/| /' conftest.$ac_ext >&5
19475
Martin v. Löwis11437992002-04-12 09:54:03 +000019476ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000019477fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019478rm -f conftest.err conftest.$ac_objext \
19479 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019480LIBS=$ac_check_lib_save_LIBS
19481fi
19482echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
19483echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
19484if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000019485
Martin v. Löwis11437992002-04-12 09:54:03 +000019486cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000019487#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019488_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000019489
Guido van Rossum353ae582001-07-10 16:45:32 +000019490fi
19491
Jack Jansendd19cf82001-12-06 22:36:17 +000019492
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019493# also in readline 4.2
19494cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019495/* confdefs.h. */
19496_ACEOF
19497cat confdefs.h >>conftest.$ac_ext
19498cat >>conftest.$ac_ext <<_ACEOF
19499/* end confdefs.h. */
19500#include <readline/readline.h>
19501_ACEOF
19502if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
19503 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19504 ac_status=$?
19505 grep -v '^ *+' conftest.er1 >conftest.err
19506 rm -f conftest.er1
19507 cat conftest.err >&5
19508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19509 (exit $ac_status); } >/dev/null; then
19510 if test -s conftest.err; then
19511 ac_cpp_err=$ac_c_preproc_warn_flag
Skip Montanarof0d5f792004-08-15 14:08:23 +000019512 ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019513 else
19514 ac_cpp_err=
19515 fi
19516else
19517 ac_cpp_err=yes
19518fi
19519if test -z "$ac_cpp_err"; then
19520 have_readline=yes
19521else
19522 echo "$as_me: failed program was:" >&5
19523sed 's/^/| /' conftest.$ac_ext >&5
19524
19525 have_readline=no
19526fi
19527rm -f conftest.err conftest.$ac_ext
19528if test $have_readline = yes
19529then
19530 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019531/* confdefs.h. */
19532_ACEOF
19533cat confdefs.h >>conftest.$ac_ext
19534cat >>conftest.$ac_ext <<_ACEOF
19535/* end confdefs.h. */
19536#include <readline/readline.h>
19537
19538_ACEOF
19539if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19540 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
19541
19542cat >>confdefs.h <<\_ACEOF
19543#define HAVE_RL_CATCH_SIGNAL 1
19544_ACEOF
19545
19546fi
19547rm -f conftest*
19548
19549fi
19550
Martin v. Löwis11437992002-04-12 09:54:03 +000019551echo "$as_me:$LINENO: checking for broken nice()" >&5
19552echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
19553if test "${ac_cv_broken_nice+set}" = set; then
19554 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000019555else
Martin v. Löwis11437992002-04-12 09:54:03 +000019556
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019557if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000019558 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019559else
Martin v. Löwis11437992002-04-12 09:54:03 +000019560 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019561/* confdefs.h. */
19562_ACEOF
19563cat confdefs.h >>conftest.$ac_ext
19564cat >>conftest.$ac_ext <<_ACEOF
19565/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019566
19567int main()
19568{
19569 int val1 = nice(1);
19570 if (val1 != -1 && val1 == nice(2))
19571 exit(0);
19572 exit(1);
19573}
19574
Martin v. Löwis11437992002-04-12 09:54:03 +000019575_ACEOF
19576rm -f conftest$ac_exeext
19577if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19578 (eval $ac_link) 2>&5
19579 ac_status=$?
19580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19581 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19583 (eval $ac_try) 2>&5
19584 ac_status=$?
19585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19586 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019587 ac_cv_broken_nice=yes
19588else
Martin v. Löwis11437992002-04-12 09:54:03 +000019589 echo "$as_me: program exited with status $ac_status" >&5
19590echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019591sed 's/^/| /' conftest.$ac_ext >&5
19592
Martin v. Löwis11437992002-04-12 09:54:03 +000019593( exit $ac_status )
19594ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019595fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019596rm -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 +000019597fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019598fi
19599
Martin v. Löwis11437992002-04-12 09:54:03 +000019600echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
19601echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019602if test "$ac_cv_broken_nice" = yes
19603then
Martin v. Löwis11437992002-04-12 09:54:03 +000019604
19605cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019606#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019607_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000019608
19609fi
19610
Nicholas Bastine62c5c82004-03-21 23:45:42 +000019611echo "$as_me:$LINENO: checking for broken poll()" >&5
19612echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
19613if test "$cross_compiling" = yes; then
19614 ac_cv_broken_poll=no
19615else
19616 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000019617/* confdefs.h. */
19618_ACEOF
19619cat confdefs.h >>conftest.$ac_ext
19620cat >>conftest.$ac_ext <<_ACEOF
19621/* end confdefs.h. */
19622
19623#include <poll.h>
19624
19625int main (void)
19626 {
19627 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
19628
19629 close (42);
19630
19631 int poll_test = poll (&poll_struct, 1, 0);
19632
19633 if (poll_test < 0)
19634 {
19635 exit(0);
19636 }
19637 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
19638 {
19639 exit(0);
19640 }
19641 else
19642 {
19643 exit(1);
19644 }
19645 }
19646
19647_ACEOF
19648rm -f conftest$ac_exeext
19649if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19650 (eval $ac_link) 2>&5
19651 ac_status=$?
19652 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19653 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19654 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19655 (eval $ac_try) 2>&5
19656 ac_status=$?
19657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19658 (exit $ac_status); }; }; then
19659 ac_cv_broken_poll=yes
19660else
19661 echo "$as_me: program exited with status $ac_status" >&5
19662echo "$as_me: failed program was:" >&5
19663sed 's/^/| /' conftest.$ac_ext >&5
19664
19665( exit $ac_status )
19666ac_cv_broken_poll=no
19667fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019668rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000019669fi
19670echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
19671echo "${ECHO_T}$ac_cv_broken_poll" >&6
19672if test "$ac_cv_broken_poll" = yes
19673then
19674
19675cat >>confdefs.h <<\_ACEOF
19676#define HAVE_BROKEN_POLL 1
19677_ACEOF
19678
19679fi
19680
19681
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019682# tzset(3) exists and works like we expect it to
19683echo "$as_me:$LINENO: checking for working tzset()" >&5
19684echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
19685if test "${ac_cv_working_tzset+set}" = set; then
19686 echo $ECHO_N "(cached) $ECHO_C" >&6
19687else
19688
19689if test "$cross_compiling" = yes; then
19690 ac_cv_working_tzset=no
19691else
19692 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019693/* confdefs.h. */
19694_ACEOF
19695cat confdefs.h >>conftest.$ac_ext
19696cat >>conftest.$ac_ext <<_ACEOF
19697/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019698
19699#include <stdlib.h>
19700#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000019701#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019702int main()
19703{
Brett Cannon18367812003-09-19 00:59:16 +000019704 /* Note that we need to ensure that not only does tzset(3)
19705 do 'something' with localtime, but it works as documented
19706 in the library reference and as expected by the test suite.
19707
19708 Red Hat 6.2 doesn't understand the southern hemisphere
19709 after New Year's Day; it thinks swaps on that day.
19710 */
19711
19712 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
19713 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
19714
Neal Norwitz7f2588c2003-04-11 15:35:53 +000019715 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019716 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000019717 if (localtime(&groundhogday)->tm_hour != 0)
19718 exit(1);
19719
Neal Norwitz7f2588c2003-04-11 15:35:53 +000019720 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019721 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000019722 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019723 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000019724
19725 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
19726 tzset();
19727 if (localtime(&groundhogday)->tm_hour != 11)
19728 exit(1);
19729 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
19730 exit(1);
19731 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
19732 exit(1);
19733
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019734 exit(0);
19735}
19736
19737_ACEOF
19738rm -f conftest$ac_exeext
19739if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
19740 (eval $ac_link) 2>&5
19741 ac_status=$?
19742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19743 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19744 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19745 (eval $ac_try) 2>&5
19746 ac_status=$?
19747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19748 (exit $ac_status); }; }; then
19749 ac_cv_working_tzset=yes
19750else
19751 echo "$as_me: program exited with status $ac_status" >&5
19752echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019753sed 's/^/| /' conftest.$ac_ext >&5
19754
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019755( exit $ac_status )
19756ac_cv_working_tzset=no
19757fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019758rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000019759fi
19760fi
19761
19762echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
19763echo "${ECHO_T}$ac_cv_working_tzset" >&6
19764if test "$ac_cv_working_tzset" = yes
19765then
19766
19767cat >>confdefs.h <<\_ACEOF
19768#define HAVE_WORKING_TZSET 1
19769_ACEOF
19770
19771fi
19772
Martin v. Löwis94717ed2002-09-09 14:24:16 +000019773# Look for subsecond timestamps in struct stat
19774echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
19775echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
19776if test "${ac_cv_stat_tv_nsec+set}" = set; then
19777 echo $ECHO_N "(cached) $ECHO_C" >&6
19778else
19779 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019780/* confdefs.h. */
19781_ACEOF
19782cat confdefs.h >>conftest.$ac_ext
19783cat >>conftest.$ac_ext <<_ACEOF
19784/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000019785#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000019786int
19787main ()
19788{
19789
19790struct stat st;
19791st.st_mtim.tv_nsec = 1;
19792
19793 ;
19794 return 0;
19795}
19796_ACEOF
19797rm -f conftest.$ac_objext
19798if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019799 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000019800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019801 grep -v '^ *+' conftest.er1 >conftest.err
19802 rm -f conftest.er1
19803 cat conftest.err >&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000019804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19805 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000019806 { ac_try='test -z "$ac_c_werror_flag"
19807 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19809 (eval $ac_try) 2>&5
19810 ac_status=$?
19811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19812 (exit $ac_status); }; } &&
19813 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis94717ed2002-09-09 14:24:16 +000019814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19815 (eval $ac_try) 2>&5
19816 ac_status=$?
19817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19818 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000019819 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000019820else
19821 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019822sed 's/^/| /' conftest.$ac_ext >&5
19823
Martin v. Löwis94717ed2002-09-09 14:24:16 +000019824ac_cv_stat_tv_nsec=no
19825fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019826rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000019827fi
19828
19829echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
19830echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
19831if test "$ac_cv_stat_tv_nsec" = yes
19832then
19833
19834cat >>confdefs.h <<\_ACEOF
19835#define HAVE_STAT_TV_NSEC 1
19836_ACEOF
19837
19838fi
19839
Jack Jansen666b1e72001-10-31 12:11:48 +000019840# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000019841echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
19842echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
19843if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
19844 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000019845else
Martin v. Löwis11437992002-04-12 09:54:03 +000019846 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019847/* confdefs.h. */
19848_ACEOF
19849cat confdefs.h >>conftest.$ac_ext
19850cat >>conftest.$ac_ext <<_ACEOF
19851/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000019852#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019853int
19854main ()
19855{
Jack Jansen666b1e72001-10-31 12:11:48 +000019856
19857 int rtn;
19858 rtn = mvwdelch(0,0,0);
19859
Martin v. Löwis11437992002-04-12 09:54:03 +000019860 ;
19861 return 0;
19862}
19863_ACEOF
19864rm -f conftest.$ac_objext
19865if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019866 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019867 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019868 grep -v '^ *+' conftest.er1 >conftest.err
19869 rm -f conftest.er1
19870 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19872 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000019873 { ac_try='test -z "$ac_c_werror_flag"
19874 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19876 (eval $ac_try) 2>&5
19877 ac_status=$?
19878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19879 (exit $ac_status); }; } &&
19880 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019881 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19882 (eval $ac_try) 2>&5
19883 ac_status=$?
19884 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19885 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000019886 ac_cv_mvwdelch_is_expression=yes
19887else
Martin v. Löwis11437992002-04-12 09:54:03 +000019888 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019889sed 's/^/| /' conftest.$ac_ext >&5
19890
Martin v. Löwis11437992002-04-12 09:54:03 +000019891ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000019892fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019893rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000019894fi
19895
Martin v. Löwis11437992002-04-12 09:54:03 +000019896echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
19897echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000019898
19899if test "$ac_cv_mvwdelch_is_expression" = yes
19900then
Martin v. Löwis11437992002-04-12 09:54:03 +000019901
19902cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000019903#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019904_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000019905
19906fi
19907
Martin v. Löwis11437992002-04-12 09:54:03 +000019908echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
19909echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
19910if test "${ac_cv_window_has_flags+set}" = set; then
19911 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000019912else
Martin v. Löwis11437992002-04-12 09:54:03 +000019913 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019914/* confdefs.h. */
19915_ACEOF
19916cat confdefs.h >>conftest.$ac_ext
19917cat >>conftest.$ac_ext <<_ACEOF
19918/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000019919#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019920int
19921main ()
19922{
Jack Jansen666b1e72001-10-31 12:11:48 +000019923
19924 WINDOW *w;
19925 w->_flags = 0;
19926
Martin v. Löwis11437992002-04-12 09:54:03 +000019927 ;
19928 return 0;
19929}
19930_ACEOF
19931rm -f conftest.$ac_objext
19932if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000019933 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019934 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019935 grep -v '^ *+' conftest.er1 >conftest.err
19936 rm -f conftest.er1
19937 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19939 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000019940 { ac_try='test -z "$ac_c_werror_flag"
19941 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000019942 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19943 (eval $ac_try) 2>&5
19944 ac_status=$?
19945 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19946 (exit $ac_status); }; } &&
19947 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000019948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
19949 (eval $ac_try) 2>&5
19950 ac_status=$?
19951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19952 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000019953 ac_cv_window_has_flags=yes
19954else
Martin v. Löwis11437992002-04-12 09:54:03 +000019955 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019956sed 's/^/| /' conftest.$ac_ext >&5
19957
Martin v. Löwis11437992002-04-12 09:54:03 +000019958ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000019959fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000019960rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000019961fi
19962
Martin v. Löwis11437992002-04-12 09:54:03 +000019963echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
19964echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000019965
Jack Jansen666b1e72001-10-31 12:11:48 +000019966
19967if test "$ac_cv_window_has_flags" = yes
19968then
Martin v. Löwis11437992002-04-12 09:54:03 +000019969
19970cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000019971#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019972_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000019973
19974fi
19975
Martin v. Löwis24a880b2002-12-31 12:55:15 +000019976echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
19977echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
19978
19979if test -e /dev/ptmx
19980then
19981 echo "$as_me:$LINENO: result: yes" >&5
19982echo "${ECHO_T}yes" >&6
19983
19984cat >>confdefs.h <<\_ACEOF
19985#define HAVE_DEV_PTMX 1
19986_ACEOF
19987
19988else
19989 echo "$as_me:$LINENO: result: no" >&5
19990echo "${ECHO_T}no" >&6
19991fi
19992
Neal Norwitz865400f2003-03-21 01:42:58 +000019993echo "$as_me:$LINENO: checking for /dev/ptc" >&5
19994echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
19995
19996if test -e /dev/ptc
19997then
19998 echo "$as_me:$LINENO: result: yes" >&5
19999echo "${ECHO_T}yes" >&6
20000
20001cat >>confdefs.h <<\_ACEOF
20002#define HAVE_DEV_PTC 1
20003_ACEOF
20004
20005else
20006 echo "$as_me:$LINENO: result: no" >&5
20007echo "${ECHO_T}no" >&6
20008fi
20009
Martin v. Löwis11437992002-04-12 09:54:03 +000020010echo "$as_me:$LINENO: checking for socklen_t" >&5
20011echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
20012if test "${ac_cv_type_socklen_t+set}" = set; then
20013 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000020014else
Martin v. Löwis11437992002-04-12 09:54:03 +000020015 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020016/* confdefs.h. */
20017_ACEOF
20018cat confdefs.h >>conftest.$ac_ext
20019cat >>conftest.$ac_ext <<_ACEOF
20020/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000020021
20022#ifdef HAVE_SYS_TYPES_H
20023#include <sys/types.h>
20024#endif
20025#ifdef HAVE_SYS_SOCKET_H
20026#include <sys/socket.h>
20027#endif
20028
20029
Martin v. Löwis11437992002-04-12 09:54:03 +000020030int
20031main ()
20032{
20033if ((socklen_t *) 0)
20034 return 0;
20035if (sizeof (socklen_t))
20036 return 0;
20037 ;
20038 return 0;
20039}
20040_ACEOF
20041rm -f conftest.$ac_objext
20042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Skip Montanarof0d5f792004-08-15 14:08:23 +000020043 (eval $ac_compile) 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020045 grep -v '^ *+' conftest.er1 >conftest.err
20046 rm -f conftest.er1
20047 cat conftest.err >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20049 (exit $ac_status); } &&
Trent Mickc5625ba2004-08-25 23:59:39 +000020050 { ac_try='test -z "$ac_c_werror_flag"
20051 || test ! -s conftest.err'
Skip Montanarof0d5f792004-08-15 14:08:23 +000020052 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20053 (eval $ac_try) 2>&5
20054 ac_status=$?
20055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20056 (exit $ac_status); }; } &&
20057 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000020058 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
20059 (eval $ac_try) 2>&5
20060 ac_status=$?
20061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20062 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000020063 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000020064else
Martin v. Löwis11437992002-04-12 09:54:03 +000020065 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020066sed 's/^/| /' conftest.$ac_ext >&5
20067
Martin v. Löwis11437992002-04-12 09:54:03 +000020068ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000020069fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020070rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020071fi
20072echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
20073echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
20074if test $ac_cv_type_socklen_t = yes; then
20075 :
20076else
Guido van Rossum95713eb2000-05-18 20:53:31 +000020077
Martin v. Löwis01c04012002-11-11 14:58:44 +000020078cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000020079#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000020080_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000020081
20082fi
20083
Michael W. Hudson54241132001-12-07 15:38:26 +000020084
Michael W. Hudson54241132001-12-07 15:38:26 +000020085
20086
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000020087for h in `(cd $srcdir;echo Python/thread_*.h)`
20088do
20089 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
20090done
20091
Michael W. Hudson54241132001-12-07 15:38:26 +000020092
Jack Jansen0b06be72002-06-21 14:48:38 +000020093SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000020094echo "$as_me:$LINENO: checking for build directories" >&5
20095echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000020096for dir in $SRCDIRS; do
20097 if test ! -d $dir; then
20098 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000020099 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000020100done
Martin v. Löwis11437992002-04-12 09:54:03 +000020101echo "$as_me:$LINENO: result: done" >&5
20102echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000020103
Guido van Rossum627b2d71993-12-24 10:39:16 +000020104# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000020105 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000020106
Martin v. Löwis11437992002-04-12 09:54:03 +000020107cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020108# This file is a shell script that caches the results of configure
20109# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000020110# scripts and configure runs, see configure's option --config-cache.
20111# It is not useful on other systems. If it contains results you don't
20112# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020113#
Martin v. Löwis11437992002-04-12 09:54:03 +000020114# config.status only pays attention to the cache file if you give it
20115# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020116#
Skip Montanaro6dead952003-09-25 14:50:04 +000020117# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000020118# loading this file, other *unset* `ac_cv_foo' will be assigned the
20119# following values.
20120
20121_ACEOF
20122
Guido van Rossumf78abae1997-01-21 22:02:36 +000020123# The following way of writing the cache mishandles newlines in values,
20124# but we know of no workaround that is simple, portable, and efficient.
20125# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020126# Ultrix sh set writes to stderr and can't be redirected directly,
20127# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000020128{
20129 (set) 2>&1 |
20130 case `(ac_space=' '; set | grep ac_space) 2>&1` in
20131 *ac_space=\ *)
20132 # `set' does not quote correctly, so add quotes (double-quote
20133 # substitution turns \\\\ into \\, and sed turns \\ into \).
20134 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020135 "s/'/'\\\\''/g;
20136 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000020137 ;;
20138 *)
20139 # `set' quotes correctly as required by POSIX, so do not add quotes.
20140 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020141 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000020142 ;;
20143 esac;
20144} |
20145 sed '
20146 t clear
20147 : clear
20148 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20149 t end
20150 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20151 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000020152if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020153 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020154 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
20155 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020156 else
20157 echo "not updating unwritable cache $cache_file"
20158 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020159fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020160rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000020161
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020162test "x$prefix" = xNONE && prefix=$ac_default_prefix
20163# Let make expand exec_prefix.
20164test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000020165
Martin v. Löwis11437992002-04-12 09:54:03 +000020166# VPATH may cause trouble with some makes, so we remove $(srcdir),
20167# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
20168# trailing colons and then remove the whole line if VPATH becomes empty
20169# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000020170if test "x$srcdir" = x.; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000020171 ac_vpsub='/^[ ]*VPATH[ ]*=/{
Martin v. Löwis11437992002-04-12 09:54:03 +000020172s/:*\$(srcdir):*/:/;
20173s/:*\${srcdir}:*/:/;
20174s/:*@srcdir@:*/:/;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020175s/^\([^=]*=[ ]*\):*/\1/;
Martin v. Löwis11437992002-04-12 09:54:03 +000020176s/:*$//;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020177s/^[^=]*=[ ]*$//;
Martin v. Löwis11437992002-04-12 09:54:03 +000020178}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000020179fi
20180
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020181DEFS=-DHAVE_CONFIG_H
20182
Skip Montanaro6dead952003-09-25 14:50:04 +000020183ac_libobjs=
20184ac_ltlibobjs=
20185for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20186 # 1. Remove the extension, and $U if already installed.
20187 ac_i=`echo "$ac_i" |
Skip Montanarof0d5f792004-08-15 14:08:23 +000020188 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
Skip Montanaro6dead952003-09-25 14:50:04 +000020189 # 2. Add them.
20190 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
20191 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
20192done
20193LIBOBJS=$ac_libobjs
20194
20195LTLIBOBJS=$ac_ltlibobjs
20196
20197
Martin v. Löwis11437992002-04-12 09:54:03 +000020198
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020199: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000020200ac_clean_files_save=$ac_clean_files
20201ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20202{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
20203echo "$as_me: creating $CONFIG_STATUS" >&6;}
20204cat >$CONFIG_STATUS <<_ACEOF
20205#! $SHELL
20206# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000020207# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020208# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000020209# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000020210
Martin v. Löwis11437992002-04-12 09:54:03 +000020211debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000020212ac_cs_recheck=false
20213ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000020214SHELL=\${CONFIG_SHELL-$SHELL}
20215_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000020216
Martin v. Löwis11437992002-04-12 09:54:03 +000020217cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000020218## --------------------- ##
20219## M4sh Initialization. ##
20220## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000020221
Martin v. Löwis11437992002-04-12 09:54:03 +000020222# Be Bourne compatible
20223if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
20224 emulate sh
20225 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000020226 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
20227 # is contrary to our usage. Disable this feature.
20228 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000020229elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
20230 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000020231fi
Skip Montanarof0d5f792004-08-15 14:08:23 +000020232DUALCASE=1; export DUALCASE # for MKS sh
Michael W. Hudson54241132001-12-07 15:38:26 +000020233
Martin v. Löwis11437992002-04-12 09:54:03 +000020234# Support unset when possible.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020235if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020236 as_unset=unset
20237else
20238 as_unset=false
20239fi
Michael W. Hudson54241132001-12-07 15:38:26 +000020240
Skip Montanaro6dead952003-09-25 14:50:04 +000020241
20242# Work around bugs in pre-3.0 UWIN ksh.
20243$as_unset ENV MAIL MAILPATH
20244PS1='$ '
20245PS2='> '
20246PS4='+ '
20247
20248# NLS nuisances.
20249for as_var in \
20250 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
20251 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
20252 LC_TELEPHONE LC_TIME
20253do
Skip Montanarof0d5f792004-08-15 14:08:23 +000020254 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000020255 eval $as_var=C; export $as_var
20256 else
20257 $as_unset $as_var
20258 fi
20259done
20260
20261# Required to use basename.
20262if expr a : '\(a\)' >/dev/null 2>&1; then
20263 as_expr=expr
20264else
20265 as_expr=false
20266fi
20267
20268if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
20269 as_basename=basename
20270else
20271 as_basename=false
20272fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020273
20274
20275# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000020276as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000020277$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20278 X"$0" : 'X\(//\)$' \| \
20279 X"$0" : 'X\(/\)$' \| \
20280 . : '\(.\)' 2>/dev/null ||
20281echo X/"$0" |
20282 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
20283 /^X\/\(\/\/\)$/{ s//\1/; q; }
20284 /^X\/\(\/\).*/{ s//\1/; q; }
20285 s/.*/./; q'`
20286
Skip Montanaro6dead952003-09-25 14:50:04 +000020287
Martin v. Löwis11437992002-04-12 09:54:03 +000020288# PATH needs CR, and LINENO needs CR and PATH.
20289# Avoid depending upon Character Ranges.
20290as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20291as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20292as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20293as_cr_digits='0123456789'
20294as_cr_alnum=$as_cr_Letters$as_cr_digits
20295
20296# The user is always right.
20297if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020298 echo "#! /bin/sh" >conf$$.sh
20299 echo "exit 0" >>conf$$.sh
20300 chmod +x conf$$.sh
20301 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020302 PATH_SEPARATOR=';'
20303 else
20304 PATH_SEPARATOR=:
20305 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000020306 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000020307fi
20308
20309
20310 as_lineno_1=$LINENO
20311 as_lineno_2=$LINENO
20312 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
20313 test "x$as_lineno_1" != "x$as_lineno_2" &&
20314 test "x$as_lineno_3" = "x$as_lineno_2" || {
20315 # Find who we are. Look in the path if we contain no path at all
20316 # relative or not.
20317 case $0 in
20318 *[\\/]* ) as_myself=$0 ;;
20319 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20320for as_dir in $PATH
20321do
20322 IFS=$as_save_IFS
20323 test -z "$as_dir" && as_dir=.
20324 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20325done
20326
20327 ;;
20328 esac
20329 # We did not find ourselves, most probably we were run as `sh COMMAND'
20330 # in which case we are not to be found in the path.
20331 if test "x$as_myself" = x; then
20332 as_myself=$0
20333 fi
20334 if test ! -f "$as_myself"; then
20335 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
20336echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
20337 { (exit 1); exit 1; }; }
20338 fi
20339 case $CONFIG_SHELL in
20340 '')
20341 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20342for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
20343do
20344 IFS=$as_save_IFS
20345 test -z "$as_dir" && as_dir=.
20346 for as_base in sh bash ksh sh5; do
20347 case $as_dir in
20348 /*)
20349 if ("$as_dir/$as_base" -c '
20350 as_lineno_1=$LINENO
20351 as_lineno_2=$LINENO
20352 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
20353 test "x$as_lineno_1" != "x$as_lineno_2" &&
20354 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020355 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
20356 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020357 CONFIG_SHELL=$as_dir/$as_base
20358 export CONFIG_SHELL
20359 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
20360 fi;;
20361 esac
20362 done
20363done
20364;;
Jack Jansendd19cf82001-12-06 22:36:17 +000020365 esac
20366
Martin v. Löwis11437992002-04-12 09:54:03 +000020367 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
20368 # uniformly replaced by the line number. The first 'sed' inserts a
20369 # line-number line before each line; the second 'sed' does the real
20370 # work. The second script uses 'N' to pair each line-number line
20371 # with the numbered line, and appends trailing '-' during
20372 # substitution so that $LINENO is not a special case at line end.
20373 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
20374 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
20375 sed '=' <$as_myself |
20376 sed '
20377 N
20378 s,$,-,
20379 : loop
20380 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
20381 t loop
20382 s,-$,,
20383 s,^['$as_cr_digits']*\n,,
20384 ' >$as_me.lineno &&
20385 chmod +x $as_me.lineno ||
20386 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
20387echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
20388 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020389
Martin v. Löwis11437992002-04-12 09:54:03 +000020390 # Don't try to exec as it changes $[0], causing all sort of problems
20391 # (the dirname of $[0] is not the place where we might find the
20392 # original and so on. Autoconf is especially sensible to this).
20393 . ./$as_me.lineno
20394 # Exit status is that of the last command.
20395 exit
20396}
20397
20398
20399case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
20400 *c*,-n*) ECHO_N= ECHO_C='
20401' ECHO_T=' ' ;;
20402 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
20403 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
20404esac
20405
20406if expr a : '\(a\)' >/dev/null 2>&1; then
20407 as_expr=expr
20408else
20409 as_expr=false
20410fi
20411
20412rm -f conf$$ conf$$.exe conf$$.file
20413echo >conf$$.file
20414if ln -s conf$$.file conf$$ 2>/dev/null; then
20415 # We could just check for DJGPP; but this test a) works b) is more generic
20416 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
20417 if test -f conf$$.exe; then
20418 # Don't use ln at all; we don't have any links
20419 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020420 else
Martin v. Löwis11437992002-04-12 09:54:03 +000020421 as_ln_s='ln -s'
20422 fi
20423elif ln conf$$.file conf$$ 2>/dev/null; then
20424 as_ln_s=ln
20425else
20426 as_ln_s='cp -p'
20427fi
20428rm -f conf$$ conf$$.exe conf$$.file
20429
Skip Montanaro6dead952003-09-25 14:50:04 +000020430if mkdir -p . 2>/dev/null; then
20431 as_mkdir_p=:
20432else
Skip Montanarof0d5f792004-08-15 14:08:23 +000020433 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000020434 as_mkdir_p=false
20435fi
20436
Martin v. Löwis11437992002-04-12 09:54:03 +000020437as_executable_p="test -f"
20438
20439# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020440as_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 +000020441
20442# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000020443as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000020444
20445
20446# IFS
20447# We need space, tab and new line, in precisely that order.
20448as_nl='
20449'
20450IFS=" $as_nl"
20451
20452# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000020453$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000020454
20455exec 6>&1
20456
20457# Open the log real soon, to keep \$[0] and so on meaningful, and to
20458# report actual input values of CONFIG_FILES etc. instead of their
20459# values after options handling. Logging --version etc. is OK.
20460exec 5>>config.log
20461{
20462 echo
20463 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20464## Running $as_me. ##
20465_ASBOX
20466} >&5
20467cat >&5 <<_CSEOF
20468
Fred Drake9bd44622003-07-30 17:39:48 +000020469This file was extended by python $as_me 2.4, which was
Skip Montanarof0d5f792004-08-15 14:08:23 +000020470generated by GNU Autoconf 2.59. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000020471
20472 CONFIG_FILES = $CONFIG_FILES
20473 CONFIG_HEADERS = $CONFIG_HEADERS
20474 CONFIG_LINKS = $CONFIG_LINKS
20475 CONFIG_COMMANDS = $CONFIG_COMMANDS
20476 $ $0 $@
20477
20478_CSEOF
20479echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
20480echo >&5
20481_ACEOF
20482
20483# Files that config.status was made for.
20484if test -n "$ac_config_files"; then
20485 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
20486fi
20487
20488if test -n "$ac_config_headers"; then
20489 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
20490fi
20491
20492if test -n "$ac_config_links"; then
20493 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
20494fi
20495
20496if test -n "$ac_config_commands"; then
20497 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
20498fi
20499
20500cat >>$CONFIG_STATUS <<\_ACEOF
20501
20502ac_cs_usage="\
20503\`$as_me' instantiates files from templates according to the
20504current configuration.
20505
20506Usage: $0 [OPTIONS] [FILE]...
20507
20508 -h, --help print this help, then exit
20509 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000020510 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000020511 -d, --debug don't remove temporary files
20512 --recheck update $as_me by reconfiguring in the same conditions
20513 --file=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000020514 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000020515 --header=FILE[:TEMPLATE]
Skip Montanarof0d5f792004-08-15 14:08:23 +000020516 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000020517
20518Configuration files:
20519$config_files
20520
20521Configuration headers:
20522$config_headers
20523
20524Report bugs to <bug-autoconf@gnu.org>."
20525_ACEOF
20526
20527cat >>$CONFIG_STATUS <<_ACEOF
20528ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000020529python config.status 2.4
Skip Montanarof0d5f792004-08-15 14:08:23 +000020530configured by $0, generated by GNU Autoconf 2.59,
Martin v. Löwis11437992002-04-12 09:54:03 +000020531 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
20532
Skip Montanarof0d5f792004-08-15 14:08:23 +000020533Copyright (C) 2003 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000020534This config.status script is free software; the Free Software Foundation
20535gives unlimited permission to copy, distribute and modify it."
20536srcdir=$srcdir
20537INSTALL="$INSTALL"
20538_ACEOF
20539
20540cat >>$CONFIG_STATUS <<\_ACEOF
20541# If no file are specified by the user, then we need to provide default
20542# value. By we need to know if files were specified by the user.
20543ac_need_defaults=:
20544while test $# != 0
20545do
20546 case $1 in
20547 --*=*)
20548 ac_option=`expr "x$1" : 'x\([^=]*\)='`
20549 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000020550 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000020551 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000020552 -*)
20553 ac_option=$1
20554 ac_optarg=$2
20555 ac_shift=shift
20556 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020557 *) # This is not an option, so the user has probably given explicit
20558 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000020559 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000020560 ac_need_defaults=false;;
20561 esac
20562
Skip Montanaro6dead952003-09-25 14:50:04 +000020563 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000020564 # Handling of the options.
20565_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000020566cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020567 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20568 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020569 --version | --vers* | -V )
20570 echo "$ac_cs_version"; exit 0 ;;
20571 --he | --h)
20572 # Conflict between --help and --header
20573 { { echo "$as_me:$LINENO: error: ambiguous option: $1
20574Try \`$0 --help' for more information." >&5
20575echo "$as_me: error: ambiguous option: $1
20576Try \`$0 --help' for more information." >&2;}
20577 { (exit 1); exit 1; }; };;
20578 --help | --hel | -h )
20579 echo "$ac_cs_usage"; exit 0 ;;
20580 --debug | --d* | -d )
20581 debug=: ;;
20582 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000020583 $ac_shift
20584 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000020585 ac_need_defaults=false;;
20586 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000020587 $ac_shift
20588 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000020589 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000020590 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20591 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20592 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020593
20594 # This is an error.
20595 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
20596Try \`$0 --help' for more information." >&5
20597echo "$as_me: error: unrecognized option: $1
20598Try \`$0 --help' for more information." >&2;}
20599 { (exit 1); exit 1; }; } ;;
20600
20601 *) ac_config_targets="$ac_config_targets $1" ;;
20602
20603 esac
20604 shift
20605done
20606
Skip Montanaro6dead952003-09-25 14:50:04 +000020607ac_configure_extra_args=
20608
20609if $ac_cs_silent; then
20610 exec 6>/dev/null
20611 ac_configure_extra_args="$ac_configure_extra_args --silent"
20612fi
20613
20614_ACEOF
20615cat >>$CONFIG_STATUS <<_ACEOF
20616if \$ac_cs_recheck; then
20617 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
20618 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20619fi
20620
Martin v. Löwis11437992002-04-12 09:54:03 +000020621_ACEOF
20622
20623
20624
20625
20626
20627cat >>$CONFIG_STATUS <<\_ACEOF
20628for ac_config_target in $ac_config_targets
20629do
20630 case "$ac_config_target" in
20631 # Handling of arguments.
20632 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
20633 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
20634 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
20635 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
20636echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20637 { (exit 1); exit 1; }; };;
20638 esac
20639done
20640
20641# If the user did not use the arguments to specify the items to instantiate,
20642# then the envvar interface is used. Set only those that are not.
20643# We use the long form for the default assignment because of an extremely
20644# bizarre bug on SunOS 4.1.3.
20645if $ac_need_defaults; then
20646 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20647 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20648fi
20649
Skip Montanaro6dead952003-09-25 14:50:04 +000020650# Have a temporary directory for convenience. Make it in the build tree
20651# simply because there is no reason to put it here, and in addition,
20652# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000020653# Create a temporary directory, and hook for its removal unless debugging.
20654$debug ||
20655{
20656 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20657 trap '{ (exit 1); exit 1; }' 1 2 13 15
20658}
20659
20660# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000020661
Martin v. Löwis11437992002-04-12 09:54:03 +000020662{
Skip Montanaro6dead952003-09-25 14:50:04 +000020663 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000020664 test -n "$tmp" && test -d "$tmp"
20665} ||
20666{
Skip Montanaro6dead952003-09-25 14:50:04 +000020667 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000020668 (umask 077 && mkdir $tmp)
20669} ||
20670{
Skip Montanaro6dead952003-09-25 14:50:04 +000020671 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000020672 { (exit 1); exit 1; }
20673}
20674
20675_ACEOF
20676
20677cat >>$CONFIG_STATUS <<_ACEOF
20678
20679#
20680# CONFIG_FILES section.
20681#
20682
20683# No need to generate the scripts if there are no CONFIG_FILES.
20684# This happens for instance when ./config.status config.h
20685if test -n "\$CONFIG_FILES"; then
20686 # Protect against being on the right side of a sed subst in config.status.
20687 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20688 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20689s,@SHELL@,$SHELL,;t t
20690s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20691s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20692s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20693s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20694s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20695s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20696s,@exec_prefix@,$exec_prefix,;t t
20697s,@prefix@,$prefix,;t t
20698s,@program_transform_name@,$program_transform_name,;t t
20699s,@bindir@,$bindir,;t t
20700s,@sbindir@,$sbindir,;t t
20701s,@libexecdir@,$libexecdir,;t t
20702s,@datadir@,$datadir,;t t
20703s,@sysconfdir@,$sysconfdir,;t t
20704s,@sharedstatedir@,$sharedstatedir,;t t
20705s,@localstatedir@,$localstatedir,;t t
20706s,@libdir@,$libdir,;t t
20707s,@includedir@,$includedir,;t t
20708s,@oldincludedir@,$oldincludedir,;t t
20709s,@infodir@,$infodir,;t t
20710s,@mandir@,$mandir,;t t
20711s,@build_alias@,$build_alias,;t t
20712s,@host_alias@,$host_alias,;t t
20713s,@target_alias@,$target_alias,;t t
20714s,@DEFS@,$DEFS,;t t
20715s,@ECHO_C@,$ECHO_C,;t t
20716s,@ECHO_N@,$ECHO_N,;t t
20717s,@ECHO_T@,$ECHO_T,;t t
20718s,@LIBS@,$LIBS,;t t
20719s,@VERSION@,$VERSION,;t t
20720s,@SOVERSION@,$SOVERSION,;t t
20721s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
20722s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
20723s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
20724s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
20725s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
20726s,@MACHDEP@,$MACHDEP,;t t
20727s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000020728s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000020729s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Jack Jansen6b08a402004-06-03 12:41:45 +000020730s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000020731s,@CXX@,$CXX,;t t
20732s,@MAINOBJ@,$MAINOBJ,;t t
20733s,@EXEEXT@,$EXEEXT,;t t
20734s,@CC@,$CC,;t t
20735s,@CFLAGS@,$CFLAGS,;t t
20736s,@LDFLAGS@,$LDFLAGS,;t t
20737s,@CPPFLAGS@,$CPPFLAGS,;t t
20738s,@ac_ct_CC@,$ac_ct_CC,;t t
20739s,@OBJEXT@,$OBJEXT,;t t
20740s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000020741s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000020742s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
20743s,@LIBRARY@,$LIBRARY,;t t
20744s,@LDLIBRARY@,$LDLIBRARY,;t t
20745s,@DLLLIBRARY@,$DLLLIBRARY,;t t
20746s,@BLDLIBRARY@,$BLDLIBRARY,;t t
20747s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
20748s,@INSTSONAME@,$INSTSONAME,;t t
20749s,@RUNSHARED@,$RUNSHARED,;t t
20750s,@LINKCC@,$LINKCC,;t t
20751s,@RANLIB@,$RANLIB,;t t
20752s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20753s,@AR@,$AR,;t t
20754s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20755s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20756s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20757s,@LN@,$LN,;t t
20758s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000020759s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000020760s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
20761s,@SO@,$SO,;t t
20762s,@LDSHARED@,$LDSHARED,;t t
20763s,@BLDSHARED@,$BLDSHARED,;t t
20764s,@CCSHARED@,$CCSHARED,;t t
20765s,@LINKFORSHARED@,$LINKFORSHARED,;t t
20766s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000020767s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000020768s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
20769s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
20770s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
20771s,@LDLAST@,$LDLAST,;t t
20772s,@THREADOBJ@,$THREADOBJ,;t t
20773s,@DLINCLDIR@,$DLINCLDIR,;t t
20774s,@DYNLOADFILE@,$DYNLOADFILE,;t t
20775s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000020776s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000020777s,@LIBOBJS@,$LIBOBJS,;t t
20778s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
20779s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
20780s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
20781s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
20782s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
20783s,@LIBM@,$LIBM,;t t
20784s,@LIBC@,$LIBC,;t t
20785s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
20786s,@THREADHEADERS@,$THREADHEADERS,;t t
20787s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000020788s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000020789CEOF
20790
20791_ACEOF
20792
20793 cat >>$CONFIG_STATUS <<\_ACEOF
20794 # Split the substitutions into bite-sized pieces for seds with
20795 # small command number limits, like on Digital OSF/1 and HP-UX.
20796 ac_max_sed_lines=48
20797 ac_sed_frag=1 # Number of current file.
20798 ac_beg=1 # First line for current file.
20799 ac_end=$ac_max_sed_lines # Line after last line for current file.
20800 ac_more_lines=:
20801 ac_sed_cmds=
20802 while $ac_more_lines; do
20803 if test $ac_beg -gt 1; then
20804 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20805 else
20806 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20807 fi
20808 if test ! -s $tmp/subs.frag; then
20809 ac_more_lines=false
20810 else
20811 # The purpose of the label and of the branching condition is to
20812 # speed up the sed processing (if there are no `@' at all, there
20813 # is no need to browse any of the substitutions).
20814 # These are the two extra sed commands mentioned above.
20815 (echo ':t
20816 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20817 if test -z "$ac_sed_cmds"; then
Skip Montanarof0d5f792004-08-15 14:08:23 +000020818 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000020819 else
Skip Montanarof0d5f792004-08-15 14:08:23 +000020820 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000020821 fi
20822 ac_sed_frag=`expr $ac_sed_frag + 1`
20823 ac_beg=$ac_end
20824 ac_end=`expr $ac_end + $ac_max_sed_lines`
20825 fi
20826 done
20827 if test -z "$ac_sed_cmds"; then
20828 ac_sed_cmds=cat
20829 fi
20830fi # test -n "$CONFIG_FILES"
20831
20832_ACEOF
20833cat >>$CONFIG_STATUS <<\_ACEOF
20834for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20835 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20836 case $ac_file in
20837 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000020838 cat >$tmp/stdin
20839 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20840 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020841 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000020842 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020843 * ) ac_file_in=$ac_file.in ;;
20844 esac
20845
20846 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20847 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
20848$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020849 X"$ac_file" : 'X\(//\)[^/]' \| \
20850 X"$ac_file" : 'X\(//\)$' \| \
20851 X"$ac_file" : 'X\(/\)' \| \
20852 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000020853echo X"$ac_file" |
20854 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20855 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20856 /^X\(\/\/\)$/{ s//\1/; q; }
20857 /^X\(\/\).*/{ s//\1/; q; }
20858 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000020859 { if $as_mkdir_p; then
20860 mkdir -p "$ac_dir"
20861 else
20862 as_dir="$ac_dir"
20863 as_dirs=
20864 while test ! -d "$as_dir"; do
20865 as_dirs="$as_dir $as_dirs"
20866 as_dir=`(dirname "$as_dir") 2>/dev/null ||
20867$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020868 X"$as_dir" : 'X\(//\)[^/]' \| \
20869 X"$as_dir" : 'X\(//\)$' \| \
20870 X"$as_dir" : 'X\(/\)' \| \
20871 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000020872echo X"$as_dir" |
20873 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20874 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20875 /^X\(\/\/\)$/{ s//\1/; q; }
20876 /^X\(\/\).*/{ s//\1/; q; }
20877 s/.*/./; q'`
20878 done
20879 test ! -n "$as_dirs" || mkdir $as_dirs
20880 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
20881echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
20882 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020883
20884 ac_builddir=.
20885
20886if test "$ac_dir" != .; then
20887 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
20888 # A "../" for each directory in $ac_dir_suffix.
20889 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
20890else
20891 ac_dir_suffix= ac_top_builddir=
20892fi
20893
20894case $srcdir in
20895 .) # No --srcdir option. We are building in place.
20896 ac_srcdir=.
20897 if test -z "$ac_top_builddir"; then
20898 ac_top_srcdir=.
20899 else
20900 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
20901 fi ;;
20902 [\\/]* | ?:[\\/]* ) # Absolute path.
20903 ac_srcdir=$srcdir$ac_dir_suffix;
20904 ac_top_srcdir=$srcdir ;;
20905 *) # Relative path.
20906 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
20907 ac_top_srcdir=$ac_top_builddir$srcdir ;;
20908esac
Skip Montanarof0d5f792004-08-15 14:08:23 +000020909
20910# Do not use `cd foo && pwd` to compute absolute paths, because
20911# the directories may not exist.
20912case `pwd` in
20913.) ac_abs_builddir="$ac_dir";;
20914*)
20915 case "$ac_dir" in
20916 .) ac_abs_builddir=`pwd`;;
20917 [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
20918 *) ac_abs_builddir=`pwd`/"$ac_dir";;
20919 esac;;
20920esac
20921case $ac_abs_builddir in
20922.) ac_abs_top_builddir=${ac_top_builddir}.;;
20923*)
20924 case ${ac_top_builddir}. in
20925 .) ac_abs_top_builddir=$ac_abs_builddir;;
20926 [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
20927 *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
20928 esac;;
20929esac
20930case $ac_abs_builddir in
20931.) ac_abs_srcdir=$ac_srcdir;;
20932*)
20933 case $ac_srcdir in
20934 .) ac_abs_srcdir=$ac_abs_builddir;;
20935 [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
20936 *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
20937 esac;;
20938esac
20939case $ac_abs_builddir in
20940.) ac_abs_top_srcdir=$ac_top_srcdir;;
20941*)
20942 case $ac_top_srcdir in
20943 .) ac_abs_top_srcdir=$ac_abs_builddir;;
20944 [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
20945 *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
20946 esac;;
20947esac
Martin v. Löwis11437992002-04-12 09:54:03 +000020948
20949
20950 case $INSTALL in
20951 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20952 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
20953 esac
20954
Trent Mickc5625ba2004-08-25 23:59:39 +000020955 if test x"$ac_file" != x-; then
20956 { echo "$as_me:$LINENO: creating $ac_file" >&5
20957echo "$as_me: creating $ac_file" >&6;}
20958 rm -f "$ac_file"
20959 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020960 # Let's still pretend it is `configure' which instantiates (i.e., don't
20961 # use $as_me), people would be surprised to read:
20962 # /* config.h. Generated by config.status. */
20963 if test x"$ac_file" = x-; then
20964 configure_input=
20965 else
20966 configure_input="$ac_file. "
20967 fi
20968 configure_input=$configure_input"Generated from `echo $ac_file_in |
Skip Montanarof0d5f792004-08-15 14:08:23 +000020969 sed 's,.*/,,'` by configure."
Martin v. Löwis11437992002-04-12 09:54:03 +000020970
20971 # First look for the input files in the build tree, otherwise in the
20972 # src tree.
20973 ac_file_inputs=`IFS=:
20974 for f in $ac_file_in; do
20975 case $f in
20976 -) echo $tmp/stdin ;;
20977 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000020978 # Absolute (can't be DOS-style, as IFS=:)
20979 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020980echo "$as_me: error: cannot find input file: $f" >&2;}
20981 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000020982 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000020983 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000020984 if test -f "$f"; then
20985 # Build tree
20986 echo "$f"
20987 elif test -f "$srcdir/$f"; then
20988 # Source tree
20989 echo "$srcdir/$f"
20990 else
20991 # /dev/null tree
20992 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020993echo "$as_me: error: cannot find input file: $f" >&2;}
20994 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000020995 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000020996 esac
20997 done` || { (exit 1); exit 1; }
20998_ACEOF
20999cat >>$CONFIG_STATUS <<_ACEOF
21000 sed "$ac_vpsub
21001$extrasub
21002_ACEOF
21003cat >>$CONFIG_STATUS <<\_ACEOF
21004:t
21005/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21006s,@configure_input@,$configure_input,;t t
21007s,@srcdir@,$ac_srcdir,;t t
21008s,@abs_srcdir@,$ac_abs_srcdir,;t t
21009s,@top_srcdir@,$ac_top_srcdir,;t t
21010s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
21011s,@builddir@,$ac_builddir,;t t
21012s,@abs_builddir@,$ac_abs_builddir,;t t
21013s,@top_builddir@,$ac_top_builddir,;t t
21014s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
21015s,@INSTALL@,$ac_INSTALL,;t t
21016" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21017 rm -f $tmp/stdin
21018 if test x"$ac_file" != x-; then
21019 mv $tmp/out $ac_file
21020 else
21021 cat $tmp/out
21022 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021023 fi
21024
Martin v. Löwis11437992002-04-12 09:54:03 +000021025done
21026_ACEOF
21027cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021028
Martin v. Löwis11437992002-04-12 09:54:03 +000021029#
21030# CONFIG_HEADER section.
21031#
Guido van Rossum627b2d71993-12-24 10:39:16 +000021032
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021033# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21034# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000021035#
21036# ac_d sets the value in "#define NAME VALUE" lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021037ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
21038ac_dB='[ ].*$,\1#\2'
Martin v. Löwis11437992002-04-12 09:54:03 +000021039ac_dC=' '
21040ac_dD=',;t'
21041# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Skip Montanarof0d5f792004-08-15 14:08:23 +000021042ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
Martin v. Löwis11437992002-04-12 09:54:03 +000021043ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021044ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000021045ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000021046
Martin v. Löwis11437992002-04-12 09:54:03 +000021047for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000021048 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000021049 case $ac_file in
21050 - | *:- | *:-:* ) # input from stdin
Skip Montanarof0d5f792004-08-15 14:08:23 +000021051 cat >$tmp/stdin
21052 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21053 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021054 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Skip Montanarof0d5f792004-08-15 14:08:23 +000021055 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021056 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021057 esac
21058
Martin v. Löwis11437992002-04-12 09:54:03 +000021059 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
21060echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021061
Martin v. Löwis11437992002-04-12 09:54:03 +000021062 # First look for the input files in the build tree, otherwise in the
21063 # src tree.
21064 ac_file_inputs=`IFS=:
21065 for f in $ac_file_in; do
21066 case $f in
21067 -) echo $tmp/stdin ;;
21068 [\\/$]*)
Skip Montanarof0d5f792004-08-15 14:08:23 +000021069 # Absolute (can't be DOS-style, as IFS=:)
21070 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021071echo "$as_me: error: cannot find input file: $f" >&2;}
21072 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021073 # Do quote $f, to prevent DOS paths from being IFS'd.
21074 echo "$f";;
Martin v. Löwis11437992002-04-12 09:54:03 +000021075 *) # Relative
Skip Montanarof0d5f792004-08-15 14:08:23 +000021076 if test -f "$f"; then
21077 # Build tree
21078 echo "$f"
21079 elif test -f "$srcdir/$f"; then
21080 # Source tree
21081 echo "$srcdir/$f"
21082 else
21083 # /dev/null tree
21084 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021085echo "$as_me: error: cannot find input file: $f" >&2;}
21086 { (exit 1); exit 1; }; }
Skip Montanarof0d5f792004-08-15 14:08:23 +000021087 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000021088 esac
21089 done` || { (exit 1); exit 1; }
21090 # Remove the trailing spaces.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021091 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021092
Martin v. Löwis11437992002-04-12 09:54:03 +000021093_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021094
Martin v. Löwis11437992002-04-12 09:54:03 +000021095# Transform confdefs.h into two sed scripts, `conftest.defines' and
21096# `conftest.undefs', that substitutes the proper values into
21097# config.h.in to produce config.h. The first handles `#define'
21098# templates, and the second `#undef' templates.
21099# And first: Protect against being on the right side of a sed subst in
21100# config.status. Protect against being in an unquoted here document
21101# in config.status.
21102rm -f conftest.defines conftest.undefs
21103# Using a here document instead of a string reduces the quoting nightmare.
21104# Putting comments in sed scripts is not portable.
21105#
21106# `end' is used to avoid that the second main sed command (meant for
21107# 0-ary CPP macros) applies to n-ary macro definitions.
21108# See the Autoconf documentation for `clear'.
21109cat >confdef2sed.sed <<\_ACEOF
21110s/[\\&,]/\\&/g
21111s,[\\$`],\\&,g
21112t clear
21113: clear
Skip Montanarof0d5f792004-08-15 14:08:23 +000021114s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000021115t end
Skip Montanarof0d5f792004-08-15 14:08:23 +000021116s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000021117: end
21118_ACEOF
21119# If some macros were called several times there might be several times
21120# the same #defines, which is useless. Nevertheless, we may not want to
21121# sort them, since we want the *last* AC-DEFINE to be honored.
21122uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
21123sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
21124rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021125
21126# This sed command replaces #undef with comments. This is necessary, for
21127# example, in the case of _POSIX_SOURCE, which is predefined and required
21128# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000021129cat >>conftest.undefs <<\_ACEOF
Skip Montanarof0d5f792004-08-15 14:08:23 +000021130s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
Martin v. Löwis11437992002-04-12 09:54:03 +000021131_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021132
Martin v. Löwis11437992002-04-12 09:54:03 +000021133# Break up conftest.defines because some shells have a limit on the size
21134# of here documents, and old seds have small limits too (100 cmds).
21135echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Skip Montanarof0d5f792004-08-15 14:08:23 +000021136echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021137echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
21138echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000021139rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000021140while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000021141do
Martin v. Löwis11437992002-04-12 09:54:03 +000021142 # Write a limited-size here document to $tmp/defines.sed.
21143 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
21144 # Speed up: don't consider the non `#define' lines.
Skip Montanarof0d5f792004-08-15 14:08:23 +000021145 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021146 # Work around the forget-to-reset-the-flag bug.
21147 echo 't clr' >>$CONFIG_STATUS
21148 echo ': clr' >>$CONFIG_STATUS
21149 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000021150 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000021151 sed -f $tmp/defines.sed $tmp/in >$tmp/out
21152 rm -f $tmp/in
21153 mv $tmp/out $tmp/in
21154' >>$CONFIG_STATUS
21155 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
21156 rm -f conftest.defines
21157 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000021158done
Martin v. Löwis11437992002-04-12 09:54:03 +000021159rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000021160echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021161echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000021162
Martin v. Löwis11437992002-04-12 09:54:03 +000021163# Break up conftest.undefs because some shells have a limit on the size
21164# of here documents, and old seds have small limits too (100 cmds).
21165echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
21166rm -f conftest.tail
21167while grep . conftest.undefs >/dev/null
21168do
21169 # Write a limited-size here document to $tmp/undefs.sed.
21170 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
21171 # Speed up: don't consider the non `#undef'
Skip Montanarof0d5f792004-08-15 14:08:23 +000021172 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021173 # Work around the forget-to-reset-the-flag bug.
21174 echo 't clr' >>$CONFIG_STATUS
21175 echo ': clr' >>$CONFIG_STATUS
21176 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
21177 echo 'CEOF
21178 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
21179 rm -f $tmp/in
21180 mv $tmp/out $tmp/in
21181' >>$CONFIG_STATUS
21182 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
21183 rm -f conftest.undefs
21184 mv conftest.tail conftest.undefs
21185done
21186rm -f conftest.undefs
21187
21188cat >>$CONFIG_STATUS <<\_ACEOF
21189 # Let's still pretend it is `configure' which instantiates (i.e., don't
21190 # use $as_me), people would be surprised to read:
21191 # /* config.h. Generated by config.status. */
21192 if test x"$ac_file" = x-; then
21193 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000021194 else
Martin v. Löwis11437992002-04-12 09:54:03 +000021195 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000021196 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021197 cat $tmp/in >>$tmp/config.h
21198 rm -f $tmp/in
21199 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021200 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021201 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
21202echo "$as_me: $ac_file is unchanged" >&6;}
21203 else
21204 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
21205$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021206 X"$ac_file" : 'X\(//\)[^/]' \| \
21207 X"$ac_file" : 'X\(//\)$' \| \
21208 X"$ac_file" : 'X\(/\)' \| \
21209 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000021210echo X"$ac_file" |
21211 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21212 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21213 /^X\(\/\/\)$/{ s//\1/; q; }
21214 /^X\(\/\).*/{ s//\1/; q; }
21215 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000021216 { if $as_mkdir_p; then
21217 mkdir -p "$ac_dir"
21218 else
21219 as_dir="$ac_dir"
21220 as_dirs=
21221 while test ! -d "$as_dir"; do
21222 as_dirs="$as_dir $as_dirs"
21223 as_dir=`(dirname "$as_dir") 2>/dev/null ||
21224$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021225 X"$as_dir" : 'X\(//\)[^/]' \| \
21226 X"$as_dir" : 'X\(//\)$' \| \
21227 X"$as_dir" : 'X\(/\)' \| \
21228 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000021229echo X"$as_dir" |
21230 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21231 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21232 /^X\(\/\/\)$/{ s//\1/; q; }
21233 /^X\(\/\).*/{ s//\1/; q; }
21234 s/.*/./; q'`
21235 done
21236 test ! -n "$as_dirs" || mkdir $as_dirs
21237 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
21238echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
21239 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021240
Martin v. Löwis11437992002-04-12 09:54:03 +000021241 rm -f $ac_file
21242 mv $tmp/config.h $ac_file
21243 fi
21244 else
21245 cat $tmp/config.h
21246 rm -f $tmp/config.h
21247 fi
21248done
21249_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021250
Martin v. Löwis11437992002-04-12 09:54:03 +000021251cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021252
Martin v. Löwis11437992002-04-12 09:54:03 +000021253{ (exit 0); exit 0; }
21254_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021255chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000021256ac_clean_files=$ac_clean_files_save
21257
21258
21259# configure is writing to config.log, and then calls config.status.
21260# config.status does its own redirection, appending to config.log.
21261# Unfortunately, on DOS this fails, as config.log is still kept open
21262# by configure, so config.status won't be able to write to it; its
21263# output is simply discarded. So we exec the FD to /dev/null,
21264# effectively closing config.log, so it can be properly (re)opened and
21265# appended to by config.status. When coming back to configure, we
21266# need to make the FD available again.
21267if test "$no_create" != yes; then
21268 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000021269 ac_config_status_args=
21270 test "$silent" = yes &&
21271 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000021272 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000021273 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000021274 exec 5>>config.log
21275 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21276 # would make configure fail if this is the last instruction.
21277 $ac_cs_success || { (exit 1); exit 1; }
21278fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000021279
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000021280
21281echo "creating Setup"
21282if test ! -f Modules/Setup
21283then
21284 cp $srcdir/Modules/Setup.dist Modules/Setup
21285fi
21286
21287echo "creating Setup.local"
21288if test ! -f Modules/Setup.local
21289then
21290 echo "# Edit this file for local setup changes" >Modules/Setup.local
21291fi
21292
21293echo "creating Makefile"
21294$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
21295 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000021296 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000021297mv config.c Modules