blob: d6544a9298e0d5320311bc4df722b1d05620d44a [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Martin v. Löwisd6320502004-08-12 13:45:08 +00002# From configure.in Revision: 1.464 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004# Generated by GNU Autoconf 2.57 for python 2.4.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
7# Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00008# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000010## --------------------- ##
11## M4sh Initialization. ##
12## --------------------- ##
13
14# Be Bourne compatible
15if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
16 emulate sh
17 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
19 # is contrary to our usage. Disable this feature.
20 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000021elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22 set -o posix
23fi
24
Martin v. Löwis11437992002-04-12 09:54:03 +000025# Support unset when possible.
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026if (FOO=FOO; unset FOO) >/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
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000045 if (set +x; test -n "`(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
222 as_mkdir_p=false
223fi
224
Martin v. Löwis11437992002-04-12 09:54:03 +0000225as_executable_p="test -f"
226
227# Sed expression to map a string onto a valid CPP name.
Michael W. Hudson30ea2f22004-07-07 17:44:12 +0000228as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
Martin v. Löwis11437992002-04-12 09:54:03 +0000229
230# Sed expression to map a string onto a valid variable name.
Michael W. Hudson30ea2f22004-07-07 17:44:12 +0000231as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
Martin v. Löwis11437992002-04-12 09:54:03 +0000232
233
234# IFS
235# We need space, tab and new line, in precisely that order.
236as_nl='
237'
238IFS=" $as_nl"
239
240# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +0000241$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000242
243
244# Name of the host.
245# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
246# so uname gets run too.
247ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
248
249exec 6>&1
250
251#
252# Initializations.
253#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000254ac_default_prefix=/usr/local
Skip Montanaro6dead952003-09-25 14:50:04 +0000255ac_config_libobj_dir=.
Martin v. Löwis11437992002-04-12 09:54:03 +0000256cross_compiling=no
257subdirs=
258MFLAGS=
259MAKEFLAGS=
260SHELL=${CONFIG_SHELL-/bin/sh}
261
262# Maximum number of lines to put in a shell here document.
263# This variable seems obsolete. It should probably be removed, and
264# only ac_max_sed_lines should be used.
265: ${ac_max_here_lines=38}
266
267# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000268PACKAGE_NAME='python'
269PACKAGE_TARNAME='python'
Fred Drake9bd44622003-07-30 17:39:48 +0000270PACKAGE_VERSION='2.4'
271PACKAGE_STRING='python 2.4'
Martin v. Löwis88afe662002-10-26 13:47:44 +0000272PACKAGE_BUGREPORT=''
Martin v. Löwis11437992002-04-12 09:54:03 +0000273
274ac_unique_file="Include/object.h"
275# Factoring default headers for most tests.
276ac_includes_default="\
277#include <stdio.h>
278#if HAVE_SYS_TYPES_H
279# include <sys/types.h>
280#endif
281#if HAVE_SYS_STAT_H
282# include <sys/stat.h>
283#endif
284#if STDC_HEADERS
285# include <stdlib.h>
286# include <stddef.h>
287#else
288# if HAVE_STDLIB_H
289# include <stdlib.h>
290# endif
291#endif
292#if HAVE_STRING_H
293# if !STDC_HEADERS && HAVE_MEMORY_H
294# include <memory.h>
295# endif
296# include <string.h>
297#endif
298#if HAVE_STRINGS_H
299# include <strings.h>
300#endif
301#if HAVE_INTTYPES_H
302# include <inttypes.h>
303#else
304# if HAVE_STDINT_H
305# include <stdint.h>
306# endif
307#endif
308#if HAVE_UNISTD_H
309# include <unistd.h>
310#endif"
311
Jack Jansen6b08a402004-06-03 12:41:45 +0000312ac_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 +0000313ac_subst_files=''
Guido van Rossum627b2d71993-12-24 10:39:16 +0000314
Guido van Rossum7f43da71994-08-01 12:15:30 +0000315# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000316ac_init_help=
317ac_init_version=false
Guido van Rossum7f43da71994-08-01 12:15:30 +0000318# The variables have the same names as the options, with
319# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000320cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000321exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000322no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000323no_recursion=
324prefix=NONE
325program_prefix=NONE
326program_suffix=NONE
327program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000328silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000329site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000330srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000331verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000332x_includes=NONE
333x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000334
335# Installation directory options.
336# These are left unexpanded so users can "make install exec_prefix=/foo"
337# and all the variables that are supposed to be based on exec_prefix
338# by default will actually change.
339# Use braces instead of parens because sh, perl, etc. also accept them.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000340bindir='${exec_prefix}/bin'
341sbindir='${exec_prefix}/sbin'
342libexecdir='${exec_prefix}/libexec'
343datadir='${prefix}/share'
344sysconfdir='${prefix}/etc'
345sharedstatedir='${prefix}/com'
346localstatedir='${prefix}/var'
347libdir='${exec_prefix}/lib'
348includedir='${prefix}/include'
349oldincludedir='/usr/include'
350infodir='${prefix}/info'
351mandir='${prefix}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000352
Guido van Rossum7f43da71994-08-01 12:15:30 +0000353ac_prev=
354for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000355do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000356 # If the previous option needs an argument, assign it.
357 if test -n "$ac_prev"; then
358 eval "$ac_prev=\$ac_option"
359 ac_prev=
360 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000361 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000362
Martin v. Löwis11437992002-04-12 09:54:03 +0000363 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000364
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000365 # Accept the important Cygnus configure options, so we can diagnose typos.
366
Martin v. Löwis11437992002-04-12 09:54:03 +0000367 case $ac_option in
Guido van Rossum7f43da71994-08-01 12:15:30 +0000368
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000369 -bindir | --bindir | --bindi | --bind | --bin | --bi)
370 ac_prev=bindir ;;
371 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000372 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000373
374 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000375 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000376 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000377 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000378
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000379 -cache-file | --cache-file | --cache-fil | --cache-fi \
380 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
381 ac_prev=cache_file ;;
382 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
383 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000384 cache_file=$ac_optarg ;;
385
386 --config-cache | -C)
387 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000388
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000389 -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
390 ac_prev=datadir ;;
391 -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
392 | --da=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000393 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000394
Guido van Rossum7f43da71994-08-01 12:15:30 +0000395 -disable-* | --disable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000396 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000397 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000398 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
399 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
400 { (exit 1); exit 1; }; }
401 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
402 eval "enable_$ac_feature=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000403
404 -enable-* | --enable-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000405 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000406 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000407 expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
408 { echo "$as_me: error: invalid feature name: $ac_feature" >&2
409 { (exit 1); exit 1; }; }
410 ac_feature=`echo $ac_feature | sed 's/-/_/g'`
411 case $ac_option in
412 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000413 *) ac_optarg=yes ;;
414 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000415 eval "enable_$ac_feature='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000416
Guido van Rossum7f43da71994-08-01 12:15:30 +0000417 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
418 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
419 | --exec | --exe | --ex)
420 ac_prev=exec_prefix ;;
421 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
422 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
423 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000424 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000425
426 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000427 # Obsolete; use --with-gas.
428 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000429
Martin v. Löwis11437992002-04-12 09:54:03 +0000430 -help | --help | --hel | --he | -h)
431 ac_init_help=long ;;
432 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
433 ac_init_help=recursive ;;
434 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
435 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000436
437 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000438 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000439 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000440 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000441
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000442 -includedir | --includedir | --includedi | --included | --include \
443 | --includ | --inclu | --incl | --inc)
444 ac_prev=includedir ;;
445 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
446 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000447 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000448
449 -infodir | --infodir | --infodi | --infod | --info | --inf)
450 ac_prev=infodir ;;
451 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000452 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000453
454 -libdir | --libdir | --libdi | --libd)
455 ac_prev=libdir ;;
456 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000457 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000458
459 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
460 | --libexe | --libex | --libe)
461 ac_prev=libexecdir ;;
462 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
463 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000464 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000465
466 -localstatedir | --localstatedir | --localstatedi | --localstated \
467 | --localstate | --localstat | --localsta | --localst \
468 | --locals | --local | --loca | --loc | --lo)
469 ac_prev=localstatedir ;;
470 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
471 | --localstate=* | --localstat=* | --localsta=* | --localst=* \
472 | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000473 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000474
475 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
476 ac_prev=mandir ;;
477 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000479
Guido van Rossum7f43da71994-08-01 12:15:30 +0000480 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000481 # Obsolete; use --without-fp.
482 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000483
484 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +0000485 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +0000486 no_create=yes ;;
487
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000488 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
489 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
490 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000491
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000492 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
493 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
494 | --oldin | --oldi | --old | --ol | --o)
495 ac_prev=oldincludedir ;;
496 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
497 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
498 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000499 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000500
Guido van Rossum7f43da71994-08-01 12:15:30 +0000501 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
502 ac_prev=prefix ;;
503 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000504 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000505
506 -program-prefix | --program-prefix | --program-prefi | --program-pref \
507 | --program-pre | --program-pr | --program-p)
508 ac_prev=program_prefix ;;
509 -program-prefix=* | --program-prefix=* | --program-prefi=* \
510 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000511 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000512
513 -program-suffix | --program-suffix | --program-suffi | --program-suff \
514 | --program-suf | --program-su | --program-s)
515 ac_prev=program_suffix ;;
516 -program-suffix=* | --program-suffix=* | --program-suffi=* \
517 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000518 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000519
520 -program-transform-name | --program-transform-name \
521 | --program-transform-nam | --program-transform-na \
522 | --program-transform-n | --program-transform- \
523 | --program-transform | --program-transfor \
524 | --program-transfo | --program-transf \
525 | --program-trans | --program-tran \
526 | --progr-tra | --program-tr | --program-t)
527 ac_prev=program_transform_name ;;
528 -program-transform-name=* | --program-transform-name=* \
529 | --program-transform-nam=* | --program-transform-na=* \
530 | --program-transform-n=* | --program-transform-=* \
531 | --program-transform=* | --program-transfor=* \
532 | --program-transfo=* | --program-transf=* \
533 | --program-trans=* | --program-tran=* \
534 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000535 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000536
537 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
538 | -silent | --silent | --silen | --sile | --sil)
539 silent=yes ;;
540
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000541 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
542 ac_prev=sbindir ;;
543 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
544 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000545 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000546
547 -sharedstatedir | --sharedstatedir | --sharedstatedi \
548 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
549 | --sharedst | --shareds | --shared | --share | --shar \
550 | --sha | --sh)
551 ac_prev=sharedstatedir ;;
552 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
553 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
554 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
555 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000556 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000557
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000558 -site | --site | --sit)
559 ac_prev=site ;;
560 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000561 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000562
Guido van Rossum7f43da71994-08-01 12:15:30 +0000563 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
564 ac_prev=srcdir ;;
565 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000566 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000567
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000568 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
569 | --syscon | --sysco | --sysc | --sys | --sy)
570 ac_prev=sysconfdir ;;
571 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
572 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000573 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000574
Guido van Rossum7f43da71994-08-01 12:15:30 +0000575 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +0000576 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000577 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000578 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000579
580 -v | -verbose | --verbose | --verbos | --verbo | --verb)
581 verbose=yes ;;
582
Martin v. Löwis11437992002-04-12 09:54:03 +0000583 -version | --version | --versio | --versi | --vers | -V)
584 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000585
586 -with-* | --with-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000587 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000588 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000589 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
590 { echo "$as_me: error: invalid package name: $ac_package" >&2
591 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000592 ac_package=`echo $ac_package| sed 's/-/_/g'`
Martin v. Löwis11437992002-04-12 09:54:03 +0000593 case $ac_option in
594 *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000595 *) ac_optarg=yes ;;
596 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000597 eval "with_$ac_package='$ac_optarg'" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000598
599 -without-* | --without-*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000600 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000601 # Reject names that are not valid shell variable names.
Martin v. Löwis11437992002-04-12 09:54:03 +0000602 expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
603 { echo "$as_me: error: invalid package name: $ac_package" >&2
604 { (exit 1); exit 1; }; }
605 ac_package=`echo $ac_package | sed 's/-/_/g'`
606 eval "with_$ac_package=no" ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000607
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000608 --x)
609 # Obsolete; use --with-x.
610 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000611
612 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
613 | --x-incl | --x-inc | --x-in | --x-i)
614 ac_prev=x_includes ;;
615 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
616 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000617 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000618
619 -x-libraries | --x-libraries | --x-librarie | --x-librari \
620 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
621 ac_prev=x_libraries ;;
622 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
623 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000624 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000625
Martin v. Löwis11437992002-04-12 09:54:03 +0000626 -*) { echo "$as_me: error: unrecognized option: $ac_option
627Try \`$0 --help' for more information." >&2
628 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000629 ;;
630
Martin v. Löwis11437992002-04-12 09:54:03 +0000631 *=*)
632 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
633 # Reject names that are not valid shell variable names.
634 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
635 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
636 { (exit 1); exit 1; }; }
637 ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
638 eval "$ac_envvar='$ac_optarg'"
639 export $ac_envvar ;;
640
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000641 *)
Martin v. Löwis11437992002-04-12 09:54:03 +0000642 # FIXME: should be removed in autoconf 3.0.
643 echo "$as_me: WARNING: you should use --build, --host, --target" >&2
644 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
645 echo "$as_me: WARNING: invalid host type: $ac_option" >&2
646 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +0000647 ;;
648
649 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +0000650done
651
Guido van Rossum7f43da71994-08-01 12:15:30 +0000652if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000653 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
654 { echo "$as_me: error: missing argument to $ac_option" >&2
655 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +0000656fi
657
Martin v. Löwis11437992002-04-12 09:54:03 +0000658# Be sure to have absolute paths.
659for ac_var in exec_prefix prefix
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000660do
Martin v. Löwis11437992002-04-12 09:54:03 +0000661 eval ac_val=$`echo $ac_var`
662 case $ac_val in
663 [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
664 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
665 { (exit 1); exit 1; }; };;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000666 esac
667done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000668
Martin v. Löwis11437992002-04-12 09:54:03 +0000669# Be sure to have absolute paths.
670for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +0000671 localstatedir libdir includedir oldincludedir infodir mandir
Martin v. Löwis11437992002-04-12 09:54:03 +0000672do
673 eval ac_val=$`echo $ac_var`
674 case $ac_val in
675 [\\/$]* | ?:[\\/]* ) ;;
676 *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
677 { (exit 1); exit 1; }; };;
678 esac
679done
Guido van Rossum627b2d71993-12-24 10:39:16 +0000680
Martin v. Löwis11437992002-04-12 09:54:03 +0000681# There might be people who depend on the old broken behavior: `$host'
682# used to hold the argument of --host etc.
683# FIXME: To remove some day.
684build=$build_alias
685host=$host_alias
686target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +0000687
Martin v. Löwis11437992002-04-12 09:54:03 +0000688# FIXME: To remove some day.
689if test "x$host_alias" != x; then
690 if test "x$build_alias" = x; then
691 cross_compiling=maybe
692 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
693 If a cross compiler is detected then cross compile mode will be used." >&2
694 elif test "x$build_alias" != "x$host_alias"; then
695 cross_compiling=yes
696 fi
697fi
698
699ac_tool_prefix=
700test -n "$host_alias" && ac_tool_prefix=$host_alias-
701
702test "$silent" = yes && exec 6>/dev/null
703
Guido van Rossum627b2d71993-12-24 10:39:16 +0000704
705# Find the source files, if location was not specified.
706if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +0000707 ac_srcdir_defaulted=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000708 # Try the directory containing this script, then its parent.
Martin v. Löwis11437992002-04-12 09:54:03 +0000709 ac_confdir=`(dirname "$0") 2>/dev/null ||
710$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +0000711 X"$0" : 'X\(//\)[^/]' \| \
712 X"$0" : 'X\(//\)$' \| \
713 X"$0" : 'X\(/\)' \| \
714 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +0000715echo X"$0" |
716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
717 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
718 /^X\(\/\/\)$/{ s//\1/; q; }
719 /^X\(\/\).*/{ s//\1/; q; }
720 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +0000721 srcdir=$ac_confdir
722 if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum627b2d71993-12-24 10:39:16 +0000723 srcdir=..
724 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000725else
726 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +0000727fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000728if test ! -r $srcdir/$ac_unique_file; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000729 if test "$ac_srcdir_defaulted" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000730 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
731 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000732 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000733 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
734 { (exit 1); exit 1; }; }
Guido van Rossum627b2d71993-12-24 10:39:16 +0000735 fi
Guido van Rossum627b2d71993-12-24 10:39:16 +0000736fi
Skip Montanaro6dead952003-09-25 14:50:04 +0000737(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
738 { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
739 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +0000740srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
741ac_env_build_alias_set=${build_alias+set}
742ac_env_build_alias_value=$build_alias
743ac_cv_env_build_alias_set=${build_alias+set}
744ac_cv_env_build_alias_value=$build_alias
745ac_env_host_alias_set=${host_alias+set}
746ac_env_host_alias_value=$host_alias
747ac_cv_env_host_alias_set=${host_alias+set}
748ac_cv_env_host_alias_value=$host_alias
749ac_env_target_alias_set=${target_alias+set}
750ac_env_target_alias_value=$target_alias
751ac_cv_env_target_alias_set=${target_alias+set}
752ac_cv_env_target_alias_value=$target_alias
753ac_env_CC_set=${CC+set}
754ac_env_CC_value=$CC
755ac_cv_env_CC_set=${CC+set}
756ac_cv_env_CC_value=$CC
757ac_env_CFLAGS_set=${CFLAGS+set}
758ac_env_CFLAGS_value=$CFLAGS
759ac_cv_env_CFLAGS_set=${CFLAGS+set}
760ac_cv_env_CFLAGS_value=$CFLAGS
761ac_env_LDFLAGS_set=${LDFLAGS+set}
762ac_env_LDFLAGS_value=$LDFLAGS
763ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
764ac_cv_env_LDFLAGS_value=$LDFLAGS
765ac_env_CPPFLAGS_set=${CPPFLAGS+set}
766ac_env_CPPFLAGS_value=$CPPFLAGS
767ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
768ac_cv_env_CPPFLAGS_value=$CPPFLAGS
769ac_env_CPP_set=${CPP+set}
770ac_env_CPP_value=$CPP
771ac_cv_env_CPP_set=${CPP+set}
772ac_cv_env_CPP_value=$CPP
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000773
Martin v. Löwis11437992002-04-12 09:54:03 +0000774#
775# Report the --help message.
776#
777if test "$ac_init_help" = "long"; then
778 # Omit some internal or obsolete options to make the list less imposing.
779 # This message is too long to be a string in the A/UX 3.1 sh.
780 cat <<_ACEOF
Fred Drake9bd44622003-07-30 17:39:48 +0000781\`configure' configures python 2.4 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +0000782
783Usage: $0 [OPTION]... [VAR=VALUE]...
784
785To assign environment variables (e.g., CC, CFLAGS...), specify them as
786VAR=VALUE. See below for descriptions of some of the useful variables.
787
788Defaults for the options are specified in brackets.
789
790Configuration:
791 -h, --help display this help and exit
792 --help=short display options specific to this package
793 --help=recursive display the short help of all the included packages
794 -V, --version display version information and exit
795 -q, --quiet, --silent do not print \`checking...' messages
796 --cache-file=FILE cache test results in FILE [disabled]
797 -C, --config-cache alias for \`--cache-file=config.cache'
798 -n, --no-create do not create output files
799 --srcdir=DIR find the sources in DIR [configure dir or \`..']
800
801_ACEOF
802
803 cat <<_ACEOF
804Installation directories:
805 --prefix=PREFIX install architecture-independent files in PREFIX
Michael W. Hudson30ea2f22004-07-07 17:44:12 +0000806 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +0000807 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Michael W. Hudson30ea2f22004-07-07 17:44:12 +0000808 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +0000809
810By default, \`make install' will install all the files in
811\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
812an installation prefix other than \`$ac_default_prefix' using \`--prefix',
813for instance \`--prefix=\$HOME'.
814
815For better control, use the options below.
816
817Fine tuning of the installation directories:
818 --bindir=DIR user executables [EPREFIX/bin]
819 --sbindir=DIR system admin executables [EPREFIX/sbin]
820 --libexecdir=DIR program executables [EPREFIX/libexec]
821 --datadir=DIR read-only architecture-independent data [PREFIX/share]
822 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
823 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
824 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
825 --libdir=DIR object code libraries [EPREFIX/lib]
826 --includedir=DIR C header files [PREFIX/include]
827 --oldincludedir=DIR C header files for non-gcc [/usr/include]
828 --infodir=DIR info documentation [PREFIX/info]
829 --mandir=DIR man documentation [PREFIX/man]
830_ACEOF
831
832 cat <<\_ACEOF
833_ACEOF
834fi
835
836if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +0000837 case $ac_init_help in
Fred Drake9bd44622003-07-30 17:39:48 +0000838 short | recursive ) echo "Configuration of python 2.4:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +0000839 esac
Martin v. Löwis11437992002-04-12 09:54:03 +0000840 cat <<\_ACEOF
841
842Optional Features:
843 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
844 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000845 --enable-framework[=INSTALLDIR]
846 Build (MacOSX|Darwin) framework
847 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +0000848 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000849 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
850 --enable-ipv6 Enable ipv6 (with ipv4) support
851 --disable-ipv6 Disable ipv6 support
852 --enable-unicode[=ucs[24]]
853 Enable Unicode strings (default is yes)
Martin v. Löwis11437992002-04-12 09:54:03 +0000854
855Optional Packages:
856 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
857 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000858 --without-gcc never use gcc
859 --with-cxx=<compiler> enable C++ support
860 --with-suffix=.exe set executable suffix
861 --with-pydebug build with Py_DEBUG defined
862 --with-libs='lib1 ...' link against additional libs
863 --with-signal-module disable/enable signal module
864 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
865 --with(out)-threads[=DIRECTORY]
866 disable/enable thread support
867 --with(out)-thread[=DIRECTORY]
868 deprecated; use --with(out)-threads
869 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000870 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +0000871 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000872 --with(out)-pymalloc disable/enable specialized mallocs
873 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +0000874 --with-fpectl enable SIGFPE catching
875 --with-libm=STRING math library
876 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +0000877
878Some influential environment variables:
879 CC C compiler command
880 CFLAGS C compiler flags
881 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
882 nonstandard directory <lib dir>
883 CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
884 headers in a nonstandard directory <include dir>
885 CPP C preprocessor
886
887Use these variables to override the choices made by `configure' or to help
888it to find libraries and programs with nonstandard names/locations.
889
890_ACEOF
891fi
892
893if test "$ac_init_help" = "recursive"; then
894 # If there are subdirs, report their specific --help.
895 ac_popdir=`pwd`
896 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
897 test -d $ac_dir || continue
898 ac_builddir=.
899
900if test "$ac_dir" != .; then
901 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
902 # A "../" for each directory in $ac_dir_suffix.
903 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
904else
905 ac_dir_suffix= ac_top_builddir=
906fi
907
908case $srcdir in
909 .) # No --srcdir option. We are building in place.
910 ac_srcdir=.
911 if test -z "$ac_top_builddir"; then
912 ac_top_srcdir=.
913 else
914 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
915 fi ;;
916 [\\/]* | ?:[\\/]* ) # Absolute path.
917 ac_srcdir=$srcdir$ac_dir_suffix;
918 ac_top_srcdir=$srcdir ;;
919 *) # Relative path.
920 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
921 ac_top_srcdir=$ac_top_builddir$srcdir ;;
922esac
Michael W. Hudson30ea2f22004-07-07 17:44:12 +0000923# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
924# absolute.
925ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
926ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
927ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
928ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +0000929
930 cd $ac_dir
931 # Check for guested configure; otherwise get Cygnus style configure.
932 if test -f $ac_srcdir/configure.gnu; then
933 echo
934 $SHELL $ac_srcdir/configure.gnu --help=recursive
935 elif test -f $ac_srcdir/configure; then
936 echo
937 $SHELL $ac_srcdir/configure --help=recursive
938 elif test -f $ac_srcdir/configure.ac ||
Michael W. Hudson30ea2f22004-07-07 17:44:12 +0000939 test -f $ac_srcdir/configure.in; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000940 echo
941 $ac_configure --help
942 else
943 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
944 fi
945 cd $ac_popdir
946 done
947fi
948
949test -n "$ac_init_help" && exit 0
950if $ac_init_version; then
951 cat <<\_ACEOF
Fred Drake9bd44622003-07-30 17:39:48 +0000952python configure 2.4
Michael W. Hudson30ea2f22004-07-07 17:44:12 +0000953generated by GNU Autoconf 2.57
Martin v. Löwis11437992002-04-12 09:54:03 +0000954
Michael W. Hudson30ea2f22004-07-07 17:44:12 +0000955Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
956Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +0000957This configure script is free software; the Free Software Foundation
958gives unlimited permission to copy, distribute and modify it.
959_ACEOF
960 exit 0
961fi
962exec 5>config.log
963cat >&5 <<_ACEOF
964This file contains any messages produced by compilers while
965running configure, to aid debugging if configure makes a mistake.
966
Fred Drake9bd44622003-07-30 17:39:48 +0000967It was created by python $as_me 2.4, which was
Michael W. Hudson30ea2f22004-07-07 17:44:12 +0000968generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +0000969
970 $ $0 $@
971
972_ACEOF
973{
974cat <<_ASUNAME
975## --------- ##
976## Platform. ##
977## --------- ##
978
979hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
980uname -m = `(uname -m) 2>/dev/null || echo unknown`
981uname -r = `(uname -r) 2>/dev/null || echo unknown`
982uname -s = `(uname -s) 2>/dev/null || echo unknown`
983uname -v = `(uname -v) 2>/dev/null || echo unknown`
984
985/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
986/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
987
988/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
989/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
990/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
991hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
992/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
993/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
994/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
995
996_ASUNAME
997
998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
999for as_dir in $PATH
1000do
1001 IFS=$as_save_IFS
1002 test -z "$as_dir" && as_dir=.
1003 echo "PATH: $as_dir"
1004done
1005
1006} >&5
1007
1008cat >&5 <<_ACEOF
1009
1010
1011## ----------- ##
1012## Core tests. ##
1013## ----------- ##
1014
1015_ACEOF
1016
1017
1018# Keep a trace of the command line.
1019# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001020# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001021# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001022# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001023ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001024ac_configure_args0=
1025ac_configure_args1=
Martin v. Löwis11437992002-04-12 09:54:03 +00001026ac_sep=
Skip Montanaro6dead952003-09-25 14:50:04 +00001027ac_must_keep_next=false
1028for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001029do
Skip Montanaro6dead952003-09-25 14:50:04 +00001030 for ac_arg
1031 do
1032 case $ac_arg in
1033 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1034 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1035 | -silent | --silent | --silen | --sile | --sil)
1036 continue ;;
1037 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1038 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1039 esac
1040 case $ac_pass in
1041 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1042 2)
1043 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1044 if test $ac_must_keep_next = true; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001045 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001046 else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001047 case $ac_arg in
1048 *=* | --config-cache | -C | -disable-* | --disable-* \
1049 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1050 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1051 | -with-* | --with-* | -without-* | --without-* | --x)
1052 case "$ac_configure_args0 " in
1053 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1054 esac
1055 ;;
1056 -* ) ac_must_keep_next=true ;;
1057 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001058 fi
1059 ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1060 # Get rid of the leading space.
1061 ac_sep=" "
1062 ;;
1063 esac
1064 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001065done
Skip Montanaro6dead952003-09-25 14:50:04 +00001066$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1067$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 +00001068
1069# When interrupted or exit'd, cleanup temporary files, and complete
1070# config.log. We remove comments because anyway the quotes in there
1071# would cause problems or look ugly.
1072# WARNING: Be sure not to use single quotes in there, as some shells,
1073# such as our DU 5.0 friend, will then `close' the trap.
1074trap 'exit_status=$?
1075 # Save into config.log some information that might help in debugging.
1076 {
1077 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001078
Martin v. Löwis11437992002-04-12 09:54:03 +00001079 cat <<\_ASBOX
1080## ---------------- ##
1081## Cache variables. ##
1082## ---------------- ##
1083_ASBOX
1084 echo
1085 # The following way of writing the cache mishandles newlines in values,
1086{
1087 (set) 2>&1 |
1088 case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1089 *ac_space=\ *)
1090 sed -n \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001091 "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1092 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001093 ;;
1094 *)
1095 sed -n \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001096 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 ;;
1098 esac;
1099}
1100 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001101
1102 cat <<\_ASBOX
1103## ----------------- ##
1104## Output variables. ##
1105## ----------------- ##
1106_ASBOX
1107 echo
1108 for ac_var in $ac_subst_vars
1109 do
1110 eval ac_val=$`echo $ac_var`
1111 echo "$ac_var='"'"'$ac_val'"'"'"
1112 done | sort
1113 echo
1114
1115 if test -n "$ac_subst_files"; then
1116 cat <<\_ASBOX
1117## ------------- ##
1118## Output files. ##
1119## ------------- ##
1120_ASBOX
1121 echo
1122 for ac_var in $ac_subst_files
1123 do
1124 eval ac_val=$`echo $ac_var`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001125 echo "$ac_var='"'"'$ac_val'"'"'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001126 done | sort
1127 echo
1128 fi
1129
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 if test -s confdefs.h; then
1131 cat <<\_ASBOX
1132## ----------- ##
1133## confdefs.h. ##
1134## ----------- ##
1135_ASBOX
1136 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001137 sed "/^$/d" confdefs.h | sort
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 echo
1139 fi
1140 test "$ac_signal" != 0 &&
1141 echo "$as_me: caught signal $ac_signal"
1142 echo "$as_me: exit $exit_status"
1143 } >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001144 rm -f core core.* *.core &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001145 rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
1146 exit $exit_status
1147 ' 0
1148for ac_signal in 1 2 13 15; do
1149 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1150done
1151ac_signal=0
1152
1153# confdefs.h avoids OS command line length limits that DEFS can exceed.
1154rm -rf conftest* confdefs.h
1155# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1156echo >confdefs.h
1157
1158# Predefined preprocessor variables.
1159
1160cat >>confdefs.h <<_ACEOF
1161#define PACKAGE_NAME "$PACKAGE_NAME"
1162_ACEOF
1163
1164
1165cat >>confdefs.h <<_ACEOF
1166#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1167_ACEOF
1168
1169
1170cat >>confdefs.h <<_ACEOF
1171#define PACKAGE_VERSION "$PACKAGE_VERSION"
1172_ACEOF
1173
1174
1175cat >>confdefs.h <<_ACEOF
1176#define PACKAGE_STRING "$PACKAGE_STRING"
1177_ACEOF
1178
1179
1180cat >>confdefs.h <<_ACEOF
1181#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1182_ACEOF
1183
1184
1185# Let the site file select an alternate cache file if it wants to.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001186# Prefer explicitly selected file to automatically selected ones.
1187if test -z "$CONFIG_SITE"; then
1188 if test "x$prefix" != xNONE; then
1189 CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1190 else
1191 CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1192 fi
1193fi
1194for ac_site_file in $CONFIG_SITE; do
1195 if test -r "$ac_site_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1197echo "$as_me: loading site script $ac_site_file" >&6;}
1198 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001199 . "$ac_site_file"
1200 fi
1201done
1202
1203if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 # Some versions of bash will fail to source /dev/null (special
1205 # files actually), so we avoid doing that.
1206 if test -f "$cache_file"; then
1207 { echo "$as_me:$LINENO: loading cache $cache_file" >&5
1208echo "$as_me: loading cache $cache_file" >&6;}
1209 case $cache_file in
1210 [\\/]* | ?:[\\/]* ) . $cache_file;;
1211 *) . ./$cache_file;;
1212 esac
1213 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001214else
Martin v. Löwis11437992002-04-12 09:54:03 +00001215 { echo "$as_me:$LINENO: creating cache $cache_file" >&5
1216echo "$as_me: creating cache $cache_file" >&6;}
1217 >$cache_file
1218fi
1219
1220# Check that the precious variables saved in the cache have kept the same
1221# value.
1222ac_cache_corrupted=false
1223for ac_var in `(set) 2>&1 |
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001224 sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001225 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1226 eval ac_new_set=\$ac_env_${ac_var}_set
1227 eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1228 eval ac_new_val="\$ac_env_${ac_var}_value"
1229 case $ac_old_set,$ac_new_set in
1230 set,)
1231 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1232echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1233 ac_cache_corrupted=: ;;
1234 ,set)
1235 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1236echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1237 ac_cache_corrupted=: ;;
1238 ,);;
1239 *)
1240 if test "x$ac_old_val" != "x$ac_new_val"; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001241 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001242echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001243 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001244echo "$as_me: former value: $ac_old_val" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001245 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001246echo "$as_me: current value: $ac_new_val" >&2;}
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001247 ac_cache_corrupted=:
Martin v. Löwis11437992002-04-12 09:54:03 +00001248 fi;;
1249 esac
1250 # Pass precious variables to config.status.
1251 if test "$ac_new_set" = set; then
1252 case $ac_new_val in
1253 *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1254 ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1255 *) ac_arg=$ac_var=$ac_new_val ;;
1256 esac
1257 case " $ac_configure_args " in
1258 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1259 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1260 esac
1261 fi
1262done
1263if $ac_cache_corrupted; then
1264 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1265echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1266 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1267echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1268 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001269fi
1270
Guido van Rossum7f43da71994-08-01 12:15:30 +00001271ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001272ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001273ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1274ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1275ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001276
Guido van Rossum627b2d71993-12-24 10:39:16 +00001277
Michael W. Hudson54241132001-12-07 15:38:26 +00001278
1279
Guido van Rossum627b2d71993-12-24 10:39:16 +00001280
Martin v. Löwis11437992002-04-12 09:54:03 +00001281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
Martin v. Löwis88afe662002-10-26 13:47:44 +00001294
1295
1296
1297
1298
1299
1300
1301
1302
Skip Montanaro6dead952003-09-25 14:50:04 +00001303
1304 ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001305
1306
Martin v. Löwis11437992002-04-12 09:54:03 +00001307
1308
1309
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001310
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001311
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001312# We don't use PACKAGE_ variables, and they cause conflicts
1313# with other autoconf-based packages that include Python.h
1314grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1315rm confdefs.h
1316mv confdefs.h.new confdefs.h
1317
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001318
Fred Drake9bd44622003-07-30 17:39:48 +00001319VERSION=2.4
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001320
Martin v. Löwis1142de32002-03-29 16:28:31 +00001321
1322SOVERSION=1.0
1323
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001324# The later defininition of _XOPEN_SOURCE disables certain features
1325# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1326
1327cat >>confdefs.h <<\_ACEOF
1328#define _GNU_SOURCE 1
1329_ACEOF
1330
1331
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001332# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1333# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1334# them.
1335
1336cat >>confdefs.h <<\_ACEOF
1337#define _NETBSD_SOURCE 1
1338_ACEOF
1339
1340
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001341# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1342# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1343# them.
1344
1345cat >>confdefs.h <<\_ACEOF
1346#define __BSD_VISIBLE 1
1347_ACEOF
1348
1349
Martin v. Löwisd6320502004-08-12 13:45:08 +00001350# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1351# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1352
1353cat >>confdefs.h <<\_ACEOF
1354#define _BSD_TYPES 1
1355_ACEOF
1356
1357
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001358define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001359
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001360# Arguments passed to configure.
1361
1362CONFIG_ARGS="$ac_configure_args"
1363
Jack Jansene578a632001-08-15 01:27:14 +00001364# Check whether --enable-framework or --disable-framework was given.
1365if test "${enable_framework+set}" = set; then
1366 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001367
Jack Jansene578a632001-08-15 01:27:14 +00001368 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001369 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001370 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001371 esac
1372 case $enableval in
1373 no)
1374 PYTHONFRAMEWORK=
1375 PYTHONFRAMEWORKDIR=no-framework
1376 PYTHONFRAMEWORKPREFIX=
1377 PYTHONFRAMEWORKINSTALLDIR=
1378 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001379 ;;
1380 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001381 PYTHONFRAMEWORK=Python
1382 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001383 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001384 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1385 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001386 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001387
Guido van Rossum563e7081996-09-10 18:20:48 +00001388else
Martin v. Löwis11437992002-04-12 09:54:03 +00001389
Jack Jansene578a632001-08-15 01:27:14 +00001390 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001391 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001392 PYTHONFRAMEWORKPREFIX=
1393 PYTHONFRAMEWORKINSTALLDIR=
1394 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001395
Martin v. Löwis11437992002-04-12 09:54:03 +00001396fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001397
1398
1399
1400
Jack Jansene578a632001-08-15 01:27:14 +00001401
1402##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001403## AC_HELP_STRING(--with-dyld,
1404## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001405##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001406# Set name for machine-dependent library files
1407
Martin v. Löwis11437992002-04-12 09:54:03 +00001408echo "$as_me:$LINENO: checking MACHDEP" >&5
1409echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001410if test -z "$MACHDEP"
1411then
Guido van Rossum563e7081996-09-10 18:20:48 +00001412 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001413 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1414 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001415 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001416 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001417 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001418 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001419 ac_md_system=`echo $ac_sys_system |
1420 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1421 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001422 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001423 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001424
Guido van Rossum07397971997-04-29 21:49:50 +00001425 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001426 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001427 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001428 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001429 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001430 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001431 esac
1432fi
Guido van Rossum91922671997-10-09 20:24:13 +00001433
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001434# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1435# disable features if it is defined, without any means to access these
1436# features as extensions. For these systems, we skip the definition of
1437# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1438# some feature, make sure there is no alternative way to access this
1439# feature. Also, when using wildcards, make sure you have verified the
1440# need for not defining _XOPEN_SOURCE on all systems matching the
1441# wildcard, and that the wildcard does not include future systems
1442# (which may remove their limitations).
1443case $ac_sys_system/$ac_sys_release in
1444 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1445 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001446 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
1447 OpenBSD/2.* | OpenBSD/3.[01234])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001448 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001449 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1450 # of union __?sigval. Reported by Stuart Bishop.
1451 SunOS/5.6)
1452 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001453 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1454 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00001455 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00001456 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001457 define_xopen_source=no;;
1458 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001459 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001460 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001461 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001462 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1463 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1464 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1465 # This should hopefully be fixed in FreeBSD 4.9
1466 FreeBSD/4.8* | Darwin/6* )
1467 define_xopen_source=no;;
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001468 # On AIX 4, mbstate_t is defined only when _XOPEN_SOURCE == 500 but used in
1469 # wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined or
1470 # has another value. By not (re)defining it, the defaults come in place.
1471 AIX/4)
1472 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001473esac
1474
1475if test $define_xopen_source = yes
1476then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001477
1478cat >>confdefs.h <<\_ACEOF
1479#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001480_ACEOF
1481
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001482
1483 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1484 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1485 # several APIs are not declared. Since this is also needed in some
1486 # cases for HP-UX, we define it globally.
1487
1488
1489cat >>confdefs.h <<\_ACEOF
1490#define _XOPEN_SOURCE_EXTENDED 1
1491_ACEOF
1492
1493
1494cat >>confdefs.h <<\_ACEOF
1495#define _POSIX_C_SOURCE 200112L
1496_ACEOF
1497
1498
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001499fi
1500
Guido van Rossum91922671997-10-09 20:24:13 +00001501#
1502# SGI compilers allow the specification of the both the ABI and the
1503# ISA on the command line. Depending on the values of these switches,
1504# different and often incompatable code will be generated.
1505#
1506# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1507# thus supply support for various ABI/ISA combinations. The MACHDEP
1508# variable is also adjusted.
1509#
1510
1511if test ! -z "$SGI_ABI"
1512then
1513 CC="cc $SGI_ABI"
1514 LDFLAGS="$SGI_ABI $LDFLAGS"
1515 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1516fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001517echo "$as_me:$LINENO: result: $MACHDEP" >&5
1518echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001519
Jack Jansen83f898c2002-12-30 22:23:40 +00001520# And add extra plat-mac for darwin
1521
Jack Jansen7b59b422003-03-17 15:44:10 +00001522
Jack Jansen83f898c2002-12-30 22:23:40 +00001523echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1524echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1525if test -z "$EXTRAPLATDIR"
1526then
1527 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001528 darwin)
1529 EXTRAPLATDIR="\$(PLATMACDIRS)"
1530 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1531 ;;
1532 *)
1533 EXTRAPLATDIR=""
1534 EXTRAMACHDEPPATH=""
1535 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001536 esac
1537fi
1538echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1539echo "${ECHO_T}$EXTRAPLATDIR" >&6
1540
Jack Jansen6b08a402004-06-03 12:41:45 +00001541# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
1542# it may influence the way we can build extensions, so distutils
1543# needs to check it
1544
1545CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
1546
Guido van Rossum627b2d71993-12-24 10:39:16 +00001547# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001548
1549# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1550# for debug/optimization stuff. BASECFLAGS is for flags that are required
1551# just to get things to compile and link. Users are free to override OPT
1552# when running configure or make. The build should not break if they do.
1553# BASECFLAGS should generally not be messed with, however.
1554
1555# XXX shouldn't some/most/all of this code be merged with the stuff later
1556# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001557echo "$as_me:$LINENO: checking for --without-gcc" >&5
1558echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1559
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001560# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001561if test "${with_gcc+set}" = set; then
1562 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001563
Guido van Rossum7f43da71994-08-01 12:15:30 +00001564 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001565 no) CC=cc
1566 without_gcc=yes;;
1567 yes) CC=gcc
1568 without_gcc=no;;
1569 *) CC=$withval
1570 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001571 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001572else
Martin v. Löwis11437992002-04-12 09:54:03 +00001573
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001574 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001575 AIX*) CC=cc_r
1576 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001577 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001578 case $BE_HOST_CPU in
1579 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001580 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001581 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001582 BASECFLAGS="$BASECFLAGS -export pragma"
1583 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001584 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001585 ;;
1586 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001587 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001588 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001589 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001590 ;;
1591 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001592 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1593echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1594 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001595 ;;
1596 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001597 AR="\$(srcdir)/Modules/ar_beos"
1598 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001599 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001600 Monterey*)
1601 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001602 without_gcc=;;
1603 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001604 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001605fi;
1606echo "$as_me:$LINENO: result: $without_gcc" >&5
1607echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001608
1609
Guido van Rossum95012191999-12-16 17:50:52 +00001610
Fred Drakea1a84e72001-03-06 05:52:16 +00001611MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001612echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1613echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1614
Guido van Rossum95012191999-12-16 17:50:52 +00001615# Check whether --with-cxx or --without-cxx was given.
1616if test "${with_cxx+set}" = set; then
1617 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001618
Martin v. Löwis22352952000-12-13 17:37:02 +00001619 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001620 case $withval in
1621 no) CXX=
1622 with_cxx=no;;
1623 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001624 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001625 with_cxx=$withval;;
1626 esac
1627else
Martin v. Löwis11437992002-04-12 09:54:03 +00001628
Guido van Rossum95012191999-12-16 17:50:52 +00001629 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001630 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001631
Martin v. Löwis11437992002-04-12 09:54:03 +00001632fi;
1633echo "$as_me:$LINENO: result: $with_cxx" >&5
1634echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001635
1636if test "$with_cxx" = "yes"
1637then
Martin v. Löwis11437992002-04-12 09:54:03 +00001638 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1639echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1640 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001641fi
1642
1643
1644
1645
Martin v. Löwis11437992002-04-12 09:54:03 +00001646if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001647then
1648 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1649do
Martin v. Löwis11437992002-04-12 09:54:03 +00001650 # 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 +00001651set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001652echo "$as_me:$LINENO: checking for $ac_word" >&5
1653echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1654if test "${ac_cv_prog_CXX+set}" = set; then
1655 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001656else
1657 if test -n "$CXX"; then
1658 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1659else
Martin v. Löwis11437992002-04-12 09:54:03 +00001660as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1661for as_dir in $PATH
1662do
1663 IFS=$as_save_IFS
1664 test -z "$as_dir" && as_dir=.
1665 for ac_exec_ext in '' $ac_executable_extensions; do
1666 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1667 ac_cv_prog_CXX="$ac_prog"
1668 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1669 break 2
1670 fi
1671done
1672done
1673
Martin v. Löwis22352952000-12-13 17:37:02 +00001674fi
1675fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001676CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001677if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001678 echo "$as_me:$LINENO: result: $CXX" >&5
1679echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001680else
Martin v. Löwis11437992002-04-12 09:54:03 +00001681 echo "$as_me:$LINENO: result: no" >&5
1682echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001683fi
1684
Martin v. Löwis11437992002-04-12 09:54:03 +00001685 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001686done
1687test -n "$CXX" || CXX="notfound"
1688
1689 if test "$CXX" = "notfound"
1690 then
1691 CXX=
1692 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001693 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001694ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001695ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1696ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1697ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1698 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001699#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00001700/* confdefs.h. */
1701_ACEOF
1702cat confdefs.h >>conftest.$ac_ext
1703cat >>conftest.$ac_ext <<_ACEOF
1704/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001705
Martin v. Löwis11437992002-04-12 09:54:03 +00001706int
1707main ()
1708{
Michael W. Hudson54241132001-12-07 15:38:26 +00001709
Martin v. Löwis11437992002-04-12 09:54:03 +00001710 ;
1711 return 0;
1712}
1713_ACEOF
1714ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001715ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001716# Try to create an executable without -o first, disregard a.out.
1717# It will help us diagnose broken compilers, and finding out an intuition
1718# of exeext.
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001719echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1720echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001721ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1722if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1723 (eval $ac_link_default) 2>&5
1724 ac_status=$?
1725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1726 (exit $ac_status); }; then
1727 # Find the output, starting from the most likely. This scheme is
1728# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1729# resort.
1730
1731# Be careful to initialize this variable, since it used to be cached.
1732# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1733ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001734# b.out is created by i960 compilers.
1735for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1736do
1737 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001738 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001739 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001740 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001741 conftest.$ac_ext )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001742 # This is the source file.
1743 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001744 [ab].out )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001745 # We found the default executable, but exeext='' is most
1746 # certainly right.
1747 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001748 *.* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001749 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1750 # FIXME: I believe we export ac_cv_exeext for Libtool,
1751 # but it would be cool to find out if it's true. Does anybody
1752 # maintain Libtool? --akim.
1753 export ac_cv_exeext
1754 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001755 * )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001756 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001757 esac
1758done
1759else
1760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001761sed 's/^/| /' conftest.$ac_ext >&5
1762
1763{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1764See \`config.log' for more details." >&5
1765echo "$as_me: error: C++ compiler cannot create executables
1766See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001767 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001768fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001769
1770ac_exeext=$ac_cv_exeext
1771echo "$as_me:$LINENO: result: $ac_file" >&5
1772echo "${ECHO_T}$ac_file" >&6
1773
1774# Check the compiler produces executables we can run. If not, either
1775# the compiler is broken, or we cross compile.
1776echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1777echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1778# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1779# If not cross compiling, check that we can run a simple program.
1780if test "$cross_compiling" != yes; then
1781 if { ac_try='./$ac_file'
1782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1783 (eval $ac_try) 2>&5
1784 ac_status=$?
1785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1786 (exit $ac_status); }; }; then
1787 cross_compiling=no
1788 else
1789 if test "$cross_compiling" = maybe; then
1790 cross_compiling=yes
1791 else
1792 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001793If you meant to cross compile, use \`--host'.
1794See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001795echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001796If you meant to cross compile, use \`--host'.
1797See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001798 { (exit 1); exit 1; }; }
1799 fi
1800 fi
1801fi
1802echo "$as_me:$LINENO: result: yes" >&5
1803echo "${ECHO_T}yes" >&6
1804
Skip Montanaro6dead952003-09-25 14:50:04 +00001805rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001806ac_clean_files=$ac_clean_files_save
1807# Check the compiler produces executables we can run. If not, either
1808# the compiler is broken, or we cross compile.
1809echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1810echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1811echo "$as_me:$LINENO: result: $cross_compiling" >&5
1812echo "${ECHO_T}$cross_compiling" >&6
1813
1814echo "$as_me:$LINENO: checking for suffix of executables" >&5
1815echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1816if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1817 (eval $ac_link) 2>&5
1818 ac_status=$?
1819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1820 (exit $ac_status); }; then
1821 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1822# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1823# work properly (i.e., refer to `conftest.exe'), while it won't with
1824# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001825for ac_file in conftest.exe conftest conftest.*; do
1826 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001827 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001828 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001829 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001830 export ac_cv_exeext
1831 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001832 * ) break;;
1833 esac
1834done
1835else
Skip Montanaro6dead952003-09-25 14:50:04 +00001836 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1837See \`config.log' for more details." >&5
1838echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1839See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001840 { (exit 1); exit 1; }; }
1841fi
1842
1843rm -f conftest$ac_cv_exeext
1844echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1845echo "${ECHO_T}$ac_cv_exeext" >&6
1846
1847rm -f conftest.$ac_ext
1848EXEEXT=$ac_cv_exeext
1849ac_exeext=$EXEEXT
1850
1851 ac_ext=c
1852ac_cpp='$CPP $CPPFLAGS'
1853ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1854ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1855ac_compiler_gnu=$ac_cv_c_compiler_gnu
1856
1857
Martin v. Löwis22352952000-12-13 17:37:02 +00001858
1859 fi
1860fi
1861
Guido van Rossum8b131c51995-03-09 14:10:13 +00001862# If the user switches compilers, we can't believe the cache
1863if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1864then
Martin v. Löwis11437992002-04-12 09:54:03 +00001865 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1866(it is also a good idea to do 'make clean' before compiling)" >&5
1867echo "$as_me: error: cached CC is different -- throw away $cache_file
1868(it is also a good idea to do 'make clean' before compiling)" >&2;}
1869 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001870fi
1871
Martin v. Löwis11437992002-04-12 09:54:03 +00001872ac_ext=c
1873ac_cpp='$CPP $CPPFLAGS'
1874ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1875ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1876ac_compiler_gnu=$ac_cv_c_compiler_gnu
1877if test -n "$ac_tool_prefix"; then
1878 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1879set dummy ${ac_tool_prefix}gcc; ac_word=$2
1880echo "$as_me:$LINENO: checking for $ac_word" >&5
1881echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1882if test "${ac_cv_prog_CC+set}" = set; then
1883 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001884else
1885 if test -n "$CC"; then
1886 ac_cv_prog_CC="$CC" # Let the user override the test.
1887else
Martin v. Löwis11437992002-04-12 09:54:03 +00001888as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1889for as_dir in $PATH
1890do
1891 IFS=$as_save_IFS
1892 test -z "$as_dir" && as_dir=.
1893 for ac_exec_ext in '' $ac_executable_extensions; do
1894 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1895 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1896 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1897 break 2
1898 fi
1899done
1900done
1901
Jack Jansendd19cf82001-12-06 22:36:17 +00001902fi
1903fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001904CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001905if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001906 echo "$as_me:$LINENO: result: $CC" >&5
1907echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001908else
Martin v. Löwis11437992002-04-12 09:54:03 +00001909 echo "$as_me:$LINENO: result: no" >&5
1910echo "${ECHO_T}no" >&6
1911fi
1912
1913fi
1914if test -z "$ac_cv_prog_CC"; then
1915 ac_ct_CC=$CC
1916 # Extract the first word of "gcc", so it can be a program name with args.
1917set dummy gcc; ac_word=$2
1918echo "$as_me:$LINENO: checking for $ac_word" >&5
1919echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1920if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1921 echo $ECHO_N "(cached) $ECHO_C" >&6
1922else
1923 if test -n "$ac_ct_CC"; then
1924 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1925else
1926as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1927for as_dir in $PATH
1928do
1929 IFS=$as_save_IFS
1930 test -z "$as_dir" && as_dir=.
1931 for ac_exec_ext in '' $ac_executable_extensions; do
1932 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1933 ac_cv_prog_ac_ct_CC="gcc"
1934 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1935 break 2
1936 fi
1937done
1938done
1939
1940fi
1941fi
1942ac_ct_CC=$ac_cv_prog_ac_ct_CC
1943if test -n "$ac_ct_CC"; then
1944 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1945echo "${ECHO_T}$ac_ct_CC" >&6
1946else
1947 echo "$as_me:$LINENO: result: no" >&5
1948echo "${ECHO_T}no" >&6
1949fi
1950
1951 CC=$ac_ct_CC
1952else
1953 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001954fi
1955
Jack Jansendd19cf82001-12-06 22:36:17 +00001956if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001957 if test -n "$ac_tool_prefix"; then
1958 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1959set dummy ${ac_tool_prefix}cc; ac_word=$2
1960echo "$as_me:$LINENO: checking for $ac_word" >&5
1961echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1962if test "${ac_cv_prog_CC+set}" = set; then
1963 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001964else
1965 if test -n "$CC"; then
1966 ac_cv_prog_CC="$CC" # Let the user override the test.
1967else
Martin v. Löwis11437992002-04-12 09:54:03 +00001968as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1969for as_dir in $PATH
1970do
1971 IFS=$as_save_IFS
1972 test -z "$as_dir" && as_dir=.
1973 for ac_exec_ext in '' $ac_executable_extensions; do
1974 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1975 ac_cv_prog_CC="${ac_tool_prefix}cc"
1976 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1977 break 2
1978 fi
1979done
1980done
1981
1982fi
1983fi
1984CC=$ac_cv_prog_CC
1985if test -n "$CC"; then
1986 echo "$as_me:$LINENO: result: $CC" >&5
1987echo "${ECHO_T}$CC" >&6
1988else
1989 echo "$as_me:$LINENO: result: no" >&5
1990echo "${ECHO_T}no" >&6
1991fi
1992
1993fi
1994if test -z "$ac_cv_prog_CC"; then
1995 ac_ct_CC=$CC
1996 # Extract the first word of "cc", so it can be a program name with args.
1997set dummy cc; ac_word=$2
1998echo "$as_me:$LINENO: checking for $ac_word" >&5
1999echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2000if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2001 echo $ECHO_N "(cached) $ECHO_C" >&6
2002else
2003 if test -n "$ac_ct_CC"; then
2004 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2005else
2006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2007for as_dir in $PATH
2008do
2009 IFS=$as_save_IFS
2010 test -z "$as_dir" && as_dir=.
2011 for ac_exec_ext in '' $ac_executable_extensions; do
2012 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2013 ac_cv_prog_ac_ct_CC="cc"
2014 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2015 break 2
2016 fi
2017done
2018done
2019
2020fi
2021fi
2022ac_ct_CC=$ac_cv_prog_ac_ct_CC
2023if test -n "$ac_ct_CC"; then
2024 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2025echo "${ECHO_T}$ac_ct_CC" >&6
2026else
2027 echo "$as_me:$LINENO: result: no" >&5
2028echo "${ECHO_T}no" >&6
2029fi
2030
2031 CC=$ac_ct_CC
2032else
2033 CC="$ac_cv_prog_CC"
2034fi
2035
2036fi
2037if test -z "$CC"; then
2038 # Extract the first word of "cc", so it can be a program name with args.
2039set dummy cc; ac_word=$2
2040echo "$as_me:$LINENO: checking for $ac_word" >&5
2041echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2042if test "${ac_cv_prog_CC+set}" = set; then
2043 echo $ECHO_N "(cached) $ECHO_C" >&6
2044else
2045 if test -n "$CC"; then
2046 ac_cv_prog_CC="$CC" # Let the user override the test.
2047else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002048 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002049as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2050for as_dir in $PATH
2051do
2052 IFS=$as_save_IFS
2053 test -z "$as_dir" && as_dir=.
2054 for ac_exec_ext in '' $ac_executable_extensions; do
2055 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2056 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2057 ac_prog_rejected=yes
2058 continue
2059 fi
2060 ac_cv_prog_CC="cc"
2061 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2062 break 2
2063 fi
2064done
2065done
2066
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002067if test $ac_prog_rejected = yes; then
2068 # We found a bogon in the path, so make sure we never use it.
2069 set dummy $ac_cv_prog_CC
2070 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002071 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002072 # We chose a different compiler from the bogus one.
2073 # However, it has the same basename, so the bogon will be chosen
2074 # first if we set CC to just the basename; use the full file name.
2075 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002076 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002077 fi
2078fi
2079fi
2080fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002081CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002082if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002083 echo "$as_me:$LINENO: result: $CC" >&5
2084echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002085else
Martin v. Löwis11437992002-04-12 09:54:03 +00002086 echo "$as_me:$LINENO: result: no" >&5
2087echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002088fi
2089
Martin v. Löwis11437992002-04-12 09:54:03 +00002090fi
2091if test -z "$CC"; then
2092 if test -n "$ac_tool_prefix"; then
2093 for ac_prog in cl
2094 do
2095 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2096set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2097echo "$as_me:$LINENO: checking for $ac_word" >&5
2098echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2099if test "${ac_cv_prog_CC+set}" = set; then
2100 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002101else
2102 if test -n "$CC"; then
2103 ac_cv_prog_CC="$CC" # Let the user override the test.
2104else
Martin v. Löwis11437992002-04-12 09:54:03 +00002105as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2106for as_dir in $PATH
2107do
2108 IFS=$as_save_IFS
2109 test -z "$as_dir" && as_dir=.
2110 for ac_exec_ext in '' $ac_executable_extensions; do
2111 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2112 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2113 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2114 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002115 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002116done
2117done
2118
2119fi
2120fi
2121CC=$ac_cv_prog_CC
2122if test -n "$CC"; then
2123 echo "$as_me:$LINENO: result: $CC" >&5
2124echo "${ECHO_T}$CC" >&6
2125else
2126 echo "$as_me:$LINENO: result: no" >&5
2127echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002128fi
2129
Martin v. Löwis11437992002-04-12 09:54:03 +00002130 test -n "$CC" && break
2131 done
2132fi
2133if test -z "$CC"; then
2134 ac_ct_CC=$CC
2135 for ac_prog in cl
2136do
2137 # Extract the first word of "$ac_prog", so it can be a program name with args.
2138set dummy $ac_prog; ac_word=$2
2139echo "$as_me:$LINENO: checking for $ac_word" >&5
2140echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2141if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2142 echo $ECHO_N "(cached) $ECHO_C" >&6
2143else
2144 if test -n "$ac_ct_CC"; then
2145 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2146else
2147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2148for as_dir in $PATH
2149do
2150 IFS=$as_save_IFS
2151 test -z "$as_dir" && as_dir=.
2152 for ac_exec_ext in '' $ac_executable_extensions; do
2153 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2154 ac_cv_prog_ac_ct_CC="$ac_prog"
2155 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2156 break 2
2157 fi
2158done
2159done
Jack Jansendd19cf82001-12-06 22:36:17 +00002160
Martin v. Löwis11437992002-04-12 09:54:03 +00002161fi
2162fi
2163ac_ct_CC=$ac_cv_prog_ac_ct_CC
2164if test -n "$ac_ct_CC"; then
2165 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2166echo "${ECHO_T}$ac_ct_CC" >&6
2167else
2168 echo "$as_me:$LINENO: result: no" >&5
2169echo "${ECHO_T}no" >&6
2170fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002171
Martin v. Löwis11437992002-04-12 09:54:03 +00002172 test -n "$ac_ct_CC" && break
2173done
Michael W. Hudson54241132001-12-07 15:38:26 +00002174
Martin v. Löwis11437992002-04-12 09:54:03 +00002175 CC=$ac_ct_CC
2176fi
2177
2178fi
2179
2180
Skip Montanaro6dead952003-09-25 14:50:04 +00002181test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2182See \`config.log' for more details." >&5
2183echo "$as_me: error: no acceptable C compiler found in \$PATH
2184See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002185 { (exit 1); exit 1; }; }
2186
2187# Provide some information about the compiler.
2188echo "$as_me:$LINENO:" \
2189 "checking for C compiler version" >&5
2190ac_compiler=`set X $ac_compile; echo $2`
2191{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2192 (eval $ac_compiler --version </dev/null >&5) 2>&5
2193 ac_status=$?
2194 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2195 (exit $ac_status); }
2196{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2197 (eval $ac_compiler -v </dev/null >&5) 2>&5
2198 ac_status=$?
2199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2200 (exit $ac_status); }
2201{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2202 (eval $ac_compiler -V </dev/null >&5) 2>&5
2203 ac_status=$?
2204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2205 (exit $ac_status); }
2206
2207cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002208#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002209/* confdefs.h. */
2210_ACEOF
2211cat confdefs.h >>conftest.$ac_ext
2212cat >>conftest.$ac_ext <<_ACEOF
2213/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002214
Martin v. Löwis11437992002-04-12 09:54:03 +00002215int
2216main ()
2217{
2218
2219 ;
2220 return 0;
2221}
2222_ACEOF
2223ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002224ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002225# Try to create an executable without -o first, disregard a.out.
2226# It will help us diagnose broken compilers, and finding out an intuition
2227# of exeext.
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002228echo "$as_me:$LINENO: checking for C compiler default output" >&5
2229echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002230ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2231if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2232 (eval $ac_link_default) 2>&5
2233 ac_status=$?
2234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2235 (exit $ac_status); }; then
2236 # Find the output, starting from the most likely. This scheme is
2237# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2238# resort.
2239
2240# Be careful to initialize this variable, since it used to be cached.
2241# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2242ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002243# b.out is created by i960 compilers.
2244for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2245do
2246 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002247 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002248 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002249 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002250 conftest.$ac_ext )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002251 # This is the source file.
2252 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002253 [ab].out )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002254 # We found the default executable, but exeext='' is most
2255 # certainly right.
2256 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002257 *.* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002258 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2259 # FIXME: I believe we export ac_cv_exeext for Libtool,
2260 # but it would be cool to find out if it's true. Does anybody
2261 # maintain Libtool? --akim.
2262 export ac_cv_exeext
2263 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002264 * )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002265 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002266 esac
2267done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002268else
Martin v. Löwis11437992002-04-12 09:54:03 +00002269 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002270sed 's/^/| /' conftest.$ac_ext >&5
2271
2272{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2273See \`config.log' for more details." >&5
2274echo "$as_me: error: C compiler cannot create executables
2275See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002276 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002277fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002278
Martin v. Löwis11437992002-04-12 09:54:03 +00002279ac_exeext=$ac_cv_exeext
2280echo "$as_me:$LINENO: result: $ac_file" >&5
2281echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002282
Martin v. Löwis11437992002-04-12 09:54:03 +00002283# Check the compiler produces executables we can run. If not, either
2284# the compiler is broken, or we cross compile.
2285echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2286echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2287# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2288# If not cross compiling, check that we can run a simple program.
2289if test "$cross_compiling" != yes; then
2290 if { ac_try='./$ac_file'
2291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2292 (eval $ac_try) 2>&5
2293 ac_status=$?
2294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2295 (exit $ac_status); }; }; then
2296 cross_compiling=no
2297 else
2298 if test "$cross_compiling" = maybe; then
2299 cross_compiling=yes
2300 else
2301 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002302If you meant to cross compile, use \`--host'.
2303See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002304echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002305If you meant to cross compile, use \`--host'.
2306See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002307 { (exit 1); exit 1; }; }
2308 fi
2309 fi
2310fi
2311echo "$as_me:$LINENO: result: yes" >&5
2312echo "${ECHO_T}yes" >&6
2313
Skip Montanaro6dead952003-09-25 14:50:04 +00002314rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002315ac_clean_files=$ac_clean_files_save
2316# Check the compiler produces executables we can run. If not, either
2317# the compiler is broken, or we cross compile.
2318echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2319echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2320echo "$as_me:$LINENO: result: $cross_compiling" >&5
2321echo "${ECHO_T}$cross_compiling" >&6
2322
2323echo "$as_me:$LINENO: checking for suffix of executables" >&5
2324echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2325if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2326 (eval $ac_link) 2>&5
2327 ac_status=$?
2328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2329 (exit $ac_status); }; then
2330 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2331# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2332# work properly (i.e., refer to `conftest.exe'), while it won't with
2333# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002334for ac_file in conftest.exe conftest conftest.*; do
2335 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002336 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002337 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002338 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002339 export ac_cv_exeext
2340 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002341 * ) break;;
2342 esac
2343done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002344else
Skip Montanaro6dead952003-09-25 14:50:04 +00002345 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2346See \`config.log' for more details." >&5
2347echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2348See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002349 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002350fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002351
Martin v. Löwis11437992002-04-12 09:54:03 +00002352rm -f conftest$ac_cv_exeext
2353echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2354echo "${ECHO_T}$ac_cv_exeext" >&6
2355
2356rm -f conftest.$ac_ext
2357EXEEXT=$ac_cv_exeext
2358ac_exeext=$EXEEXT
2359echo "$as_me:$LINENO: checking for suffix of object files" >&5
2360echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2361if test "${ac_cv_objext+set}" = set; then
2362 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002363else
Martin v. Löwis11437992002-04-12 09:54:03 +00002364 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002365#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002366/* confdefs.h. */
2367_ACEOF
2368cat confdefs.h >>conftest.$ac_ext
2369cat >>conftest.$ac_ext <<_ACEOF
2370/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002371
Martin v. Löwis11437992002-04-12 09:54:03 +00002372int
2373main ()
2374{
2375
2376 ;
2377 return 0;
2378}
2379_ACEOF
2380rm -f conftest.o conftest.obj
2381if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2382 (eval $ac_compile) 2>&5
2383 ac_status=$?
2384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2385 (exit $ac_status); }; then
2386 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2387 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002388 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002389 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2390 break;;
2391 esac
2392done
2393else
2394 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002395sed 's/^/| /' conftest.$ac_ext >&5
2396
2397{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2398See \`config.log' for more details." >&5
2399echo "$as_me: error: cannot compute suffix of object files: cannot compile
2400See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002401 { (exit 1); exit 1; }; }
2402fi
2403
2404rm -f conftest.$ac_cv_objext conftest.$ac_ext
2405fi
2406echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2407echo "${ECHO_T}$ac_cv_objext" >&6
2408OBJEXT=$ac_cv_objext
2409ac_objext=$OBJEXT
2410echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2411echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2412if test "${ac_cv_c_compiler_gnu+set}" = set; then
2413 echo $ECHO_N "(cached) $ECHO_C" >&6
2414else
2415 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002416#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002417/* confdefs.h. */
2418_ACEOF
2419cat confdefs.h >>conftest.$ac_ext
2420cat >>conftest.$ac_ext <<_ACEOF
2421/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002422
Martin v. Löwis11437992002-04-12 09:54:03 +00002423int
2424main ()
2425{
2426#ifndef __GNUC__
2427 choke me
2428#endif
2429
2430 ;
2431 return 0;
2432}
2433_ACEOF
2434rm -f conftest.$ac_objext
2435if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002436 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002437 ac_status=$?
2438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2439 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002440 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002441 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2442 (eval $ac_try) 2>&5
2443 ac_status=$?
2444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2445 (exit $ac_status); }; }; then
2446 ac_compiler_gnu=yes
2447else
2448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002449sed 's/^/| /' conftest.$ac_ext >&5
2450
Martin v. Löwis11437992002-04-12 09:54:03 +00002451ac_compiler_gnu=no
2452fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002453rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002454ac_cv_c_compiler_gnu=$ac_compiler_gnu
2455
2456fi
2457echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2458echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2459GCC=`test $ac_compiler_gnu = yes && echo yes`
2460ac_test_CFLAGS=${CFLAGS+set}
2461ac_save_CFLAGS=$CFLAGS
2462CFLAGS="-g"
2463echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2464echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2465if test "${ac_cv_prog_cc_g+set}" = set; then
2466 echo $ECHO_N "(cached) $ECHO_C" >&6
2467else
2468 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002469#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002470/* confdefs.h. */
2471_ACEOF
2472cat confdefs.h >>conftest.$ac_ext
2473cat >>conftest.$ac_ext <<_ACEOF
2474/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002475
Martin v. Löwis11437992002-04-12 09:54:03 +00002476int
2477main ()
2478{
2479
2480 ;
2481 return 0;
2482}
2483_ACEOF
2484rm -f conftest.$ac_objext
2485if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002486 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002487 ac_status=$?
2488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2489 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002490 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002491 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2492 (eval $ac_try) 2>&5
2493 ac_status=$?
2494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2495 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002496 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002497else
Martin v. Löwis11437992002-04-12 09:54:03 +00002498 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002499sed 's/^/| /' conftest.$ac_ext >&5
2500
Martin v. Löwis11437992002-04-12 09:54:03 +00002501ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002502fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002503rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002504fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002505echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2506echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002507if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002508 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002509elif test $ac_cv_prog_cc_g = yes; then
2510 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002511 CFLAGS="-g -O2"
2512 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002513 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002514 fi
2515else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002516 if test "$GCC" = yes; then
2517 CFLAGS="-O2"
2518 else
2519 CFLAGS=
2520 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002521fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002522echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2523echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2524if test "${ac_cv_prog_cc_stdc+set}" = set; then
2525 echo $ECHO_N "(cached) $ECHO_C" >&6
2526else
2527 ac_cv_prog_cc_stdc=no
2528ac_save_CC=$CC
2529cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002530#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002531/* confdefs.h. */
2532_ACEOF
2533cat confdefs.h >>conftest.$ac_ext
2534cat >>conftest.$ac_ext <<_ACEOF
2535/* end confdefs.h. */
2536#include <stdarg.h>
2537#include <stdio.h>
2538#include <sys/types.h>
2539#include <sys/stat.h>
2540/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2541struct buf { int x; };
2542FILE * (*rcsopen) (struct buf *, struct stat *, int);
2543static char *e (p, i)
2544 char **p;
2545 int i;
2546{
2547 return p[i];
2548}
2549static char *f (char * (*g) (char **, int), char **p, ...)
2550{
2551 char *s;
2552 va_list v;
2553 va_start (v,p);
2554 s = g (p, va_arg (v,int));
2555 va_end (v);
2556 return s;
2557}
2558int test (int i, double x);
2559struct s1 {int (*f) (int a);};
2560struct s2 {int (*f) (double a);};
2561int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2562int argc;
2563char **argv;
2564int
2565main ()
2566{
2567return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2568 ;
2569 return 0;
2570}
2571_ACEOF
2572# Don't try gcc -ansi; that turns off useful extensions and
2573# breaks some systems' header files.
2574# AIX -qlanglvl=ansi
2575# Ultrix and OSF/1 -std1
2576# HP-UX 10.20 and later -Ae
2577# HP-UX older versions -Aa -D_HPUX_SOURCE
2578# SVR4 -Xc -D__EXTENSIONS__
2579for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2580do
2581 CC="$ac_save_CC $ac_arg"
2582 rm -f conftest.$ac_objext
2583if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002584 (eval $ac_compile) 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002585 ac_status=$?
2586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2587 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002588 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00002589 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2590 (eval $ac_try) 2>&5
2591 ac_status=$?
2592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2593 (exit $ac_status); }; }; then
2594 ac_cv_prog_cc_stdc=$ac_arg
2595break
2596else
2597 echo "$as_me: failed program was:" >&5
2598sed 's/^/| /' conftest.$ac_ext >&5
2599
2600fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002601rm -f conftest.$ac_objext
Skip Montanaro6dead952003-09-25 14:50:04 +00002602done
2603rm -f conftest.$ac_ext conftest.$ac_objext
2604CC=$ac_save_CC
2605
2606fi
2607
2608case "x$ac_cv_prog_cc_stdc" in
2609 x|xno)
2610 echo "$as_me:$LINENO: result: none needed" >&5
2611echo "${ECHO_T}none needed" >&6 ;;
2612 *)
2613 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2614echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2615 CC="$CC $ac_cv_prog_cc_stdc" ;;
2616esac
2617
Martin v. Löwis11437992002-04-12 09:54:03 +00002618# Some people use a C++ compiler to compile C. Since we use `exit',
2619# in C++ we need to declare it. In case someone uses the same compiler
2620# for both compiling C and C++ we need to have the C++ compiler decide
2621# the declaration of exit, since it's the most demanding environment.
2622cat >conftest.$ac_ext <<_ACEOF
2623#ifndef __cplusplus
2624 choke me
2625#endif
2626_ACEOF
2627rm -f conftest.$ac_objext
2628if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002629 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002630 ac_status=$?
2631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2632 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002633 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2635 (eval $ac_try) 2>&5
2636 ac_status=$?
2637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2638 (exit $ac_status); }; }; then
2639 for ac_declaration in \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002640 ''\
2641 '#include <stdlib.h>' \
Martin v. Löwis11437992002-04-12 09:54:03 +00002642 'extern "C" void std::exit (int) throw (); using std::exit;' \
2643 'extern "C" void std::exit (int); using std::exit;' \
2644 'extern "C" void exit (int) throw ();' \
2645 'extern "C" void exit (int);' \
2646 'void exit (int);'
2647do
2648 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002649#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002650/* confdefs.h. */
2651_ACEOF
2652cat confdefs.h >>conftest.$ac_ext
2653cat >>conftest.$ac_ext <<_ACEOF
2654/* end confdefs.h. */
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00002655#include <stdlib.h>
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002656$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002657int
2658main ()
2659{
2660exit (42);
2661 ;
2662 return 0;
2663}
2664_ACEOF
2665rm -f conftest.$ac_objext
2666if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002667 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002668 ac_status=$?
2669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2670 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002671 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002672 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2673 (eval $ac_try) 2>&5
2674 ac_status=$?
2675 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2676 (exit $ac_status); }; }; then
2677 :
2678else
2679 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002680sed 's/^/| /' conftest.$ac_ext >&5
2681
Martin v. Löwis11437992002-04-12 09:54:03 +00002682continue
2683fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002684rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002685 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002686#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002687/* confdefs.h. */
2688_ACEOF
2689cat confdefs.h >>conftest.$ac_ext
2690cat >>conftest.$ac_ext <<_ACEOF
2691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002692$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002693int
2694main ()
2695{
2696exit (42);
2697 ;
2698 return 0;
2699}
2700_ACEOF
2701rm -f conftest.$ac_objext
2702if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002703 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002704 ac_status=$?
2705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2706 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002707 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2709 (eval $ac_try) 2>&5
2710 ac_status=$?
2711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2712 (exit $ac_status); }; }; then
2713 break
2714else
2715 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002716sed 's/^/| /' conftest.$ac_ext >&5
2717
Martin v. Löwis11437992002-04-12 09:54:03 +00002718fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002719rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002720done
2721rm -f conftest*
2722if test -n "$ac_declaration"; then
2723 echo '#ifdef __cplusplus' >>confdefs.h
2724 echo $ac_declaration >>confdefs.h
2725 echo '#endif' >>confdefs.h
2726fi
2727
2728else
2729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002730sed 's/^/| /' conftest.$ac_ext >&5
2731
Martin v. Löwis11437992002-04-12 09:54:03 +00002732fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002733rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002734ac_ext=c
2735ac_cpp='$CPP $CPPFLAGS'
2736ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2737ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2738ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002739
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002740
2741# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002742
2743ac_ext=c
2744ac_cpp='$CPP $CPPFLAGS'
2745ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2746ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2747ac_compiler_gnu=$ac_cv_c_compiler_gnu
2748echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2749echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002750# On Suns, sometimes $CPP names a directory.
2751if test -n "$CPP" && test -d "$CPP"; then
2752 CPP=
2753fi
2754if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002755 if test "${ac_cv_prog_CPP+set}" = set; then
2756 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002757else
Martin v. Löwis11437992002-04-12 09:54:03 +00002758 # Double quotes because CPP needs to be expanded
2759 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2760 do
2761 ac_preproc_ok=false
2762for ac_c_preproc_warn_flag in '' yes
2763do
2764 # Use a header file that comes with gcc, so configuring glibc
2765 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002766 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2767 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002768 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002769 # not just through cpp. "Syntax error" is here to catch this case.
2770 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002771#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002772/* confdefs.h. */
2773_ACEOF
2774cat confdefs.h >>conftest.$ac_ext
2775cat >>conftest.$ac_ext <<_ACEOF
2776/* end confdefs.h. */
2777#ifdef __STDC__
2778# include <limits.h>
2779#else
2780# include <assert.h>
2781#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002782 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00002783_ACEOF
2784if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2785 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2786 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002787 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002788 rm -f conftest.er1
2789 cat conftest.err >&5
2790 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2791 (exit $ac_status); } >/dev/null; then
2792 if test -s conftest.err; then
2793 ac_cpp_err=$ac_c_preproc_warn_flag
2794 else
2795 ac_cpp_err=
2796 fi
2797else
2798 ac_cpp_err=yes
2799fi
2800if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002801 :
2802else
Martin v. Löwis11437992002-04-12 09:54:03 +00002803 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002804sed 's/^/| /' conftest.$ac_ext >&5
2805
Martin v. Löwis11437992002-04-12 09:54:03 +00002806 # Broken: fails on valid input.
2807continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002808fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002809rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002810
Martin v. Löwis11437992002-04-12 09:54:03 +00002811 # OK, works on sane cases. Now check whether non-existent headers
2812 # can be detected and how.
2813 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002814#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002815/* confdefs.h. */
2816_ACEOF
2817cat confdefs.h >>conftest.$ac_ext
2818cat >>conftest.$ac_ext <<_ACEOF
2819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002820#include <ac_nonexistent.h>
2821_ACEOF
2822if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2823 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2824 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002825 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002826 rm -f conftest.er1
2827 cat conftest.err >&5
2828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2829 (exit $ac_status); } >/dev/null; then
2830 if test -s conftest.err; then
2831 ac_cpp_err=$ac_c_preproc_warn_flag
2832 else
2833 ac_cpp_err=
2834 fi
2835else
2836 ac_cpp_err=yes
2837fi
2838if test -z "$ac_cpp_err"; then
2839 # Broken: success on invalid input.
2840continue
2841else
2842 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002843sed 's/^/| /' conftest.$ac_ext >&5
2844
Martin v. Löwis11437992002-04-12 09:54:03 +00002845 # Passes both tests.
2846ac_preproc_ok=:
2847break
2848fi
2849rm -f conftest.err conftest.$ac_ext
2850
2851done
2852# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2853rm -f conftest.err conftest.$ac_ext
2854if $ac_preproc_ok; then
2855 break
2856fi
2857
2858 done
2859 ac_cv_prog_CPP=$CPP
2860
2861fi
2862 CPP=$ac_cv_prog_CPP
2863else
2864 ac_cv_prog_CPP=$CPP
2865fi
2866echo "$as_me:$LINENO: result: $CPP" >&5
2867echo "${ECHO_T}$CPP" >&6
2868ac_preproc_ok=false
2869for ac_c_preproc_warn_flag in '' yes
2870do
2871 # Use a header file that comes with gcc, so configuring glibc
2872 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002873 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2874 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002875 # On the NeXT, cc -E runs the code through the compiler's parser,
2876 # not just through cpp. "Syntax error" is here to catch this case.
2877 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002878#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002879/* confdefs.h. */
2880_ACEOF
2881cat confdefs.h >>conftest.$ac_ext
2882cat >>conftest.$ac_ext <<_ACEOF
2883/* end confdefs.h. */
2884#ifdef __STDC__
2885# include <limits.h>
2886#else
2887# include <assert.h>
2888#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002889 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00002890_ACEOF
2891if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2892 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2893 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002894 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002895 rm -f conftest.er1
2896 cat conftest.err >&5
2897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2898 (exit $ac_status); } >/dev/null; then
2899 if test -s conftest.err; then
2900 ac_cpp_err=$ac_c_preproc_warn_flag
2901 else
2902 ac_cpp_err=
2903 fi
2904else
2905 ac_cpp_err=yes
2906fi
2907if test -z "$ac_cpp_err"; then
2908 :
2909else
2910 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002911sed 's/^/| /' conftest.$ac_ext >&5
2912
Martin v. Löwis11437992002-04-12 09:54:03 +00002913 # Broken: fails on valid input.
2914continue
2915fi
2916rm -f conftest.err conftest.$ac_ext
2917
2918 # OK, works on sane cases. Now check whether non-existent headers
2919 # can be detected and how.
2920 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002921#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002922/* confdefs.h. */
2923_ACEOF
2924cat confdefs.h >>conftest.$ac_ext
2925cat >>conftest.$ac_ext <<_ACEOF
2926/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002927#include <ac_nonexistent.h>
2928_ACEOF
2929if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2930 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2931 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002932 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002933 rm -f conftest.er1
2934 cat conftest.err >&5
2935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2936 (exit $ac_status); } >/dev/null; then
2937 if test -s conftest.err; then
2938 ac_cpp_err=$ac_c_preproc_warn_flag
2939 else
2940 ac_cpp_err=
2941 fi
2942else
2943 ac_cpp_err=yes
2944fi
2945if test -z "$ac_cpp_err"; then
2946 # Broken: success on invalid input.
2947continue
2948else
2949 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002950sed 's/^/| /' conftest.$ac_ext >&5
2951
Martin v. Löwis11437992002-04-12 09:54:03 +00002952 # Passes both tests.
2953ac_preproc_ok=:
2954break
2955fi
2956rm -f conftest.err conftest.$ac_ext
2957
2958done
2959# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2960rm -f conftest.err conftest.$ac_ext
2961if $ac_preproc_ok; then
2962 :
2963else
Skip Montanaro6dead952003-09-25 14:50:04 +00002964 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2965See \`config.log' for more details." >&5
2966echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2967See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002968 { (exit 1); exit 1; }; }
2969fi
2970
2971ac_ext=c
2972ac_cpp='$CPP $CPPFLAGS'
2973ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2974ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2975ac_compiler_gnu=$ac_cv_c_compiler_gnu
2976
2977
Skip Montanaro6dead952003-09-25 14:50:04 +00002978echo "$as_me:$LINENO: checking for egrep" >&5
2979echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2980if test "${ac_cv_prog_egrep+set}" = set; then
2981 echo $ECHO_N "(cached) $ECHO_C" >&6
2982else
2983 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2984 then ac_cv_prog_egrep='grep -E'
2985 else ac_cv_prog_egrep='egrep'
2986 fi
2987fi
2988echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2989echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2990 EGREP=$ac_cv_prog_egrep
2991
2992
Martin v. Löwis11437992002-04-12 09:54:03 +00002993
2994echo "$as_me:$LINENO: checking for AIX" >&5
2995echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2996cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002997#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002998/* confdefs.h. */
2999_ACEOF
3000cat confdefs.h >>conftest.$ac_ext
3001cat >>conftest.$ac_ext <<_ACEOF
3002/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003003#ifdef _AIX
3004 yes
3005#endif
3006
Martin v. Löwis11437992002-04-12 09:54:03 +00003007_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003008if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003009 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003010 echo "$as_me:$LINENO: result: yes" >&5
3011echo "${ECHO_T}yes" >&6
3012cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003013#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003014_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003015
3016else
Martin v. Löwis11437992002-04-12 09:54:03 +00003017 echo "$as_me:$LINENO: result: no" >&5
3018echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003019fi
3020rm -f conftest*
3021
Michael W. Hudson54241132001-12-07 15:38:26 +00003022
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003023
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003024# Check for unsupported systems
3025case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003026Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003027 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3028 echo See README for details.
3029 exit 1;;
3030esac
3031
Michael W. Hudson54241132001-12-07 15:38:26 +00003032
Martin v. Löwis11437992002-04-12 09:54:03 +00003033echo "$as_me:$LINENO: checking for --with-suffix" >&5
3034echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003035
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003036# Check whether --with-suffix or --without-suffix was given.
3037if test "${with_suffix+set}" = set; then
3038 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003039
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003040 case $withval in
3041 no) EXEEXT=;;
3042 yes) EXEEXT=.exe;;
3043 *) EXEEXT=$withval;;
3044 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003045fi;
3046echo "$as_me:$LINENO: result: $EXEEXT" >&5
3047echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003048
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003049# Test whether we're running on a non-case-sensitive system, in which
3050# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003051
Martin v. Löwis11437992002-04-12 09:54:03 +00003052echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3053echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003054if test ! -d CaseSensitiveTestDir; then
3055mkdir CaseSensitiveTestDir
3056fi
3057
3058if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003059then
Martin v. Löwis11437992002-04-12 09:54:03 +00003060 echo "$as_me:$LINENO: result: yes" >&5
3061echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003062 BUILDEXEEXT=.exe
3063else
Martin v. Löwis11437992002-04-12 09:54:03 +00003064 echo "$as_me:$LINENO: result: no" >&5
3065echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003066 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003067fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003068rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003069
Guido van Rossumdd997f71998-10-07 19:58:26 +00003070case $MACHDEP in
3071bsdos*)
3072 case $CC in
3073 gcc) CC="$CC -D_HAVE_BSDI";;
3074 esac;;
3075esac
3076
Guido van Rossum24b1e751997-08-21 02:29:16 +00003077case $ac_sys_system in
3078hp*|HP*)
3079 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003080 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003081 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003082Monterey*)
3083 case $CC in
3084 cc) CC="$CC -Wl,-Bexport";;
3085 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003086SunOS*)
3087 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003088
3089cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003090#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003091_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003092
3093 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003094esac
3095
Michael W. Hudson54241132001-12-07 15:38:26 +00003096
3097
Martin v. Löwis11437992002-04-12 09:54:03 +00003098echo "$as_me:$LINENO: checking LIBRARY" >&5
3099echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003100if test -z "$LIBRARY"
3101then
3102 LIBRARY='libpython$(VERSION).a'
3103fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003104echo "$as_me:$LINENO: result: $LIBRARY" >&5
3105echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003106
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003107# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003108# name of the library into which to insert object files). BLDLIBRARY is also
3109# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3110# is blank as the main program is not linked directly against LDLIBRARY.
3111# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3112# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3113# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3114# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003115#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003116# RUNSHARED is used to run shared python without installed libraries
3117#
3118# INSTSONAME is the name of the shared library that will be use to install
3119# on the system - some systems like version suffix, others don't
3120
3121
Michael W. Hudson54241132001-12-07 15:38:26 +00003122
3123
3124
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003125
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003126LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003127BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003128INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003129DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003130LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003131RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003132
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003133# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003134# If CXX is set, and if it is needed to link a main function that was
3135# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3136# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003137# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003138# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003139
Martin v. Löwis11437992002-04-12 09:54:03 +00003140echo "$as_me:$LINENO: checking LINKCC" >&5
3141echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003142if test -z "$LINKCC"
3143then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003144 if test -z "$CXX"; then
3145 LINKCC="\$(PURIFY) \$(CC)"
3146 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003147 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003148 $CXX -c conftest.$ac_ext 2>&5
3149 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3150 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3151 then
3152 LINKCC="\$(PURIFY) \$(CC)"
3153 else
3154 LINKCC="\$(PURIFY) \$(CXX)"
3155 fi
3156 rm -fr conftest*
3157 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003158 case $ac_sys_system in
3159 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003160 exp_extra="\"\""
3161 if test $ac_sys_release -ge 5 -o \
3162 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3163 exp_extra="."
3164 fi
3165 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003166 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003167 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003168 esac
3169fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003170echo "$as_me:$LINENO: result: $LINKCC" >&5
3171echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003172
Martin v. Löwis11437992002-04-12 09:54:03 +00003173echo "$as_me:$LINENO: checking for --enable-shared" >&5
3174echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003175# Check whether --enable-shared or --disable-shared was given.
3176if test "${enable_shared+set}" = set; then
3177 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003178
Martin v. Löwis11437992002-04-12 09:54:03 +00003179fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003180
3181if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003182then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003183 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003184 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003185 enable_shared="yes";;
3186 *)
3187 enable_shared="no";;
3188 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003189fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003190echo "$as_me:$LINENO: result: $enable_shared" >&5
3191echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003192
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003193echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3194echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6
3195# Check whether --enable-profiling or --disable-profiling was given.
3196if test "${enable_profiling+set}" = set; then
3197 enableval="$enable_profiling"
3198 ac_save_cc="$CC"
3199 CC="$CC -pg"
3200 if test "$cross_compiling" = yes; then
3201 ac_enable_profiling="no"
3202else
3203 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003204#line $LINENO "configure"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003205/* confdefs.h. */
3206_ACEOF
3207cat confdefs.h >>conftest.$ac_ext
3208cat >>conftest.$ac_ext <<_ACEOF
3209/* end confdefs.h. */
3210int main() { return 0; }
3211_ACEOF
3212rm -f conftest$ac_exeext
3213if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3214 (eval $ac_link) 2>&5
3215 ac_status=$?
3216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3217 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3218 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3219 (eval $ac_try) 2>&5
3220 ac_status=$?
3221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3222 (exit $ac_status); }; }; then
3223 ac_enable_profiling="yes"
3224else
3225 echo "$as_me: program exited with status $ac_status" >&5
3226echo "$as_me: failed program was:" >&5
3227sed 's/^/| /' conftest.$ac_ext >&5
3228
3229( exit $ac_status )
3230ac_enable_profiling="no"
3231fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003232rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003233fi
3234 CC="$ac_save_cc"
3235fi;
3236echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3237echo "${ECHO_T}$ac_enable_profiling" >&6
3238
3239case "$ac_enable_profiling" in
3240 "yes")
3241 BASECFLAGS="-pg $BASECFLAGS"
3242 LDFLAGS="-pg $LDFLAGS"
3243 ;;
3244esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003245
Martin v. Löwis11437992002-04-12 09:54:03 +00003246echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3247echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003248
Guido van Rossumb8552162001-09-05 14:58:11 +00003249# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3250# library that we build, but we do not want to link against it (we
3251# will find it with a -framework option). For this reason there is an
3252# extra variable BLDLIBRARY against which Python and the extension
3253# modules are linked, BLDLIBRARY. This is normally the same as
3254# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003255if test "$enable_framework"
3256then
3257 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003258 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003259 BLDLIBRARY=''
3260else
3261 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003262fi
Jack Jansene578a632001-08-15 01:27:14 +00003263
Martin v. Löwis1142de32002-03-29 16:28:31 +00003264# Other platforms follow
3265if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003266
3267cat >>confdefs.h <<\_ACEOF
3268#define Py_ENABLE_SHARED 1
3269_ACEOF
3270
Martin v. Löwis1142de32002-03-29 16:28:31 +00003271 case $ac_sys_system in
3272 BeOS*)
3273 LDLIBRARY='libpython$(VERSION).so'
3274 ;;
3275 CYGWIN*)
3276 LDLIBRARY='libpython$(VERSION).dll.a'
3277 DLLLIBRARY='libpython$(VERSION).dll'
3278 ;;
3279 SunOS*)
3280 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003281 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003282 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003283 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003284 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003285 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003286 LDLIBRARY='libpython$(VERSION).so'
3287 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003288 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003289 INSTSONAME="$LDLIBRARY".$SOVERSION
3290 ;;
3291 hp*|HP*)
3292 LDLIBRARY='libpython$(VERSION).sl'
3293 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003294 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003295 ;;
3296 OSF*)
3297 LDLIBRARY='libpython$(VERSION).so'
3298 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003299 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003300 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003301 atheos*)
3302 LDLIBRARY='libpython$(VERSION).so'
3303 BLDLIBRARY='-L. -lpython$(VERSION)'
3304 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3305 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003306 esac
Jason Tishler30765592003-09-04 11:04:06 +00003307else # shared is disabled
3308 case $ac_sys_system in
3309 CYGWIN*)
3310 BLDLIBRARY='$(LIBRARY)'
3311 LDLIBRARY='libpython$(VERSION).dll.a'
3312 ;;
3313 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003314fi
3315
Martin v. Löwis11437992002-04-12 09:54:03 +00003316echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3317echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003318
Martin v. Löwis11437992002-04-12 09:54:03 +00003319if test -n "$ac_tool_prefix"; then
3320 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3321set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3322echo "$as_me:$LINENO: checking for $ac_word" >&5
3323echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3324if test "${ac_cv_prog_RANLIB+set}" = set; then
3325 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003326else
3327 if test -n "$RANLIB"; then
3328 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3329else
Martin v. Löwis11437992002-04-12 09:54:03 +00003330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3331for as_dir in $PATH
3332do
3333 IFS=$as_save_IFS
3334 test -z "$as_dir" && as_dir=.
3335 for ac_exec_ext in '' $ac_executable_extensions; do
3336 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3337 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3338 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3339 break 2
3340 fi
3341done
3342done
3343
Guido van Rossum627b2d71993-12-24 10:39:16 +00003344fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003345fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003346RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003347if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003348 echo "$as_me:$LINENO: result: $RANLIB" >&5
3349echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003350else
Martin v. Löwis11437992002-04-12 09:54:03 +00003351 echo "$as_me:$LINENO: result: no" >&5
3352echo "${ECHO_T}no" >&6
3353fi
3354
3355fi
3356if test -z "$ac_cv_prog_RANLIB"; then
3357 ac_ct_RANLIB=$RANLIB
3358 # Extract the first word of "ranlib", so it can be a program name with args.
3359set dummy ranlib; ac_word=$2
3360echo "$as_me:$LINENO: checking for $ac_word" >&5
3361echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3362if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3363 echo $ECHO_N "(cached) $ECHO_C" >&6
3364else
3365 if test -n "$ac_ct_RANLIB"; then
3366 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3367else
3368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3369for as_dir in $PATH
3370do
3371 IFS=$as_save_IFS
3372 test -z "$as_dir" && as_dir=.
3373 for ac_exec_ext in '' $ac_executable_extensions; do
3374 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3375 ac_cv_prog_ac_ct_RANLIB="ranlib"
3376 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3377 break 2
3378 fi
3379done
3380done
3381
3382 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3383fi
3384fi
3385ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3386if test -n "$ac_ct_RANLIB"; then
3387 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3388echo "${ECHO_T}$ac_ct_RANLIB" >&6
3389else
3390 echo "$as_me:$LINENO: result: no" >&5
3391echo "${ECHO_T}no" >&6
3392fi
3393
3394 RANLIB=$ac_ct_RANLIB
3395else
3396 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003397fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003398
3399
Guido van Rossum7f43da71994-08-01 12:15:30 +00003400for ac_prog in ar aal
3401do
Martin v. Löwis11437992002-04-12 09:54:03 +00003402 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003403set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003404echo "$as_me:$LINENO: checking for $ac_word" >&5
3405echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3406if test "${ac_cv_prog_AR+set}" = set; then
3407 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003408else
3409 if test -n "$AR"; then
3410 ac_cv_prog_AR="$AR" # Let the user override the test.
3411else
Martin v. Löwis11437992002-04-12 09:54:03 +00003412as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3413for as_dir in $PATH
3414do
3415 IFS=$as_save_IFS
3416 test -z "$as_dir" && as_dir=.
3417 for ac_exec_ext in '' $ac_executable_extensions; do
3418 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3419 ac_cv_prog_AR="$ac_prog"
3420 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3421 break 2
3422 fi
3423done
3424done
3425
Guido van Rossum7f43da71994-08-01 12:15:30 +00003426fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003427fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003428AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003429if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003430 echo "$as_me:$LINENO: result: $AR" >&5
3431echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003432else
Martin v. Löwis11437992002-04-12 09:54:03 +00003433 echo "$as_me:$LINENO: result: no" >&5
3434echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003435fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003436
Martin v. Löwis11437992002-04-12 09:54:03 +00003437 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003438done
3439test -n "$AR" || AR="ar"
3440
Michael W. Hudson54241132001-12-07 15:38:26 +00003441
Neil Schemenauera42c8272001-03-31 00:01:55 +00003442case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003443bsdos*|hp*|HP*)
3444 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003445 if test -z "$INSTALL"
3446 then
3447 INSTALL="${srcdir}/install-sh -c"
3448 fi
3449esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003450ac_aux_dir=
3451for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3452 if test -f $ac_dir/install-sh; then
3453 ac_aux_dir=$ac_dir
3454 ac_install_sh="$ac_aux_dir/install-sh -c"
3455 break
3456 elif test -f $ac_dir/install.sh; then
3457 ac_aux_dir=$ac_dir
3458 ac_install_sh="$ac_aux_dir/install.sh -c"
3459 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003460 elif test -f $ac_dir/shtool; then
3461 ac_aux_dir=$ac_dir
3462 ac_install_sh="$ac_aux_dir/shtool install -c"
3463 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003464 fi
3465done
3466if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003467 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3468echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3469 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003470fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003471ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3472ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3473ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003474
3475# Find a good install program. We prefer a C program (faster),
3476# so one script is as good as another. But avoid the broken or
3477# incompatible versions:
3478# SysV /etc/install, /usr/sbin/install
3479# SunOS /usr/etc/install
3480# IRIX /sbin/install
3481# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003482# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003483# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3484# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3485# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3486# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003487echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3488echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003489if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003490if test "${ac_cv_path_install+set}" = set; then
3491 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003492else
Martin v. Löwis11437992002-04-12 09:54:03 +00003493 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3494for as_dir in $PATH
3495do
3496 IFS=$as_save_IFS
3497 test -z "$as_dir" && as_dir=.
3498 # Account for people who put trailing slashes in PATH elements.
3499case $as_dir/ in
3500 ./ | .// | /cC/* | \
3501 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3502 /usr/ucb/* ) ;;
3503 *)
3504 # OSF1 and SCO ODT 3.0 have their own names for install.
3505 # Don't use installbsd from OSF since it installs stuff as root
3506 # by default.
3507 for ac_prog in ginstall scoinst install; do
3508 for ac_exec_ext in '' $ac_executable_extensions; do
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003509 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3510 if test $ac_prog = install &&
3511 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3512 # AIX install. It has an incompatible calling convention.
3513 :
3514 elif test $ac_prog = install &&
3515 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3516 # program-specific install script used by HP pwplus--don't use.
3517 :
3518 else
3519 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3520 break 3
3521 fi
3522 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003523 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003524 done
3525 ;;
3526esac
3527done
3528
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003529
3530fi
3531 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003532 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003533 else
3534 # As a last resort, use the slow shell script. We don't cache a
3535 # path for INSTALL within a source directory, because that will
3536 # break other packages using the cache if that directory is
3537 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003539 fi
3540fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003541echo "$as_me:$LINENO: result: $INSTALL" >&5
3542echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003543
3544# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3545# It thinks the first close brace ends the variable substitution.
3546test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3547
Martin v. Löwis11437992002-04-12 09:54:03 +00003548test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003549
3550test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3551
Michael W. Hudson54241132001-12-07 15:38:26 +00003552
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003553# Not every filesystem supports hard links
3554
3555if test -z "$LN" ; then
3556 case $ac_sys_system in
3557 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003558 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003559 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003560 *) LN=ln;;
3561 esac
3562fi
3563
Fred Drake109d9862001-07-11 06:27:56 +00003564# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003565echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3566echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3567
Fred Drake109d9862001-07-11 06:27:56 +00003568# Check whether --with-pydebug or --without-pydebug was given.
3569if test "${with_pydebug+set}" = set; then
3570 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003571
Fred Drake109d9862001-07-11 06:27:56 +00003572if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003573then
3574
3575cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003576#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003577_ACEOF
3578
3579 echo "$as_me:$LINENO: result: yes" >&5
3580echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003581 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003582else echo "$as_me:$LINENO: result: no" >&5
3583echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003584fi
3585else
Martin v. Löwis11437992002-04-12 09:54:03 +00003586 echo "$as_me:$LINENO: result: no" >&5
3587echo "${ECHO_T}no" >&6
3588fi;
Fred Drake109d9862001-07-11 06:27:56 +00003589
Skip Montanarodecc6a42003-01-01 20:07:49 +00003590# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3591# merged with this chunk of code?
3592
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003593# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003594# ------------------------
3595# (The following bit of code is complicated enough - please keep things
3596# indented properly. Just pretend you're editing Python code. ;-)
3597
3598# There are two parallel sets of case statements below, one that checks to
3599# see if OPT was set and one that does BASECFLAGS setting based upon
3600# compiler and platform. BASECFLAGS tweaks need to be made even if the
3601# user set OPT.
3602
3603# tweak OPT based on compiler and platform, only if the user didn't set
3604# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003605
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003606if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003607then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003608 case $GCC in
3609 yes)
3610 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003611 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003612 if test "$Py_DEBUG" = 'true' ; then
3613 # Optimization messes up debuggers, so turn it off for
3614 # debug builds.
3615 OPT="-g -Wall -Wstrict-prototypes"
3616 else
3617 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003618 fi
3619 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003620 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003621 OPT="-O3 -Wall -Wstrict-prototypes"
3622 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003623 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003624 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003625 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3626 ;;
3627 esac
Fred Drake109d9862001-07-11 06:27:56 +00003628 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003629
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003630 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003631 OPT="-O"
3632 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003633 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003634
3635 # The current (beta) Monterey compiler dies with optimizations
3636 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003637 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003638 Monterey*)
3639 OPT=""
3640 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003641 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003642
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003643fi
3644
Skip Montanarodecc6a42003-01-01 20:07:49 +00003645
3646# tweak BASECFLAGS based on compiler and platform
3647case $GCC in
3648yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003649 # Python violates C99 rules, by casting between incompatible
3650 # pointer types. GCC may generate bad code as a result of that,
3651 # so use -fno-strict-aliasing if supported.
3652 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3653echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3654 ac_save_cc="$CC"
3655 CC="$CC -fno-strict-aliasing"
3656 if test "$cross_compiling" = yes; then
3657 ac_cv_no_strict_aliasing_ok=no
3658else
3659 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003660#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003661/* confdefs.h. */
3662_ACEOF
3663cat confdefs.h >>conftest.$ac_ext
3664cat >>conftest.$ac_ext <<_ACEOF
3665/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003666int main() { return 0; }
3667_ACEOF
3668rm -f conftest$ac_exeext
3669if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3670 (eval $ac_link) 2>&5
3671 ac_status=$?
3672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3673 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3675 (eval $ac_try) 2>&5
3676 ac_status=$?
3677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3678 (exit $ac_status); }; }; then
3679 ac_cv_no_strict_aliasing_ok=yes
3680else
3681 echo "$as_me: program exited with status $ac_status" >&5
3682echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003683sed 's/^/| /' conftest.$ac_ext >&5
3684
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003685( exit $ac_status )
3686ac_cv_no_strict_aliasing_ok=no
3687fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003688rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003689fi
3690 CC="$ac_save_cc"
3691 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3692echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3693 if test $ac_cv_no_strict_aliasing_ok = yes
3694 then
3695 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3696 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003697 case $ac_sys_system in
3698 SCO_SV*)
3699 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3700 ;;
3701 # is there any other compiler on Darwin besides gcc?
3702 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003703 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003704 ;;
3705 esac
3706 ;;
3707
3708*)
3709 case $ac_sys_system in
3710 OpenUNIX*|UnixWare*)
3711 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3712 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003713 OSF*)
3714 BASECFLAGS="$BASECFLAGS -ieee -std"
3715 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003716 SCO_SV*)
3717 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3718 ;;
3719 esac
3720 ;;
3721esac
3722
Fred Drakee1ceaa02001-12-04 20:55:47 +00003723if test "$Py_DEBUG" = 'true'; then
3724 :
3725else
3726 OPT="-DNDEBUG $OPT"
3727fi
3728
Guido van Rossum563e7081996-09-10 18:20:48 +00003729if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003730then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003731 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003732fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003733
Martin v. Löwis11437992002-04-12 09:54:03 +00003734echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3735echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3736if test "${ac_cv_opt_olimit_ok+set}" = set; then
3737 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003738else
3739 ac_save_cc="$CC"
3740CC="$CC -OPT:Olimit=0"
3741if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003742 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003743else
Martin v. Löwis11437992002-04-12 09:54:03 +00003744 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003745#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003746/* confdefs.h. */
3747_ACEOF
3748cat confdefs.h >>conftest.$ac_ext
3749cat >>conftest.$ac_ext <<_ACEOF
3750/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003751int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003752_ACEOF
3753rm -f conftest$ac_exeext
3754if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3755 (eval $ac_link) 2>&5
3756 ac_status=$?
3757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3758 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3759 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3760 (eval $ac_try) 2>&5
3761 ac_status=$?
3762 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3763 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003764 ac_cv_opt_olimit_ok=yes
3765else
Martin v. Löwis11437992002-04-12 09:54:03 +00003766 echo "$as_me: program exited with status $ac_status" >&5
3767echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003768sed 's/^/| /' conftest.$ac_ext >&5
3769
Martin v. Löwis11437992002-04-12 09:54:03 +00003770( exit $ac_status )
3771ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003772fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003773rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00003774fi
Guido van Rossum91922671997-10-09 20:24:13 +00003775CC="$ac_save_cc"
3776fi
3777
Martin v. Löwis11437992002-04-12 09:54:03 +00003778echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3779echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003780if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003781 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003782 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3783 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3784 # environment?
3785 Darwin*)
3786 ;;
3787 *)
3788 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3789 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003790 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003791else
Martin v. Löwis11437992002-04-12 09:54:03 +00003792 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3793echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3794 if test "${ac_cv_olimit_ok+set}" = set; then
3795 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003796else
3797 ac_save_cc="$CC"
3798 CC="$CC -Olimit 1500"
3799 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003800 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003801else
Martin v. Löwis11437992002-04-12 09:54:03 +00003802 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003803#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003804/* confdefs.h. */
3805_ACEOF
3806cat confdefs.h >>conftest.$ac_ext
3807cat >>conftest.$ac_ext <<_ACEOF
3808/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003809int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003810_ACEOF
3811rm -f conftest$ac_exeext
3812if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3813 (eval $ac_link) 2>&5
3814 ac_status=$?
3815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3816 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3817 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3818 (eval $ac_try) 2>&5
3819 ac_status=$?
3820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3821 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003822 ac_cv_olimit_ok=yes
3823else
Martin v. Löwis11437992002-04-12 09:54:03 +00003824 echo "$as_me: program exited with status $ac_status" >&5
3825echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003826sed 's/^/| /' conftest.$ac_ext >&5
3827
Martin v. Löwis11437992002-04-12 09:54:03 +00003828( exit $ac_status )
3829ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003830fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003831rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003832fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003833 CC="$ac_save_cc"
3834fi
3835
Martin v. Löwis11437992002-04-12 09:54:03 +00003836 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3837echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003838 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003839 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003840 fi
3841fi
3842
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003843# On some compilers, pthreads are available without further options
3844# (e.g. MacOS X). On some of these systems, the compiler will not
3845# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3846# So we have to see first whether pthreads are available without
3847# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003848echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3849echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3850if test "${ac_cv_pthread_is_default+set}" = set; then
3851 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003852else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003853 if test "$cross_compiling" = yes; then
3854 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003855else
Martin v. Löwis11437992002-04-12 09:54:03 +00003856 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003857#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003858/* confdefs.h. */
3859_ACEOF
3860cat confdefs.h >>conftest.$ac_ext
3861cat >>conftest.$ac_ext <<_ACEOF
3862/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003863
Martin v. Löwis130fb172001-07-19 11:00:41 +00003864#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003865
3866void* routine(void* p){return NULL;}
3867
3868int main(){
3869 pthread_t p;
3870 if(pthread_create(&p,NULL,routine,NULL)!=0)
3871 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003872 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003873 return 0;
3874}
3875
Martin v. Löwis11437992002-04-12 09:54:03 +00003876_ACEOF
3877rm -f conftest$ac_exeext
3878if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3879 (eval $ac_link) 2>&5
3880 ac_status=$?
3881 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3882 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3883 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3884 (eval $ac_try) 2>&5
3885 ac_status=$?
3886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3887 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00003888
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003889 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00003890 ac_cv_kthread=no
3891 ac_cv_pthread=no
3892
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003893else
Martin v. Löwis11437992002-04-12 09:54:03 +00003894 echo "$as_me: program exited with status $ac_status" >&5
3895echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003896sed 's/^/| /' conftest.$ac_ext >&5
3897
Martin v. Löwis11437992002-04-12 09:54:03 +00003898( exit $ac_status )
3899ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003900fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003901rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003902fi
3903
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003904fi
3905
Martin v. Löwis11437992002-04-12 09:54:03 +00003906echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3907echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003908
Michael W. Hudson54241132001-12-07 15:38:26 +00003909
Martin v. Löwis11437992002-04-12 09:54:03 +00003910if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003911then
3912 ac_cv_kpthread=no
3913else
3914# -Kpthread, if available, provides the right #defines
3915# and linker options to make pthread_create available
3916# Some compilers won't report that they do not support -Kpthread,
3917# so we need to run a program to see whether it really made the
3918# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003919echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3920echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3921if test "${ac_cv_kpthread+set}" = set; then
3922 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003923else
3924 ac_save_cc="$CC"
3925CC="$CC -Kpthread"
3926if test "$cross_compiling" = yes; then
3927 ac_cv_kpthread=no
3928else
Martin v. Löwis11437992002-04-12 09:54:03 +00003929 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003930#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003931/* confdefs.h. */
3932_ACEOF
3933cat confdefs.h >>conftest.$ac_ext
3934cat >>conftest.$ac_ext <<_ACEOF
3935/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003936
3937#include <pthread.h>
3938
3939void* routine(void* p){return NULL;}
3940
3941int main(){
3942 pthread_t p;
3943 if(pthread_create(&p,NULL,routine,NULL)!=0)
3944 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003945 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003946 return 0;
3947}
3948
Martin v. Löwis11437992002-04-12 09:54:03 +00003949_ACEOF
3950rm -f conftest$ac_exeext
3951if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3952 (eval $ac_link) 2>&5
3953 ac_status=$?
3954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3955 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3957 (eval $ac_try) 2>&5
3958 ac_status=$?
3959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3960 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003961 ac_cv_kpthread=yes
3962else
Martin v. Löwis11437992002-04-12 09:54:03 +00003963 echo "$as_me: program exited with status $ac_status" >&5
3964echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003965sed 's/^/| /' conftest.$ac_ext >&5
3966
Martin v. Löwis11437992002-04-12 09:54:03 +00003967( exit $ac_status )
3968ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003969fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003970rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003971fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003972CC="$ac_save_cc"
3973fi
3974
Martin v. Löwis11437992002-04-12 09:54:03 +00003975echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3976echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003977fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003978
Skip Montanarod8d39a02003-07-10 20:44:10 +00003979if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003980then
3981# -Kthread, if available, provides the right #defines
3982# and linker options to make pthread_create available
3983# Some compilers won't report that they do not support -Kthread,
3984# so we need to run a program to see whether it really made the
3985# function available.
3986echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3987echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3988if test "${ac_cv_kthread+set}" = set; then
3989 echo $ECHO_N "(cached) $ECHO_C" >&6
3990else
3991 ac_save_cc="$CC"
3992CC="$CC -Kthread"
3993if test "$cross_compiling" = yes; then
3994 ac_cv_kthread=no
3995else
3996 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003997#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003998/* confdefs.h. */
3999_ACEOF
4000cat confdefs.h >>conftest.$ac_ext
4001cat >>conftest.$ac_ext <<_ACEOF
4002/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004003
4004#include <pthread.h>
4005
4006void* routine(void* p){return NULL;}
4007
4008int main(){
4009 pthread_t p;
4010 if(pthread_create(&p,NULL,routine,NULL)!=0)
4011 return 1;
4012 (void)pthread_detach(p);
4013 return 0;
4014}
4015
4016_ACEOF
4017rm -f conftest$ac_exeext
4018if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4019 (eval $ac_link) 2>&5
4020 ac_status=$?
4021 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4022 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4024 (eval $ac_try) 2>&5
4025 ac_status=$?
4026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4027 (exit $ac_status); }; }; then
4028 ac_cv_kthread=yes
4029else
4030 echo "$as_me: program exited with status $ac_status" >&5
4031echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004032sed 's/^/| /' conftest.$ac_ext >&5
4033
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004034( exit $ac_status )
4035ac_cv_kthread=no
4036fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004037rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004038fi
4039CC="$ac_save_cc"
4040fi
4041
4042echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4043echo "${ECHO_T}$ac_cv_kthread" >&6
4044fi
4045
Skip Montanarod8d39a02003-07-10 20:44:10 +00004046if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004047then
4048# -pthread, if available, provides the right #defines
4049# and linker options to make pthread_create available
4050# Some compilers won't report that they do not support -pthread,
4051# so we need to run a program to see whether it really made the
4052# function available.
4053echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4054echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4055if test "${ac_cv_thread+set}" = set; then
4056 echo $ECHO_N "(cached) $ECHO_C" >&6
4057else
4058 ac_save_cc="$CC"
4059CC="$CC -pthread"
4060if test "$cross_compiling" = yes; then
4061 ac_cv_pthread=no
4062else
4063 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004064#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004065/* confdefs.h. */
4066_ACEOF
4067cat confdefs.h >>conftest.$ac_ext
4068cat >>conftest.$ac_ext <<_ACEOF
4069/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004070
4071#include <pthread.h>
4072
4073void* routine(void* p){return NULL;}
4074
4075int main(){
4076 pthread_t p;
4077 if(pthread_create(&p,NULL,routine,NULL)!=0)
4078 return 1;
4079 (void)pthread_detach(p);
4080 return 0;
4081}
4082
4083_ACEOF
4084rm -f conftest$ac_exeext
4085if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4086 (eval $ac_link) 2>&5
4087 ac_status=$?
4088 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4089 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4091 (eval $ac_try) 2>&5
4092 ac_status=$?
4093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4094 (exit $ac_status); }; }; then
4095 ac_cv_pthread=yes
4096else
4097 echo "$as_me: program exited with status $ac_status" >&5
4098echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004099sed 's/^/| /' conftest.$ac_ext >&5
4100
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004101( exit $ac_status )
4102ac_cv_pthread=no
4103fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004104rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004105fi
4106CC="$ac_save_cc"
4107fi
4108
4109echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4110echo "${ECHO_T}$ac_cv_pthread" >&6
4111fi
4112
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004113# If we have set a CC compiler flag for thread support then
4114# check if it works for CXX, too.
4115ac_cv_cxx_thread=no
4116if test ! -z "$CXX"
4117then
4118echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4119echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4120ac_save_cxx="$CXX"
4121
4122if test "$ac_cv_kpthread" = "yes"
4123then
4124 CXX="$CXX -Kpthread"
4125 ac_cv_cxx_thread=yes
4126elif test "$ac_cv_kthread" = "yes"
4127then
4128 CXX="$CXX -Kthread"
4129 ac_cv_cxx_thread=yes
4130elif test "$ac_cv_pthread" = "yes"
4131then
4132 CXX="$CXX -pthread"
4133 ac_cv_cxx_thread=yes
4134fi
4135
4136if test $ac_cv_cxx_thread = yes
4137then
4138 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4139 $CXX -c conftest.$ac_ext 2>&5
4140 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4141 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4142 then
4143 ac_cv_cxx_thread=yes
4144 else
4145 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004146 fi
4147 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004148fi
4149fi
Martin v. Löwis519adae2003-09-20 10:47:47 +00004150CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004151echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4152echo "${ECHO_T}$ac_cv_cxx_thread" >&6
4153
Michael W. Hudson54241132001-12-07 15:38:26 +00004154
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004155# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004156echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4157echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4158if test "${ac_cv_header_stdc+set}" = set; then
4159 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004160else
Martin v. Löwis11437992002-04-12 09:54:03 +00004161 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004162#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004163/* confdefs.h. */
4164_ACEOF
4165cat confdefs.h >>conftest.$ac_ext
4166cat >>conftest.$ac_ext <<_ACEOF
4167/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004168#include <stdlib.h>
4169#include <stdarg.h>
4170#include <string.h>
4171#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004172
Skip Montanaro6dead952003-09-25 14:50:04 +00004173int
4174main ()
4175{
4176
4177 ;
4178 return 0;
4179}
Martin v. Löwis11437992002-04-12 09:54:03 +00004180_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004181rm -f conftest.$ac_objext
4182if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004183 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004184 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00004185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004186 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004187 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00004188 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4189 (eval $ac_try) 2>&5
4190 ac_status=$?
4191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4192 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004193 ac_cv_header_stdc=yes
4194else
Martin v. Löwis11437992002-04-12 09:54:03 +00004195 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004196sed 's/^/| /' conftest.$ac_ext >&5
4197
4198ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004199fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004200rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004201
4202if test $ac_cv_header_stdc = yes; then
4203 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004204 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004205#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004206/* confdefs.h. */
4207_ACEOF
4208cat confdefs.h >>conftest.$ac_ext
4209cat >>conftest.$ac_ext <<_ACEOF
4210/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004211#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004212
4213_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004214if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004215 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004216 :
4217else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004218 ac_cv_header_stdc=no
4219fi
4220rm -f conftest*
4221
4222fi
4223
4224if test $ac_cv_header_stdc = yes; then
4225 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004226 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004227#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004228/* confdefs.h. */
4229_ACEOF
4230cat confdefs.h >>conftest.$ac_ext
4231cat >>conftest.$ac_ext <<_ACEOF
4232/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004233#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004234
4235_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004236if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004237 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004238 :
4239else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004240 ac_cv_header_stdc=no
4241fi
4242rm -f conftest*
4243
4244fi
4245
4246if test $ac_cv_header_stdc = yes; then
4247 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004248 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004249 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004250else
Martin v. Löwis11437992002-04-12 09:54:03 +00004251 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004252#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004253/* confdefs.h. */
4254_ACEOF
4255cat confdefs.h >>conftest.$ac_ext
4256cat >>conftest.$ac_ext <<_ACEOF
4257/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004258#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004259#if ((' ' & 0x0FF) == 0x020)
4260# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4261# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4262#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004263# define ISLOWER(c) \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004264 (('a' <= (c) && (c) <= 'i') \
4265 || ('j' <= (c) && (c) <= 'r') \
4266 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00004267# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4268#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004269
Martin v. Löwis11437992002-04-12 09:54:03 +00004270#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4271int
4272main ()
4273{
4274 int i;
4275 for (i = 0; i < 256; i++)
4276 if (XOR (islower (i), ISLOWER (i))
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004277 || toupper (i) != TOUPPER (i))
Martin v. Löwis11437992002-04-12 09:54:03 +00004278 exit(2);
4279 exit (0);
4280}
4281_ACEOF
4282rm -f conftest$ac_exeext
4283if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4284 (eval $ac_link) 2>&5
4285 ac_status=$?
4286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4287 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4288 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4289 (eval $ac_try) 2>&5
4290 ac_status=$?
4291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4292 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004293 :
4294else
Martin v. Löwis11437992002-04-12 09:54:03 +00004295 echo "$as_me: program exited with status $ac_status" >&5
4296echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004297sed 's/^/| /' conftest.$ac_ext >&5
4298
Martin v. Löwis11437992002-04-12 09:54:03 +00004299( exit $ac_status )
4300ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004301fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004302rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004303fi
4304fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004305fi
4306echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4307echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004308if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004309
4310cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004311#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004312_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004313
4314fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004315
Skip Montanarob9820a32004-01-17 00:16:12 +00004316# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004327 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00004328do
4329as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4330echo "$as_me:$LINENO: checking for $ac_header" >&5
4331echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4332if eval "test \"\${$as_ac_Header+set}\" = set"; then
4333 echo $ECHO_N "(cached) $ECHO_C" >&6
4334else
4335 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004336#line $LINENO "configure"
Skip Montanarob9820a32004-01-17 00:16:12 +00004337/* confdefs.h. */
4338_ACEOF
4339cat confdefs.h >>conftest.$ac_ext
4340cat >>conftest.$ac_ext <<_ACEOF
4341/* end confdefs.h. */
4342$ac_includes_default
4343
4344#include <$ac_header>
4345_ACEOF
4346rm -f conftest.$ac_objext
4347if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004348 (eval $ac_compile) 2>&5
Skip Montanarob9820a32004-01-17 00:16:12 +00004349 ac_status=$?
4350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4351 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004352 { ac_try='test -s conftest.$ac_objext'
Skip Montanarob9820a32004-01-17 00:16:12 +00004353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4354 (eval $ac_try) 2>&5
4355 ac_status=$?
4356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4357 (exit $ac_status); }; }; then
4358 eval "$as_ac_Header=yes"
4359else
4360 echo "$as_me: failed program was:" >&5
4361sed 's/^/| /' conftest.$ac_ext >&5
4362
4363eval "$as_ac_Header=no"
4364fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004365rm -f conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00004366fi
4367echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4368echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4369if test `eval echo '${'$as_ac_Header'}'` = yes; then
4370 cat >>confdefs.h <<_ACEOF
4371#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4372_ACEOF
4373
4374fi
4375
4376done
4377
4378
Martin v. Löwis11437992002-04-12 09:54:03 +00004379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
Skip Montanaro7befb992004-02-10 16:50:21 +00004415for ac_header in dlfcn.h fcntl.h grp.h langinfo.h \
4416libintl.h ncurses.h poll.h pthread.h \
4417stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004418unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004419sys/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 +00004420sys/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 +00004421sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004422sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4423bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004424do
Martin v. Löwis11437992002-04-12 09:54:03 +00004425as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4426if eval "test \"\${$as_ac_Header+set}\" = set"; then
4427 echo "$as_me:$LINENO: checking for $ac_header" >&5
4428echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4429if eval "test \"\${$as_ac_Header+set}\" = set"; then
4430 echo $ECHO_N "(cached) $ECHO_C" >&6
4431fi
4432echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4433echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004434else
Martin v. Löwis11437992002-04-12 09:54:03 +00004435 # Is the header compilable?
4436echo "$as_me:$LINENO: checking $ac_header usability" >&5
4437echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4438cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004439#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004440/* confdefs.h. */
4441_ACEOF
4442cat confdefs.h >>conftest.$ac_ext
4443cat >>conftest.$ac_ext <<_ACEOF
4444/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004445$ac_includes_default
4446#include <$ac_header>
4447_ACEOF
4448rm -f conftest.$ac_objext
4449if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004450 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004451 ac_status=$?
4452 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4453 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004454 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004455 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4456 (eval $ac_try) 2>&5
4457 ac_status=$?
4458 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4459 (exit $ac_status); }; }; then
4460 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004461else
Martin v. Löwis11437992002-04-12 09:54:03 +00004462 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004463sed 's/^/| /' conftest.$ac_ext >&5
4464
Martin v. Löwis11437992002-04-12 09:54:03 +00004465ac_header_compiler=no
4466fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004467rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004468echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4469echo "${ECHO_T}$ac_header_compiler" >&6
4470
4471# Is the header present?
4472echo "$as_me:$LINENO: checking $ac_header presence" >&5
4473echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4474cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004475#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004476/* confdefs.h. */
4477_ACEOF
4478cat confdefs.h >>conftest.$ac_ext
4479cat >>conftest.$ac_ext <<_ACEOF
4480/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004481#include <$ac_header>
4482_ACEOF
4483if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4484 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4485 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004486 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004487 rm -f conftest.er1
4488 cat conftest.err >&5
4489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4490 (exit $ac_status); } >/dev/null; then
4491 if test -s conftest.err; then
4492 ac_cpp_err=$ac_c_preproc_warn_flag
4493 else
4494 ac_cpp_err=
4495 fi
4496else
4497 ac_cpp_err=yes
4498fi
4499if test -z "$ac_cpp_err"; then
4500 ac_header_preproc=yes
4501else
4502 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004503sed 's/^/| /' conftest.$ac_ext >&5
4504
Martin v. Löwis11437992002-04-12 09:54:03 +00004505 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004506fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004507rm -f conftest.err conftest.$ac_ext
4508echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4509echo "${ECHO_T}$ac_header_preproc" >&6
4510
4511# So? What about this header?
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004512case $ac_header_compiler:$ac_header_preproc in
4513 yes:no )
Martin v. Löwis11437992002-04-12 09:54:03 +00004514 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4515echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004516 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004517echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4518 (
4519 cat <<\_ASBOX
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004520## ------------------------------------ ##
4521## Report this to bug-autoconf@gnu.org. ##
4522## ------------------------------------ ##
4523_ASBOX
4524 ) |
4525 sed "s/^/$as_me: WARNING: /" >&2
4526 ;;
4527 no:yes )
4528 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4529echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4530 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4531echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4532 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4533echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4534 (
4535 cat <<\_ASBOX
4536## ------------------------------------ ##
4537## Report this to bug-autoconf@gnu.org. ##
4538## ------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00004539_ASBOX
4540 ) |
4541 sed "s/^/$as_me: WARNING: /" >&2
4542 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004543esac
4544echo "$as_me:$LINENO: checking for $ac_header" >&5
4545echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4546if eval "test \"\${$as_ac_Header+set}\" = set"; then
4547 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004548else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004549 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004550fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004551echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4552echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4553
4554fi
4555if test `eval echo '${'$as_ac_Header'}'` = yes; then
4556 cat >>confdefs.h <<_ACEOF
4557#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4558_ACEOF
4559
4560fi
4561
Guido van Rossum627b2d71993-12-24 10:39:16 +00004562done
4563
Martin v. Löwis11437992002-04-12 09:54:03 +00004564
4565
4566
4567
4568
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004569ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004570for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4571 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4572echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4573echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4574if eval "test \"\${$as_ac_Header+set}\" = set"; then
4575 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004576else
Martin v. Löwis11437992002-04-12 09:54:03 +00004577 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004578#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004579/* confdefs.h. */
4580_ACEOF
4581cat confdefs.h >>conftest.$ac_ext
4582cat >>conftest.$ac_ext <<_ACEOF
4583/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004584#include <sys/types.h>
4585#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004586
Martin v. Löwis11437992002-04-12 09:54:03 +00004587int
4588main ()
4589{
4590if ((DIR *) 0)
4591return 0;
4592 ;
4593 return 0;
4594}
4595_ACEOF
4596rm -f conftest.$ac_objext
4597if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004598 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004599 ac_status=$?
4600 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4601 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004602 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004603 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4604 (eval $ac_try) 2>&5
4605 ac_status=$?
4606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4607 (exit $ac_status); }; }; then
4608 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004609else
Martin v. Löwis11437992002-04-12 09:54:03 +00004610 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004611sed 's/^/| /' conftest.$ac_ext >&5
4612
Martin v. Löwis11437992002-04-12 09:54:03 +00004613eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004614fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004615rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004616fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004617echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4618echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4619if test `eval echo '${'$as_ac_Header'}'` = yes; then
4620 cat >>confdefs.h <<_ACEOF
4621#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4622_ACEOF
4623
4624ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004625fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004626
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004627done
4628# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4629if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004630 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4631echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4632if test "${ac_cv_search_opendir+set}" = set; then
4633 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004634else
Martin v. Löwis11437992002-04-12 09:54:03 +00004635 ac_func_search_save_LIBS=$LIBS
4636ac_cv_search_opendir=no
4637cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004638#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004639/* confdefs.h. */
4640_ACEOF
4641cat confdefs.h >>conftest.$ac_ext
4642cat >>conftest.$ac_ext <<_ACEOF
4643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004644
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004645/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004646#ifdef __cplusplus
4647extern "C"
4648#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004649/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004650 builtin and then its argument prototype would still apply. */
4651char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004652int
4653main ()
4654{
4655opendir ();
4656 ;
4657 return 0;
4658}
4659_ACEOF
4660rm -f conftest.$ac_objext conftest$ac_exeext
4661if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004662 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004663 ac_status=$?
4664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4665 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004666 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004667 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4668 (eval $ac_try) 2>&5
4669 ac_status=$?
4670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4671 (exit $ac_status); }; }; then
4672 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004673else
Martin v. Löwis11437992002-04-12 09:54:03 +00004674 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004675sed 's/^/| /' conftest.$ac_ext >&5
4676
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004677fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004678rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004679if test "$ac_cv_search_opendir" = no; then
4680 for ac_lib in dir; do
4681 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4682 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004683#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004684/* confdefs.h. */
4685_ACEOF
4686cat confdefs.h >>conftest.$ac_ext
4687cat >>conftest.$ac_ext <<_ACEOF
4688/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004689
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004690/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004691#ifdef __cplusplus
4692extern "C"
4693#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004694/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004695 builtin and then its argument prototype would still apply. */
4696char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004697int
4698main ()
4699{
4700opendir ();
4701 ;
4702 return 0;
4703}
4704_ACEOF
4705rm -f conftest.$ac_objext conftest$ac_exeext
4706if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004707 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004708 ac_status=$?
4709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4710 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004711 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004712 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4713 (eval $ac_try) 2>&5
4714 ac_status=$?
4715 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4716 (exit $ac_status); }; }; then
4717 ac_cv_search_opendir="-l$ac_lib"
4718break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004719else
Martin v. Löwis11437992002-04-12 09:54:03 +00004720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004721sed 's/^/| /' conftest.$ac_ext >&5
4722
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004723fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004724rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004725 done
4726fi
4727LIBS=$ac_func_search_save_LIBS
4728fi
4729echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4730echo "${ECHO_T}$ac_cv_search_opendir" >&6
4731if test "$ac_cv_search_opendir" != no; then
4732 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004733
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004734fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004735
Michael W. Hudson54241132001-12-07 15:38:26 +00004736else
Martin v. Löwis11437992002-04-12 09:54:03 +00004737 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4738echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4739if test "${ac_cv_search_opendir+set}" = set; then
4740 echo $ECHO_N "(cached) $ECHO_C" >&6
4741else
4742 ac_func_search_save_LIBS=$LIBS
4743ac_cv_search_opendir=no
4744cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004745#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004746/* confdefs.h. */
4747_ACEOF
4748cat confdefs.h >>conftest.$ac_ext
4749cat >>conftest.$ac_ext <<_ACEOF
4750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004751
4752/* Override any gcc2 internal prototype to avoid an error. */
4753#ifdef __cplusplus
4754extern "C"
4755#endif
4756/* We use char because int might match the return type of a gcc2
4757 builtin and then its argument prototype would still apply. */
4758char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004759int
4760main ()
4761{
4762opendir ();
4763 ;
4764 return 0;
4765}
4766_ACEOF
4767rm -f conftest.$ac_objext conftest$ac_exeext
4768if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004769 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004770 ac_status=$?
4771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4772 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004773 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4775 (eval $ac_try) 2>&5
4776 ac_status=$?
4777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4778 (exit $ac_status); }; }; then
4779 ac_cv_search_opendir="none required"
4780else
4781 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004782sed 's/^/| /' conftest.$ac_ext >&5
4783
Martin v. Löwis11437992002-04-12 09:54:03 +00004784fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004785rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004786if test "$ac_cv_search_opendir" = no; then
4787 for ac_lib in x; do
4788 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4789 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004790#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004791/* confdefs.h. */
4792_ACEOF
4793cat confdefs.h >>conftest.$ac_ext
4794cat >>conftest.$ac_ext <<_ACEOF
4795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004796
4797/* Override any gcc2 internal prototype to avoid an error. */
4798#ifdef __cplusplus
4799extern "C"
4800#endif
4801/* We use char because int might match the return type of a gcc2
4802 builtin and then its argument prototype would still apply. */
4803char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004804int
4805main ()
4806{
4807opendir ();
4808 ;
4809 return 0;
4810}
4811_ACEOF
4812rm -f conftest.$ac_objext conftest$ac_exeext
4813if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004814 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004815 ac_status=$?
4816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4817 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004818 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4820 (eval $ac_try) 2>&5
4821 ac_status=$?
4822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4823 (exit $ac_status); }; }; then
4824 ac_cv_search_opendir="-l$ac_lib"
4825break
4826else
4827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004828sed 's/^/| /' conftest.$ac_ext >&5
4829
Martin v. Löwis11437992002-04-12 09:54:03 +00004830fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004831rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004832 done
4833fi
4834LIBS=$ac_func_search_save_LIBS
4835fi
4836echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4837echo "${ECHO_T}$ac_cv_search_opendir" >&6
4838if test "$ac_cv_search_opendir" != no; then
4839 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4840
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004841fi
4842
4843fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004844
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004845echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4846echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4847if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4848 echo $ECHO_N "(cached) $ECHO_C" >&6
4849else
4850 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004851#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004852/* confdefs.h. */
4853_ACEOF
4854cat confdefs.h >>conftest.$ac_ext
4855cat >>conftest.$ac_ext <<_ACEOF
4856/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004857#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004858int
4859main ()
4860{
4861return makedev(0, 0);
4862 ;
4863 return 0;
4864}
4865_ACEOF
4866rm -f conftest.$ac_objext conftest$ac_exeext
4867if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004868 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004869 ac_status=$?
4870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4871 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004872 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4874 (eval $ac_try) 2>&5
4875 ac_status=$?
4876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4877 (exit $ac_status); }; }; then
4878 ac_cv_header_sys_types_h_makedev=yes
4879else
4880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004881sed 's/^/| /' conftest.$ac_ext >&5
4882
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004883ac_cv_header_sys_types_h_makedev=no
4884fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004885rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004886
4887fi
4888echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4889echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4890
4891if test $ac_cv_header_sys_types_h_makedev = no; then
4892if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4893 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4894echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4895if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4896 echo $ECHO_N "(cached) $ECHO_C" >&6
4897fi
4898echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4899echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4900else
4901 # Is the header compilable?
4902echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4903echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4904cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004905#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004906/* confdefs.h. */
4907_ACEOF
4908cat confdefs.h >>conftest.$ac_ext
4909cat >>conftest.$ac_ext <<_ACEOF
4910/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004911$ac_includes_default
4912#include <sys/mkdev.h>
4913_ACEOF
4914rm -f conftest.$ac_objext
4915if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004916 (eval $ac_compile) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004917 ac_status=$?
4918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4919 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004920 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004921 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4922 (eval $ac_try) 2>&5
4923 ac_status=$?
4924 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4925 (exit $ac_status); }; }; then
4926 ac_header_compiler=yes
4927else
4928 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004929sed 's/^/| /' conftest.$ac_ext >&5
4930
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004931ac_header_compiler=no
4932fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004933rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004934echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4935echo "${ECHO_T}$ac_header_compiler" >&6
4936
4937# Is the header present?
4938echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4939echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4940cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004941#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004942/* confdefs.h. */
4943_ACEOF
4944cat confdefs.h >>conftest.$ac_ext
4945cat >>conftest.$ac_ext <<_ACEOF
4946/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004947#include <sys/mkdev.h>
4948_ACEOF
4949if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4950 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4951 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004952 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004953 rm -f conftest.er1
4954 cat conftest.err >&5
4955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4956 (exit $ac_status); } >/dev/null; then
4957 if test -s conftest.err; then
4958 ac_cpp_err=$ac_c_preproc_warn_flag
4959 else
4960 ac_cpp_err=
4961 fi
4962else
4963 ac_cpp_err=yes
4964fi
4965if test -z "$ac_cpp_err"; then
4966 ac_header_preproc=yes
4967else
4968 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004969sed 's/^/| /' conftest.$ac_ext >&5
4970
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004971 ac_header_preproc=no
4972fi
4973rm -f conftest.err conftest.$ac_ext
4974echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4975echo "${ECHO_T}$ac_header_preproc" >&6
4976
4977# So? What about this header?
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004978case $ac_header_compiler:$ac_header_preproc in
4979 yes:no )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004980 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4981echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004982 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004983echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4984 (
4985 cat <<\_ASBOX
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004986## ------------------------------------ ##
4987## Report this to bug-autoconf@gnu.org. ##
4988## ------------------------------------ ##
4989_ASBOX
4990 ) |
4991 sed "s/^/$as_me: WARNING: /" >&2
4992 ;;
4993 no:yes )
4994 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4995echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4996 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4997echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4998 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4999echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
5000 (
5001 cat <<\_ASBOX
5002## ------------------------------------ ##
5003## Report this to bug-autoconf@gnu.org. ##
5004## ------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005005_ASBOX
5006 ) |
5007 sed "s/^/$as_me: WARNING: /" >&2
5008 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005009esac
5010echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5011echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5012if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5013 echo $ECHO_N "(cached) $ECHO_C" >&6
5014else
5015 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5016fi
5017echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5018echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5019
5020fi
5021if test $ac_cv_header_sys_mkdev_h = yes; then
5022
5023cat >>confdefs.h <<\_ACEOF
5024#define MAJOR_IN_MKDEV 1
5025_ACEOF
5026
5027fi
5028
5029
5030
5031 if test $ac_cv_header_sys_mkdev_h = no; then
5032 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5033 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5034echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5035if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5036 echo $ECHO_N "(cached) $ECHO_C" >&6
5037fi
5038echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5039echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5040else
5041 # Is the header compilable?
5042echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5043echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
5044cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005045#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005046/* confdefs.h. */
5047_ACEOF
5048cat confdefs.h >>conftest.$ac_ext
5049cat >>conftest.$ac_ext <<_ACEOF
5050/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005051$ac_includes_default
5052#include <sys/sysmacros.h>
5053_ACEOF
5054rm -f conftest.$ac_objext
5055if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005056 (eval $ac_compile) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005057 ac_status=$?
5058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5059 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005060 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5062 (eval $ac_try) 2>&5
5063 ac_status=$?
5064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5065 (exit $ac_status); }; }; then
5066 ac_header_compiler=yes
5067else
5068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005069sed 's/^/| /' conftest.$ac_ext >&5
5070
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005071ac_header_compiler=no
5072fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005073rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005074echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5075echo "${ECHO_T}$ac_header_compiler" >&6
5076
5077# Is the header present?
5078echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5079echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5080cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005081#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005082/* confdefs.h. */
5083_ACEOF
5084cat confdefs.h >>conftest.$ac_ext
5085cat >>conftest.$ac_ext <<_ACEOF
5086/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005087#include <sys/sysmacros.h>
5088_ACEOF
5089if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5090 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5091 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005092 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005093 rm -f conftest.er1
5094 cat conftest.err >&5
5095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5096 (exit $ac_status); } >/dev/null; then
5097 if test -s conftest.err; then
5098 ac_cpp_err=$ac_c_preproc_warn_flag
5099 else
5100 ac_cpp_err=
5101 fi
5102else
5103 ac_cpp_err=yes
5104fi
5105if test -z "$ac_cpp_err"; then
5106 ac_header_preproc=yes
5107else
5108 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005109sed 's/^/| /' conftest.$ac_ext >&5
5110
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005111 ac_header_preproc=no
5112fi
5113rm -f conftest.err conftest.$ac_ext
5114echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5115echo "${ECHO_T}$ac_header_preproc" >&6
5116
5117# So? What about this header?
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005118case $ac_header_compiler:$ac_header_preproc in
5119 yes:no )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005120 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5121echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005122 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005123echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5124 (
5125 cat <<\_ASBOX
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005126## ------------------------------------ ##
5127## Report this to bug-autoconf@gnu.org. ##
5128## ------------------------------------ ##
5129_ASBOX
5130 ) |
5131 sed "s/^/$as_me: WARNING: /" >&2
5132 ;;
5133 no:yes )
5134 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5135echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
5136 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5137echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5138 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
5139echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5140 (
5141 cat <<\_ASBOX
5142## ------------------------------------ ##
5143## Report this to bug-autoconf@gnu.org. ##
5144## ------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005145_ASBOX
5146 ) |
5147 sed "s/^/$as_me: WARNING: /" >&2
5148 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005149esac
5150echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5151echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5152if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5153 echo $ECHO_N "(cached) $ECHO_C" >&6
5154else
5155 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5156fi
5157echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5158echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5159
5160fi
5161if test $ac_cv_header_sys_sysmacros_h = yes; then
5162
5163cat >>confdefs.h <<\_ACEOF
5164#define MAJOR_IN_SYSMACROS 1
5165_ACEOF
5166
5167fi
5168
5169
5170 fi
5171fi
5172
Michael W. Hudson54241132001-12-07 15:38:26 +00005173
Guido van Rossum627b2d71993-12-24 10:39:16 +00005174# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005175was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005176echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5177echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5178cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005179#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005180/* confdefs.h. */
5181_ACEOF
5182cat confdefs.h >>conftest.$ac_ext
5183cat >>conftest.$ac_ext <<_ACEOF
5184/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005185#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005186
5187_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005188if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005189 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005190 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005191else
Martin v. Löwis11437992002-04-12 09:54:03 +00005192
5193
5194cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005195#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005196_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005197
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005198
Guido van Rossum627b2d71993-12-24 10:39:16 +00005199fi
5200rm -f conftest*
5201
Martin v. Löwis11437992002-04-12 09:54:03 +00005202echo "$as_me:$LINENO: result: $was_it_defined" >&5
5203echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005204
Neal Norwitz11690112002-07-30 01:08:28 +00005205# Check whether using makedev requires defining _OSF_SOURCE
5206echo "$as_me:$LINENO: checking for makedev" >&5
5207echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5208cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005209#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005210/* confdefs.h. */
5211_ACEOF
5212cat confdefs.h >>conftest.$ac_ext
5213cat >>conftest.$ac_ext <<_ACEOF
5214/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005215#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005216int
5217main ()
5218{
5219 makedev(0, 0)
5220 ;
5221 return 0;
5222}
5223_ACEOF
5224rm -f conftest.$ac_objext conftest$ac_exeext
5225if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005226 (eval $ac_link) 2>&5
Neal Norwitz11690112002-07-30 01:08:28 +00005227 ac_status=$?
5228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5229 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005230 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5232 (eval $ac_try) 2>&5
5233 ac_status=$?
5234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5235 (exit $ac_status); }; }; then
5236 ac_cv_has_makedev=yes
5237else
5238 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005239sed 's/^/| /' conftest.$ac_ext >&5
5240
Neal Norwitz11690112002-07-30 01:08:28 +00005241ac_cv_has_makedev=no
5242fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005243rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005244if test "$ac_cv_has_makedev" = "no"; then
5245 # we didn't link, try if _OSF_SOURCE will allow us to link
5246 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005247#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005248/* confdefs.h. */
5249_ACEOF
5250cat confdefs.h >>conftest.$ac_ext
5251cat >>conftest.$ac_ext <<_ACEOF
5252/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005253
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005254#define _OSF_SOURCE 1
5255#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005256
Neal Norwitz11690112002-07-30 01:08:28 +00005257int
5258main ()
5259{
5260 makedev(0, 0)
5261 ;
5262 return 0;
5263}
5264_ACEOF
5265rm -f conftest.$ac_objext conftest$ac_exeext
5266if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005267 (eval $ac_link) 2>&5
Neal Norwitz11690112002-07-30 01:08:28 +00005268 ac_status=$?
5269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5270 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005271 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5273 (eval $ac_try) 2>&5
5274 ac_status=$?
5275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5276 (exit $ac_status); }; }; then
5277 ac_cv_has_makedev=yes
5278else
5279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005280sed 's/^/| /' conftest.$ac_ext >&5
5281
Neal Norwitz11690112002-07-30 01:08:28 +00005282ac_cv_has_makedev=no
5283fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005284rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005285 if test "$ac_cv_has_makedev" = "yes"; then
5286
5287cat >>confdefs.h <<\_ACEOF
5288#define _OSF_SOURCE 1
5289_ACEOF
5290
5291 fi
5292fi
5293echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5294echo "${ECHO_T}$ac_cv_has_makedev" >&6
5295if test "$ac_cv_has_makedev" = "yes"; then
5296
5297cat >>confdefs.h <<\_ACEOF
5298#define HAVE_MAKEDEV 1
5299_ACEOF
5300
5301fi
5302
Martin v. Löwis399a6892002-10-04 10:22:02 +00005303# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5304# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5305# defined, but the compiler does not support pragma redefine_extname,
5306# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5307# structures (such as rlimit64) without declaring them. As a
5308# work-around, disable LFS on such configurations
5309
5310use_lfs=yes
5311echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5312echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5313cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005314#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005315/* confdefs.h. */
5316_ACEOF
5317cat confdefs.h >>conftest.$ac_ext
5318cat >>conftest.$ac_ext <<_ACEOF
5319/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005320
5321#define _LARGEFILE_SOURCE 1
5322#define _FILE_OFFSET_BITS 64
5323#include <sys/resource.h>
5324
Martin v. Löwis399a6892002-10-04 10:22:02 +00005325int
5326main ()
5327{
5328struct rlimit foo;
5329 ;
5330 return 0;
5331}
5332_ACEOF
5333rm -f conftest.$ac_objext
5334if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005335 (eval $ac_compile) 2>&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00005336 ac_status=$?
5337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5338 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005339 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis399a6892002-10-04 10:22:02 +00005340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5341 (eval $ac_try) 2>&5
5342 ac_status=$?
5343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5344 (exit $ac_status); }; }; then
5345 sol_lfs_bug=no
5346else
5347 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005348sed 's/^/| /' conftest.$ac_ext >&5
5349
Martin v. Löwis399a6892002-10-04 10:22:02 +00005350sol_lfs_bug=yes
5351fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005352rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis399a6892002-10-04 10:22:02 +00005353echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5354echo "${ECHO_T}$sol_lfs_bug" >&6
5355if test "$sol_lfs_bug" = "yes"; then
5356 use_lfs=no
5357fi
5358
5359if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005360# Two defines needed to enable largefile support on various platforms
5361# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005362
Martin v. Löwis11437992002-04-12 09:54:03 +00005363cat >>confdefs.h <<\_ACEOF
5364#define _LARGEFILE_SOURCE 1
5365_ACEOF
5366
5367
5368cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005369#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005370_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005371
Martin v. Löwis399a6892002-10-04 10:22:02 +00005372fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005373
Guido van Rossum84e7b241996-08-19 21:59:00 +00005374# Add some code to confdefs.h so that the test for off_t works on SCO
5375cat >> confdefs.h <<\EOF
5376#if defined(SCO_DS)
5377#undef _OFF_T
5378#endif
5379EOF
5380
Guido van Rossumef2255b2000-03-10 22:30:29 +00005381# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005382echo "$as_me:$LINENO: checking for mode_t" >&5
5383echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5384if test "${ac_cv_type_mode_t+set}" = set; then
5385 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005386else
Martin v. Löwis11437992002-04-12 09:54:03 +00005387 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005388#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005389/* confdefs.h. */
5390_ACEOF
5391cat confdefs.h >>conftest.$ac_ext
5392cat >>conftest.$ac_ext <<_ACEOF
5393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005394$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005395int
5396main ()
5397{
5398if ((mode_t *) 0)
5399 return 0;
5400if (sizeof (mode_t))
5401 return 0;
5402 ;
5403 return 0;
5404}
5405_ACEOF
5406rm -f conftest.$ac_objext
5407if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005408 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005409 ac_status=$?
5410 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5411 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005412 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005413 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5414 (eval $ac_try) 2>&5
5415 ac_status=$?
5416 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5417 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005418 ac_cv_type_mode_t=yes
5419else
Martin v. Löwis11437992002-04-12 09:54:03 +00005420 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005421sed 's/^/| /' conftest.$ac_ext >&5
5422
Martin v. Löwis11437992002-04-12 09:54:03 +00005423ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005424fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005425rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005426fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005427echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5428echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5429if test $ac_cv_type_mode_t = yes; then
5430 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005431else
Martin v. Löwis11437992002-04-12 09:54:03 +00005432
5433cat >>confdefs.h <<_ACEOF
5434#define mode_t int
5435_ACEOF
5436
5437fi
5438
5439echo "$as_me:$LINENO: checking for off_t" >&5
5440echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5441if test "${ac_cv_type_off_t+set}" = set; then
5442 echo $ECHO_N "(cached) $ECHO_C" >&6
5443else
5444 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005445#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005446/* confdefs.h. */
5447_ACEOF
5448cat confdefs.h >>conftest.$ac_ext
5449cat >>conftest.$ac_ext <<_ACEOF
5450/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005451$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005452int
5453main ()
5454{
5455if ((off_t *) 0)
5456 return 0;
5457if (sizeof (off_t))
5458 return 0;
5459 ;
5460 return 0;
5461}
5462_ACEOF
5463rm -f conftest.$ac_objext
5464if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005465 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005466 ac_status=$?
5467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5468 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005469 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005470 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5471 (eval $ac_try) 2>&5
5472 ac_status=$?
5473 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5474 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005475 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005476else
Martin v. Löwis11437992002-04-12 09:54:03 +00005477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005478sed 's/^/| /' conftest.$ac_ext >&5
5479
Martin v. Löwis11437992002-04-12 09:54:03 +00005480ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005481fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005482rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005483fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005484echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5485echo "${ECHO_T}$ac_cv_type_off_t" >&6
5486if test $ac_cv_type_off_t = yes; then
5487 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005488else
Martin v. Löwis11437992002-04-12 09:54:03 +00005489
5490cat >>confdefs.h <<_ACEOF
5491#define off_t long
5492_ACEOF
5493
5494fi
5495
5496echo "$as_me:$LINENO: checking for pid_t" >&5
5497echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5498if test "${ac_cv_type_pid_t+set}" = set; then
5499 echo $ECHO_N "(cached) $ECHO_C" >&6
5500else
5501 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005502#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005503/* confdefs.h. */
5504_ACEOF
5505cat confdefs.h >>conftest.$ac_ext
5506cat >>conftest.$ac_ext <<_ACEOF
5507/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005508$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005509int
5510main ()
5511{
5512if ((pid_t *) 0)
5513 return 0;
5514if (sizeof (pid_t))
5515 return 0;
5516 ;
5517 return 0;
5518}
5519_ACEOF
5520rm -f conftest.$ac_objext
5521if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005522 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005523 ac_status=$?
5524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5525 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005526 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005527 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5528 (eval $ac_try) 2>&5
5529 ac_status=$?
5530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5531 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005532 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005533else
Martin v. Löwis11437992002-04-12 09:54:03 +00005534 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005535sed 's/^/| /' conftest.$ac_ext >&5
5536
Martin v. Löwis11437992002-04-12 09:54:03 +00005537ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005538fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005539rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005540fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005541echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5542echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5543if test $ac_cv_type_pid_t = yes; then
5544 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005545else
Martin v. Löwis11437992002-04-12 09:54:03 +00005546
5547cat >>confdefs.h <<_ACEOF
5548#define pid_t int
5549_ACEOF
5550
5551fi
5552
5553echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5554echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5555if test "${ac_cv_type_signal+set}" = set; then
5556 echo $ECHO_N "(cached) $ECHO_C" >&6
5557else
5558 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005559#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005560/* confdefs.h. */
5561_ACEOF
5562cat confdefs.h >>conftest.$ac_ext
5563cat >>conftest.$ac_ext <<_ACEOF
5564/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005565#include <sys/types.h>
5566#include <signal.h>
5567#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005568# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005569#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005570#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005571extern "C" void (*signal (int, void (*)(int)))(int);
5572#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005573void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005574#endif
5575
Martin v. Löwis11437992002-04-12 09:54:03 +00005576int
5577main ()
5578{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005579int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005580 ;
5581 return 0;
5582}
5583_ACEOF
5584rm -f conftest.$ac_objext
5585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005586 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005587 ac_status=$?
5588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5589 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005590 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5592 (eval $ac_try) 2>&5
5593 ac_status=$?
5594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5595 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005596 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005597else
Martin v. Löwis11437992002-04-12 09:54:03 +00005598 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005599sed 's/^/| /' conftest.$ac_ext >&5
5600
Martin v. Löwis11437992002-04-12 09:54:03 +00005601ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005602fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005603rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005604fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005605echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5606echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005607
Martin v. Löwis11437992002-04-12 09:54:03 +00005608cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005609#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005610_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005611
Michael W. Hudson54241132001-12-07 15:38:26 +00005612
Martin v. Löwis11437992002-04-12 09:54:03 +00005613echo "$as_me:$LINENO: checking for size_t" >&5
5614echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5615if test "${ac_cv_type_size_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
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005619#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005620/* confdefs.h. */
5621_ACEOF
5622cat confdefs.h >>conftest.$ac_ext
5623cat >>conftest.$ac_ext <<_ACEOF
5624/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005625$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005626int
5627main ()
5628{
5629if ((size_t *) 0)
5630 return 0;
5631if (sizeof (size_t))
5632 return 0;
5633 ;
5634 return 0;
5635}
5636_ACEOF
5637rm -f conftest.$ac_objext
5638if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005639 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005640 ac_status=$?
5641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5642 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005643 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005644 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5645 (eval $ac_try) 2>&5
5646 ac_status=$?
5647 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5648 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005649 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005650else
Martin v. Löwis11437992002-04-12 09:54:03 +00005651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005652sed 's/^/| /' conftest.$ac_ext >&5
5653
Martin v. Löwis11437992002-04-12 09:54:03 +00005654ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005655fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005656rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005657fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005658echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5659echo "${ECHO_T}$ac_cv_type_size_t" >&6
5660if test $ac_cv_type_size_t = yes; then
5661 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005662else
Martin v. Löwis11437992002-04-12 09:54:03 +00005663
5664cat >>confdefs.h <<_ACEOF
5665#define size_t unsigned
5666_ACEOF
5667
5668fi
5669
5670echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5671echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5672if test "${ac_cv_type_uid_t+set}" = set; then
5673 echo $ECHO_N "(cached) $ECHO_C" >&6
5674else
5675 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005676#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005677/* confdefs.h. */
5678_ACEOF
5679cat confdefs.h >>conftest.$ac_ext
5680cat >>conftest.$ac_ext <<_ACEOF
5681/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005682#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005683
5684_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005685if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005686 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005687 ac_cv_type_uid_t=yes
5688else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005689 ac_cv_type_uid_t=no
5690fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005691rm -f conftest*
5692
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005693fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005694echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5695echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005696if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005697
Martin v. Löwis11437992002-04-12 09:54:03 +00005698cat >>confdefs.h <<\_ACEOF
5699#define uid_t int
5700_ACEOF
5701
5702
5703cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005704#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005705_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005706
5707fi
5708
Jack Jansendd19cf82001-12-06 22:36:17 +00005709
Michael W. Hudson54241132001-12-07 15:38:26 +00005710# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00005711# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00005712echo "$as_me:$LINENO: checking for int" >&5
5713echo $ECHO_N "checking for int... $ECHO_C" >&6
5714if test "${ac_cv_type_int+set}" = set; then
5715 echo $ECHO_N "(cached) $ECHO_C" >&6
5716else
5717 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005718#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005719/* confdefs.h. */
5720_ACEOF
5721cat confdefs.h >>conftest.$ac_ext
5722cat >>conftest.$ac_ext <<_ACEOF
5723/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005724$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005725int
5726main ()
5727{
5728if ((int *) 0)
5729 return 0;
5730if (sizeof (int))
5731 return 0;
5732 ;
5733 return 0;
5734}
5735_ACEOF
5736rm -f conftest.$ac_objext
5737if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005738 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005739 ac_status=$?
5740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5741 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005742 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005743 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5744 (eval $ac_try) 2>&5
5745 ac_status=$?
5746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5747 (exit $ac_status); }; }; then
5748 ac_cv_type_int=yes
5749else
5750 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005751sed 's/^/| /' conftest.$ac_ext >&5
5752
Martin v. Löwis11437992002-04-12 09:54:03 +00005753ac_cv_type_int=no
5754fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005755rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005756fi
5757echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5758echo "${ECHO_T}$ac_cv_type_int" >&6
5759
5760echo "$as_me:$LINENO: checking size of int" >&5
5761echo $ECHO_N "checking size of int... $ECHO_C" >&6
5762if test "${ac_cv_sizeof_int+set}" = set; then
5763 echo $ECHO_N "(cached) $ECHO_C" >&6
5764else
5765 if test "$ac_cv_type_int" = yes; then
5766 # The cast to unsigned long works around a bug in the HP C Compiler
5767 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5768 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5769 # This bug is HP SR number 8606223364.
5770 if test "$cross_compiling" = yes; then
5771 # Depending upon the size, compute the lo and hi bounds.
5772cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005773#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005774/* confdefs.h. */
5775_ACEOF
5776cat confdefs.h >>conftest.$ac_ext
5777cat >>conftest.$ac_ext <<_ACEOF
5778/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005779$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005780int
5781main ()
5782{
5783static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5784test_array [0] = 0
5785
5786 ;
5787 return 0;
5788}
5789_ACEOF
5790rm -f conftest.$ac_objext
5791if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005792 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005793 ac_status=$?
5794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5795 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005796 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005797 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5798 (eval $ac_try) 2>&5
5799 ac_status=$?
5800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5801 (exit $ac_status); }; }; then
5802 ac_lo=0 ac_mid=0
5803 while :; do
5804 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005805#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005806/* confdefs.h. */
5807_ACEOF
5808cat confdefs.h >>conftest.$ac_ext
5809cat >>conftest.$ac_ext <<_ACEOF
5810/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005811$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005812int
5813main ()
5814{
5815static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5816test_array [0] = 0
5817
5818 ;
5819 return 0;
5820}
5821_ACEOF
5822rm -f conftest.$ac_objext
5823if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005824 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005825 ac_status=$?
5826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5827 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005828 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005829 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5830 (eval $ac_try) 2>&5
5831 ac_status=$?
5832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5833 (exit $ac_status); }; }; then
5834 ac_hi=$ac_mid; break
5835else
5836 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005837sed 's/^/| /' conftest.$ac_ext >&5
5838
Martin v. Löwis11437992002-04-12 09:54:03 +00005839ac_lo=`expr $ac_mid + 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005840 if test $ac_lo -le $ac_mid; then
5841 ac_lo= ac_hi=
5842 break
5843 fi
5844 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00005845fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005846rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005847 done
5848else
5849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005850sed 's/^/| /' conftest.$ac_ext >&5
5851
Martin v. Löwis11437992002-04-12 09:54:03 +00005852cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005853#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005854/* confdefs.h. */
5855_ACEOF
5856cat confdefs.h >>conftest.$ac_ext
5857cat >>conftest.$ac_ext <<_ACEOF
5858/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005859$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005860int
5861main ()
5862{
5863static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5864test_array [0] = 0
5865
5866 ;
5867 return 0;
5868}
5869_ACEOF
5870rm -f conftest.$ac_objext
5871if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005872 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005873 ac_status=$?
5874 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5875 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005876 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005877 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5878 (eval $ac_try) 2>&5
5879 ac_status=$?
5880 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5881 (exit $ac_status); }; }; then
5882 ac_hi=-1 ac_mid=-1
5883 while :; do
5884 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005885#line $LINENO "configure"
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{
5895static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5896test_array [0] = 0
5897
5898 ;
5899 return 0;
5900}
5901_ACEOF
5902rm -f conftest.$ac_objext
5903if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005904 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005905 ac_status=$?
5906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5907 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005908 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5910 (eval $ac_try) 2>&5
5911 ac_status=$?
5912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5913 (exit $ac_status); }; }; then
5914 ac_lo=$ac_mid; break
5915else
5916 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005917sed 's/^/| /' conftest.$ac_ext >&5
5918
Martin v. Löwis11437992002-04-12 09:54:03 +00005919ac_hi=`expr '(' $ac_mid ')' - 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005920 if test $ac_mid -le $ac_hi; then
5921 ac_lo= ac_hi=
5922 break
5923 fi
5924 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00005925fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005926rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005927 done
5928else
5929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005930sed 's/^/| /' conftest.$ac_ext >&5
5931
Martin v. Löwis11437992002-04-12 09:54:03 +00005932ac_lo= ac_hi=
5933fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005934rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005935fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005936rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005937# Binary search between lo and hi bounds.
5938while test "x$ac_lo" != "x$ac_hi"; do
5939 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5940 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005941#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005942/* confdefs.h. */
5943_ACEOF
5944cat confdefs.h >>conftest.$ac_ext
5945cat >>conftest.$ac_ext <<_ACEOF
5946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005947$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005948int
5949main ()
5950{
5951static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5952test_array [0] = 0
5953
5954 ;
5955 return 0;
5956}
5957_ACEOF
5958rm -f conftest.$ac_objext
5959if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005960 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005961 ac_status=$?
5962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5963 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005964 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5966 (eval $ac_try) 2>&5
5967 ac_status=$?
5968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5969 (exit $ac_status); }; }; then
5970 ac_hi=$ac_mid
5971else
5972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005973sed 's/^/| /' conftest.$ac_ext >&5
5974
Martin v. Löwis11437992002-04-12 09:54:03 +00005975ac_lo=`expr '(' $ac_mid ')' + 1`
5976fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005977rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005978done
5979case $ac_lo in
5980?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00005981'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5982See \`config.log' for more details." >&5
5983echo "$as_me: error: cannot compute sizeof (int), 77
5984See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005985 { (exit 1); exit 1; }; } ;;
5986esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005987else
5988 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00005989 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5990See \`config.log' for more details." >&5
5991echo "$as_me: error: cannot run test program while cross compiling
5992See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005993 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005994else
Martin v. Löwis11437992002-04-12 09:54:03 +00005995 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005996#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005997/* confdefs.h. */
5998_ACEOF
5999cat confdefs.h >>conftest.$ac_ext
6000cat >>conftest.$ac_ext <<_ACEOF
6001/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006002$ac_includes_default
6003long longval () { return (long) (sizeof (int)); }
6004unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006005#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006006#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006007int
6008main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006009{
Martin v. Löwis11437992002-04-12 09:54:03 +00006010
6011 FILE *f = fopen ("conftest.val", "w");
6012 if (! f)
6013 exit (1);
6014 if (((long) (sizeof (int))) < 0)
6015 {
6016 long i = longval ();
6017 if (i != ((long) (sizeof (int))))
6018 exit (1);
6019 fprintf (f, "%ld\n", i);
6020 }
6021 else
6022 {
6023 unsigned long i = ulongval ();
6024 if (i != ((long) (sizeof (int))))
6025 exit (1);
6026 fprintf (f, "%lu\n", i);
6027 }
6028 exit (ferror (f) || fclose (f) != 0);
6029
6030 ;
6031 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006032}
Martin v. Löwis11437992002-04-12 09:54:03 +00006033_ACEOF
6034rm -f conftest$ac_exeext
6035if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6036 (eval $ac_link) 2>&5
6037 ac_status=$?
6038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6039 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6041 (eval $ac_try) 2>&5
6042 ac_status=$?
6043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6044 (exit $ac_status); }; }; then
6045 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006046else
Martin v. Löwis11437992002-04-12 09:54:03 +00006047 echo "$as_me: program exited with status $ac_status" >&5
6048echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006049sed 's/^/| /' conftest.$ac_ext >&5
6050
Martin v. Löwis11437992002-04-12 09:54:03 +00006051( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006052{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6053See \`config.log' for more details." >&5
6054echo "$as_me: error: cannot compute sizeof (int), 77
6055See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006056 { (exit 1); exit 1; }; }
6057fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006058rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006059fi
6060fi
6061rm -f conftest.val
6062else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006063 ac_cv_sizeof_int=0
6064fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006065fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006066echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6067echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6068cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006069#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006070_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006071
6072
Martin v. Löwis11437992002-04-12 09:54:03 +00006073echo "$as_me:$LINENO: checking for long" >&5
6074echo $ECHO_N "checking for long... $ECHO_C" >&6
6075if test "${ac_cv_type_long+set}" = set; then
6076 echo $ECHO_N "(cached) $ECHO_C" >&6
6077else
6078 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006079#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006080/* confdefs.h. */
6081_ACEOF
6082cat confdefs.h >>conftest.$ac_ext
6083cat >>conftest.$ac_ext <<_ACEOF
6084/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006085$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006086int
6087main ()
6088{
6089if ((long *) 0)
6090 return 0;
6091if (sizeof (long))
6092 return 0;
6093 ;
6094 return 0;
6095}
6096_ACEOF
6097rm -f conftest.$ac_objext
6098if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006099 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006100 ac_status=$?
6101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6102 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006103 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6105 (eval $ac_try) 2>&5
6106 ac_status=$?
6107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6108 (exit $ac_status); }; }; then
6109 ac_cv_type_long=yes
6110else
6111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006112sed 's/^/| /' conftest.$ac_ext >&5
6113
Martin v. Löwis11437992002-04-12 09:54:03 +00006114ac_cv_type_long=no
6115fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006116rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006117fi
6118echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6119echo "${ECHO_T}$ac_cv_type_long" >&6
6120
6121echo "$as_me:$LINENO: checking size of long" >&5
6122echo $ECHO_N "checking size of long... $ECHO_C" >&6
6123if test "${ac_cv_sizeof_long+set}" = set; then
6124 echo $ECHO_N "(cached) $ECHO_C" >&6
6125else
6126 if test "$ac_cv_type_long" = yes; then
6127 # The cast to unsigned long works around a bug in the HP C Compiler
6128 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6129 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6130 # This bug is HP SR number 8606223364.
6131 if test "$cross_compiling" = yes; then
6132 # Depending upon the size, compute the lo and hi bounds.
6133cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006134#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006135/* confdefs.h. */
6136_ACEOF
6137cat confdefs.h >>conftest.$ac_ext
6138cat >>conftest.$ac_ext <<_ACEOF
6139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006140$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006141int
6142main ()
6143{
6144static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6145test_array [0] = 0
6146
6147 ;
6148 return 0;
6149}
6150_ACEOF
6151rm -f conftest.$ac_objext
6152if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006153 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006154 ac_status=$?
6155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6156 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006157 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006158 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6159 (eval $ac_try) 2>&5
6160 ac_status=$?
6161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6162 (exit $ac_status); }; }; then
6163 ac_lo=0 ac_mid=0
6164 while :; do
6165 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006166#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006167/* confdefs.h. */
6168_ACEOF
6169cat confdefs.h >>conftest.$ac_ext
6170cat >>conftest.$ac_ext <<_ACEOF
6171/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006172$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006173int
6174main ()
6175{
6176static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6177test_array [0] = 0
6178
6179 ;
6180 return 0;
6181}
6182_ACEOF
6183rm -f conftest.$ac_objext
6184if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006185 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006186 ac_status=$?
6187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6188 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006189 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6191 (eval $ac_try) 2>&5
6192 ac_status=$?
6193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6194 (exit $ac_status); }; }; then
6195 ac_hi=$ac_mid; break
6196else
6197 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006198sed 's/^/| /' conftest.$ac_ext >&5
6199
Martin v. Löwis11437992002-04-12 09:54:03 +00006200ac_lo=`expr $ac_mid + 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006201 if test $ac_lo -le $ac_mid; then
6202 ac_lo= ac_hi=
6203 break
6204 fi
6205 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006206fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006207rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006208 done
6209else
6210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006211sed 's/^/| /' conftest.$ac_ext >&5
6212
Martin v. Löwis11437992002-04-12 09:54:03 +00006213cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006214#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006215/* confdefs.h. */
6216_ACEOF
6217cat confdefs.h >>conftest.$ac_ext
6218cat >>conftest.$ac_ext <<_ACEOF
6219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006220$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006221int
6222main ()
6223{
6224static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6225test_array [0] = 0
6226
6227 ;
6228 return 0;
6229}
6230_ACEOF
6231rm -f conftest.$ac_objext
6232if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006233 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006234 ac_status=$?
6235 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6236 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006237 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006238 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6239 (eval $ac_try) 2>&5
6240 ac_status=$?
6241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6242 (exit $ac_status); }; }; then
6243 ac_hi=-1 ac_mid=-1
6244 while :; do
6245 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006246#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006247/* confdefs.h. */
6248_ACEOF
6249cat confdefs.h >>conftest.$ac_ext
6250cat >>conftest.$ac_ext <<_ACEOF
6251/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006252$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006253int
6254main ()
6255{
6256static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6257test_array [0] = 0
6258
6259 ;
6260 return 0;
6261}
6262_ACEOF
6263rm -f conftest.$ac_objext
6264if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006265 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006266 ac_status=$?
6267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6268 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006269 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006270 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6271 (eval $ac_try) 2>&5
6272 ac_status=$?
6273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6274 (exit $ac_status); }; }; then
6275 ac_lo=$ac_mid; break
6276else
6277 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006278sed 's/^/| /' conftest.$ac_ext >&5
6279
Martin v. Löwis11437992002-04-12 09:54:03 +00006280ac_hi=`expr '(' $ac_mid ')' - 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006281 if test $ac_mid -le $ac_hi; then
6282 ac_lo= ac_hi=
6283 break
6284 fi
6285 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006286fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006287rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006288 done
6289else
6290 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006291sed 's/^/| /' conftest.$ac_ext >&5
6292
Martin v. Löwis11437992002-04-12 09:54:03 +00006293ac_lo= ac_hi=
6294fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006295rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006296fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006297rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006298# Binary search between lo and hi bounds.
6299while test "x$ac_lo" != "x$ac_hi"; do
6300 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6301 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006302#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006303/* confdefs.h. */
6304_ACEOF
6305cat confdefs.h >>conftest.$ac_ext
6306cat >>conftest.$ac_ext <<_ACEOF
6307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006308$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006309int
6310main ()
6311{
6312static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6313test_array [0] = 0
6314
6315 ;
6316 return 0;
6317}
6318_ACEOF
6319rm -f conftest.$ac_objext
6320if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006321 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006322 ac_status=$?
6323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6324 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006325 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6327 (eval $ac_try) 2>&5
6328 ac_status=$?
6329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6330 (exit $ac_status); }; }; then
6331 ac_hi=$ac_mid
6332else
6333 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006334sed 's/^/| /' conftest.$ac_ext >&5
6335
Martin v. Löwis11437992002-04-12 09:54:03 +00006336ac_lo=`expr '(' $ac_mid ')' + 1`
6337fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006338rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006339done
6340case $ac_lo in
6341?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006342'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6343See \`config.log' for more details." >&5
6344echo "$as_me: error: cannot compute sizeof (long), 77
6345See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006346 { (exit 1); exit 1; }; } ;;
6347esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006348else
6349 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006350 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6351See \`config.log' for more details." >&5
6352echo "$as_me: error: cannot run test program while cross compiling
6353See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006354 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006355else
Martin v. Löwis11437992002-04-12 09:54:03 +00006356 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006357#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006358/* confdefs.h. */
6359_ACEOF
6360cat confdefs.h >>conftest.$ac_ext
6361cat >>conftest.$ac_ext <<_ACEOF
6362/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006363$ac_includes_default
6364long longval () { return (long) (sizeof (long)); }
6365unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006366#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006367#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006368int
6369main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006370{
Martin v. Löwis11437992002-04-12 09:54:03 +00006371
6372 FILE *f = fopen ("conftest.val", "w");
6373 if (! f)
6374 exit (1);
6375 if (((long) (sizeof (long))) < 0)
6376 {
6377 long i = longval ();
6378 if (i != ((long) (sizeof (long))))
6379 exit (1);
6380 fprintf (f, "%ld\n", i);
6381 }
6382 else
6383 {
6384 unsigned long i = ulongval ();
6385 if (i != ((long) (sizeof (long))))
6386 exit (1);
6387 fprintf (f, "%lu\n", i);
6388 }
6389 exit (ferror (f) || fclose (f) != 0);
6390
6391 ;
6392 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006393}
Martin v. Löwis11437992002-04-12 09:54:03 +00006394_ACEOF
6395rm -f conftest$ac_exeext
6396if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6397 (eval $ac_link) 2>&5
6398 ac_status=$?
6399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6400 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6402 (eval $ac_try) 2>&5
6403 ac_status=$?
6404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6405 (exit $ac_status); }; }; then
6406 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006407else
Martin v. Löwis11437992002-04-12 09:54:03 +00006408 echo "$as_me: program exited with status $ac_status" >&5
6409echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006410sed 's/^/| /' conftest.$ac_ext >&5
6411
Martin v. Löwis11437992002-04-12 09:54:03 +00006412( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006413{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6414See \`config.log' for more details." >&5
6415echo "$as_me: error: cannot compute sizeof (long), 77
6416See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006417 { (exit 1); exit 1; }; }
6418fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006419rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006420fi
6421fi
6422rm -f conftest.val
6423else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006424 ac_cv_sizeof_long=0
6425fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006426fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006427echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6428echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6429cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006430#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006431_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006432
6433
Martin v. Löwis11437992002-04-12 09:54:03 +00006434echo "$as_me:$LINENO: checking for void *" >&5
6435echo $ECHO_N "checking for void *... $ECHO_C" >&6
6436if test "${ac_cv_type_void_p+set}" = set; then
6437 echo $ECHO_N "(cached) $ECHO_C" >&6
6438else
6439 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006440#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006441/* confdefs.h. */
6442_ACEOF
6443cat confdefs.h >>conftest.$ac_ext
6444cat >>conftest.$ac_ext <<_ACEOF
6445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006446$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006447int
6448main ()
6449{
6450if ((void * *) 0)
6451 return 0;
6452if (sizeof (void *))
6453 return 0;
6454 ;
6455 return 0;
6456}
6457_ACEOF
6458rm -f conftest.$ac_objext
6459if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006460 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006461 ac_status=$?
6462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6463 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006464 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006465 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6466 (eval $ac_try) 2>&5
6467 ac_status=$?
6468 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6469 (exit $ac_status); }; }; then
6470 ac_cv_type_void_p=yes
6471else
6472 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006473sed 's/^/| /' conftest.$ac_ext >&5
6474
Martin v. Löwis11437992002-04-12 09:54:03 +00006475ac_cv_type_void_p=no
6476fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006477rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006478fi
6479echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6480echo "${ECHO_T}$ac_cv_type_void_p" >&6
6481
6482echo "$as_me:$LINENO: checking size of void *" >&5
6483echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6484if test "${ac_cv_sizeof_void_p+set}" = set; then
6485 echo $ECHO_N "(cached) $ECHO_C" >&6
6486else
6487 if test "$ac_cv_type_void_p" = yes; then
6488 # The cast to unsigned long works around a bug in the HP C Compiler
6489 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6490 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6491 # This bug is HP SR number 8606223364.
6492 if test "$cross_compiling" = yes; then
6493 # Depending upon the size, compute the lo and hi bounds.
6494cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006495#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006496/* confdefs.h. */
6497_ACEOF
6498cat confdefs.h >>conftest.$ac_ext
6499cat >>conftest.$ac_ext <<_ACEOF
6500/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006501$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006502int
6503main ()
6504{
6505static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6506test_array [0] = 0
6507
6508 ;
6509 return 0;
6510}
6511_ACEOF
6512rm -f conftest.$ac_objext
6513if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006514 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006515 ac_status=$?
6516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6517 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006518 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6520 (eval $ac_try) 2>&5
6521 ac_status=$?
6522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6523 (exit $ac_status); }; }; then
6524 ac_lo=0 ac_mid=0
6525 while :; do
6526 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006527#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006528/* confdefs.h. */
6529_ACEOF
6530cat confdefs.h >>conftest.$ac_ext
6531cat >>conftest.$ac_ext <<_ACEOF
6532/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006533$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006534int
6535main ()
6536{
6537static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6538test_array [0] = 0
6539
6540 ;
6541 return 0;
6542}
6543_ACEOF
6544rm -f conftest.$ac_objext
6545if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006546 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006547 ac_status=$?
6548 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6549 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006550 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006551 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6552 (eval $ac_try) 2>&5
6553 ac_status=$?
6554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6555 (exit $ac_status); }; }; then
6556 ac_hi=$ac_mid; break
6557else
6558 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006559sed 's/^/| /' conftest.$ac_ext >&5
6560
Martin v. Löwis11437992002-04-12 09:54:03 +00006561ac_lo=`expr $ac_mid + 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006562 if test $ac_lo -le $ac_mid; then
6563 ac_lo= ac_hi=
6564 break
6565 fi
6566 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006567fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006568rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006569 done
6570else
6571 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006572sed 's/^/| /' conftest.$ac_ext >&5
6573
Martin v. Löwis11437992002-04-12 09:54:03 +00006574cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006575#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006576/* confdefs.h. */
6577_ACEOF
6578cat confdefs.h >>conftest.$ac_ext
6579cat >>conftest.$ac_ext <<_ACEOF
6580/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006581$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006582int
6583main ()
6584{
6585static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6586test_array [0] = 0
6587
6588 ;
6589 return 0;
6590}
6591_ACEOF
6592rm -f conftest.$ac_objext
6593if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006594 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006595 ac_status=$?
6596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6597 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006598 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006599 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6600 (eval $ac_try) 2>&5
6601 ac_status=$?
6602 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6603 (exit $ac_status); }; }; then
6604 ac_hi=-1 ac_mid=-1
6605 while :; do
6606 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006607#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006608/* confdefs.h. */
6609_ACEOF
6610cat confdefs.h >>conftest.$ac_ext
6611cat >>conftest.$ac_ext <<_ACEOF
6612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006613$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006614int
6615main ()
6616{
6617static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6618test_array [0] = 0
6619
6620 ;
6621 return 0;
6622}
6623_ACEOF
6624rm -f conftest.$ac_objext
6625if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006626 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006627 ac_status=$?
6628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6629 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006630 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006631 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6632 (eval $ac_try) 2>&5
6633 ac_status=$?
6634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6635 (exit $ac_status); }; }; then
6636 ac_lo=$ac_mid; break
6637else
6638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006639sed 's/^/| /' conftest.$ac_ext >&5
6640
Martin v. Löwis11437992002-04-12 09:54:03 +00006641ac_hi=`expr '(' $ac_mid ')' - 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006642 if test $ac_mid -le $ac_hi; then
6643 ac_lo= ac_hi=
6644 break
6645 fi
6646 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006647fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006648rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006649 done
6650else
6651 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006652sed 's/^/| /' conftest.$ac_ext >&5
6653
Martin v. Löwis11437992002-04-12 09:54:03 +00006654ac_lo= ac_hi=
6655fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006656rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006657fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006658rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006659# Binary search between lo and hi bounds.
6660while test "x$ac_lo" != "x$ac_hi"; do
6661 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6662 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006663#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006664/* confdefs.h. */
6665_ACEOF
6666cat confdefs.h >>conftest.$ac_ext
6667cat >>conftest.$ac_ext <<_ACEOF
6668/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006669$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006670int
6671main ()
6672{
6673static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6674test_array [0] = 0
6675
6676 ;
6677 return 0;
6678}
6679_ACEOF
6680rm -f conftest.$ac_objext
6681if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006682 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006683 ac_status=$?
6684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6685 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006686 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006687 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6688 (eval $ac_try) 2>&5
6689 ac_status=$?
6690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6691 (exit $ac_status); }; }; then
6692 ac_hi=$ac_mid
6693else
6694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006695sed 's/^/| /' conftest.$ac_ext >&5
6696
Martin v. Löwis11437992002-04-12 09:54:03 +00006697ac_lo=`expr '(' $ac_mid ')' + 1`
6698fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006699rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006700done
6701case $ac_lo in
6702?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006703'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6704See \`config.log' for more details." >&5
6705echo "$as_me: error: cannot compute sizeof (void *), 77
6706See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006707 { (exit 1); exit 1; }; } ;;
6708esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006709else
6710 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006711 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6712See \`config.log' for more details." >&5
6713echo "$as_me: error: cannot run test program while cross compiling
6714See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006715 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006716else
Martin v. Löwis11437992002-04-12 09:54:03 +00006717 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006718#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006719/* confdefs.h. */
6720_ACEOF
6721cat confdefs.h >>conftest.$ac_ext
6722cat >>conftest.$ac_ext <<_ACEOF
6723/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006724$ac_includes_default
6725long longval () { return (long) (sizeof (void *)); }
6726unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006727#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006728#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006729int
6730main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006731{
Martin v. Löwis11437992002-04-12 09:54:03 +00006732
6733 FILE *f = fopen ("conftest.val", "w");
6734 if (! f)
6735 exit (1);
6736 if (((long) (sizeof (void *))) < 0)
6737 {
6738 long i = longval ();
6739 if (i != ((long) (sizeof (void *))))
6740 exit (1);
6741 fprintf (f, "%ld\n", i);
6742 }
6743 else
6744 {
6745 unsigned long i = ulongval ();
6746 if (i != ((long) (sizeof (void *))))
6747 exit (1);
6748 fprintf (f, "%lu\n", i);
6749 }
6750 exit (ferror (f) || fclose (f) != 0);
6751
6752 ;
6753 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006754}
Martin v. Löwis11437992002-04-12 09:54:03 +00006755_ACEOF
6756rm -f conftest$ac_exeext
6757if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6758 (eval $ac_link) 2>&5
6759 ac_status=$?
6760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6761 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6763 (eval $ac_try) 2>&5
6764 ac_status=$?
6765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6766 (exit $ac_status); }; }; then
6767 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006768else
Martin v. Löwis11437992002-04-12 09:54:03 +00006769 echo "$as_me: program exited with status $ac_status" >&5
6770echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006771sed 's/^/| /' conftest.$ac_ext >&5
6772
Martin v. Löwis11437992002-04-12 09:54:03 +00006773( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006774{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6775See \`config.log' for more details." >&5
6776echo "$as_me: error: cannot compute sizeof (void *), 77
6777See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006778 { (exit 1); exit 1; }; }
6779fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006780rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006781fi
6782fi
6783rm -f conftest.val
6784else
Guido van Rossumad678af1998-10-02 14:42:15 +00006785 ac_cv_sizeof_void_p=0
6786fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006787fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006788echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6789echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6790cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006791#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006792_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006793
6794
Martin v. Löwis11437992002-04-12 09:54:03 +00006795echo "$as_me:$LINENO: checking for short" >&5
6796echo $ECHO_N "checking for short... $ECHO_C" >&6
6797if test "${ac_cv_type_short+set}" = set; then
6798 echo $ECHO_N "(cached) $ECHO_C" >&6
6799else
6800 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006801#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006802/* confdefs.h. */
6803_ACEOF
6804cat confdefs.h >>conftest.$ac_ext
6805cat >>conftest.$ac_ext <<_ACEOF
6806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006807$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006808int
6809main ()
6810{
6811if ((short *) 0)
6812 return 0;
6813if (sizeof (short))
6814 return 0;
6815 ;
6816 return 0;
6817}
6818_ACEOF
6819rm -f conftest.$ac_objext
6820if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006821 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006822 ac_status=$?
6823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6824 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006825 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006826 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6827 (eval $ac_try) 2>&5
6828 ac_status=$?
6829 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6830 (exit $ac_status); }; }; then
6831 ac_cv_type_short=yes
6832else
6833 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006834sed 's/^/| /' conftest.$ac_ext >&5
6835
Martin v. Löwis11437992002-04-12 09:54:03 +00006836ac_cv_type_short=no
6837fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006838rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006839fi
6840echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6841echo "${ECHO_T}$ac_cv_type_short" >&6
6842
6843echo "$as_me:$LINENO: checking size of short" >&5
6844echo $ECHO_N "checking size of short... $ECHO_C" >&6
6845if test "${ac_cv_sizeof_short+set}" = set; then
6846 echo $ECHO_N "(cached) $ECHO_C" >&6
6847else
6848 if test "$ac_cv_type_short" = yes; then
6849 # The cast to unsigned long works around a bug in the HP C Compiler
6850 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6851 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6852 # This bug is HP SR number 8606223364.
6853 if test "$cross_compiling" = yes; then
6854 # Depending upon the size, compute the lo and hi bounds.
6855cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006856#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006857/* confdefs.h. */
6858_ACEOF
6859cat confdefs.h >>conftest.$ac_ext
6860cat >>conftest.$ac_ext <<_ACEOF
6861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006862$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006863int
6864main ()
6865{
6866static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6867test_array [0] = 0
6868
6869 ;
6870 return 0;
6871}
6872_ACEOF
6873rm -f conftest.$ac_objext
6874if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006875 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006876 ac_status=$?
6877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6878 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006879 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6881 (eval $ac_try) 2>&5
6882 ac_status=$?
6883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6884 (exit $ac_status); }; }; then
6885 ac_lo=0 ac_mid=0
6886 while :; do
6887 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006888#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006889/* confdefs.h. */
6890_ACEOF
6891cat confdefs.h >>conftest.$ac_ext
6892cat >>conftest.$ac_ext <<_ACEOF
6893/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006894$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006895int
6896main ()
6897{
6898static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6899test_array [0] = 0
6900
6901 ;
6902 return 0;
6903}
6904_ACEOF
6905rm -f conftest.$ac_objext
6906if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006907 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006908 ac_status=$?
6909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6910 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006911 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
6917 ac_hi=$ac_mid; break
6918else
6919 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006920sed 's/^/| /' conftest.$ac_ext >&5
6921
Martin v. Löwis11437992002-04-12 09:54:03 +00006922ac_lo=`expr $ac_mid + 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006923 if test $ac_lo -le $ac_mid; then
6924 ac_lo= ac_hi=
6925 break
6926 fi
6927 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006928fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006929rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006930 done
6931else
6932 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006933sed 's/^/| /' conftest.$ac_ext >&5
6934
Martin v. Löwis11437992002-04-12 09:54:03 +00006935cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006936#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006937/* confdefs.h. */
6938_ACEOF
6939cat confdefs.h >>conftest.$ac_ext
6940cat >>conftest.$ac_ext <<_ACEOF
6941/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006942$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006943int
6944main ()
6945{
6946static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6947test_array [0] = 0
6948
6949 ;
6950 return 0;
6951}
6952_ACEOF
6953rm -f conftest.$ac_objext
6954if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006955 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006956 ac_status=$?
6957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6958 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006959 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006960 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6961 (eval $ac_try) 2>&5
6962 ac_status=$?
6963 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6964 (exit $ac_status); }; }; then
6965 ac_hi=-1 ac_mid=-1
6966 while :; do
6967 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006968#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006969/* confdefs.h. */
6970_ACEOF
6971cat confdefs.h >>conftest.$ac_ext
6972cat >>conftest.$ac_ext <<_ACEOF
6973/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006974$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006975int
6976main ()
6977{
6978static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6979test_array [0] = 0
6980
6981 ;
6982 return 0;
6983}
6984_ACEOF
6985rm -f conftest.$ac_objext
6986if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006987 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006988 ac_status=$?
6989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6990 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006991 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006992 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6993 (eval $ac_try) 2>&5
6994 ac_status=$?
6995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6996 (exit $ac_status); }; }; then
6997 ac_lo=$ac_mid; break
6998else
6999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007000sed 's/^/| /' conftest.$ac_ext >&5
7001
Martin v. Löwis11437992002-04-12 09:54:03 +00007002ac_hi=`expr '(' $ac_mid ')' - 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007003 if test $ac_mid -le $ac_hi; then
7004 ac_lo= ac_hi=
7005 break
7006 fi
7007 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007008fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007009rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007010 done
7011else
7012 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007013sed 's/^/| /' conftest.$ac_ext >&5
7014
Martin v. Löwis11437992002-04-12 09:54:03 +00007015ac_lo= ac_hi=
7016fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007017rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007018fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007019rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007020# Binary search between lo and hi bounds.
7021while test "x$ac_lo" != "x$ac_hi"; do
7022 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7023 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007024#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007025/* confdefs.h. */
7026_ACEOF
7027cat confdefs.h >>conftest.$ac_ext
7028cat >>conftest.$ac_ext <<_ACEOF
7029/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007030$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007031int
7032main ()
7033{
7034static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7035test_array [0] = 0
7036
7037 ;
7038 return 0;
7039}
7040_ACEOF
7041rm -f conftest.$ac_objext
7042if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007043 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007044 ac_status=$?
7045 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7046 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007047 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007048 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7049 (eval $ac_try) 2>&5
7050 ac_status=$?
7051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7052 (exit $ac_status); }; }; then
7053 ac_hi=$ac_mid
7054else
7055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007056sed 's/^/| /' conftest.$ac_ext >&5
7057
Martin v. Löwis11437992002-04-12 09:54:03 +00007058ac_lo=`expr '(' $ac_mid ')' + 1`
7059fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007060rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007061done
7062case $ac_lo in
7063?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007064'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7065See \`config.log' for more details." >&5
7066echo "$as_me: error: cannot compute sizeof (short), 77
7067See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007068 { (exit 1); exit 1; }; } ;;
7069esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007070else
7071 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007072 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7073See \`config.log' for more details." >&5
7074echo "$as_me: error: cannot run test program while cross compiling
7075See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007076 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007077else
Martin v. Löwis11437992002-04-12 09:54:03 +00007078 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007079#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007080/* confdefs.h. */
7081_ACEOF
7082cat confdefs.h >>conftest.$ac_ext
7083cat >>conftest.$ac_ext <<_ACEOF
7084/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007085$ac_includes_default
7086long longval () { return (long) (sizeof (short)); }
7087unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007088#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007089#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007090int
7091main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007092{
Martin v. Löwis11437992002-04-12 09:54:03 +00007093
7094 FILE *f = fopen ("conftest.val", "w");
7095 if (! f)
7096 exit (1);
7097 if (((long) (sizeof (short))) < 0)
7098 {
7099 long i = longval ();
7100 if (i != ((long) (sizeof (short))))
7101 exit (1);
7102 fprintf (f, "%ld\n", i);
7103 }
7104 else
7105 {
7106 unsigned long i = ulongval ();
7107 if (i != ((long) (sizeof (short))))
7108 exit (1);
7109 fprintf (f, "%lu\n", i);
7110 }
7111 exit (ferror (f) || fclose (f) != 0);
7112
7113 ;
7114 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007115}
Martin v. Löwis11437992002-04-12 09:54:03 +00007116_ACEOF
7117rm -f conftest$ac_exeext
7118if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7119 (eval $ac_link) 2>&5
7120 ac_status=$?
7121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7122 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7124 (eval $ac_try) 2>&5
7125 ac_status=$?
7126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7127 (exit $ac_status); }; }; then
7128 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007129else
Martin v. Löwis11437992002-04-12 09:54:03 +00007130 echo "$as_me: program exited with status $ac_status" >&5
7131echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007132sed 's/^/| /' conftest.$ac_ext >&5
7133
Martin v. Löwis11437992002-04-12 09:54:03 +00007134( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007135{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7136See \`config.log' for more details." >&5
7137echo "$as_me: error: cannot compute sizeof (short), 77
7138See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007139 { (exit 1); exit 1; }; }
7140fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007141rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007142fi
7143fi
7144rm -f conftest.val
7145else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007146 ac_cv_sizeof_short=0
7147fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007148fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007149echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7150echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7151cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007152#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007153_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007154
7155
Martin v. Löwis11437992002-04-12 09:54:03 +00007156echo "$as_me:$LINENO: checking for float" >&5
7157echo $ECHO_N "checking for float... $ECHO_C" >&6
7158if test "${ac_cv_type_float+set}" = set; then
7159 echo $ECHO_N "(cached) $ECHO_C" >&6
7160else
7161 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007162#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007163/* confdefs.h. */
7164_ACEOF
7165cat confdefs.h >>conftest.$ac_ext
7166cat >>conftest.$ac_ext <<_ACEOF
7167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007168$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007169int
7170main ()
7171{
7172if ((float *) 0)
7173 return 0;
7174if (sizeof (float))
7175 return 0;
7176 ;
7177 return 0;
7178}
7179_ACEOF
7180rm -f conftest.$ac_objext
7181if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007182 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007183 ac_status=$?
7184 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7185 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007186 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007187 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7188 (eval $ac_try) 2>&5
7189 ac_status=$?
7190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7191 (exit $ac_status); }; }; then
7192 ac_cv_type_float=yes
7193else
7194 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007195sed 's/^/| /' conftest.$ac_ext >&5
7196
Martin v. Löwis11437992002-04-12 09:54:03 +00007197ac_cv_type_float=no
7198fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007199rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007200fi
7201echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7202echo "${ECHO_T}$ac_cv_type_float" >&6
7203
7204echo "$as_me:$LINENO: checking size of float" >&5
7205echo $ECHO_N "checking size of float... $ECHO_C" >&6
7206if test "${ac_cv_sizeof_float+set}" = set; then
7207 echo $ECHO_N "(cached) $ECHO_C" >&6
7208else
7209 if test "$ac_cv_type_float" = yes; then
7210 # The cast to unsigned long works around a bug in the HP C Compiler
7211 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7212 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7213 # This bug is HP SR number 8606223364.
7214 if test "$cross_compiling" = yes; then
7215 # Depending upon the size, compute the lo and hi bounds.
7216cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007217#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007218/* confdefs.h. */
7219_ACEOF
7220cat confdefs.h >>conftest.$ac_ext
7221cat >>conftest.$ac_ext <<_ACEOF
7222/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007223$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007224int
7225main ()
7226{
7227static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7228test_array [0] = 0
7229
7230 ;
7231 return 0;
7232}
7233_ACEOF
7234rm -f conftest.$ac_objext
7235if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007236 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007237 ac_status=$?
7238 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7239 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007240 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007241 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7242 (eval $ac_try) 2>&5
7243 ac_status=$?
7244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7245 (exit $ac_status); }; }; then
7246 ac_lo=0 ac_mid=0
7247 while :; do
7248 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007249#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007250/* confdefs.h. */
7251_ACEOF
7252cat confdefs.h >>conftest.$ac_ext
7253cat >>conftest.$ac_ext <<_ACEOF
7254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007255$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007256int
7257main ()
7258{
7259static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7260test_array [0] = 0
7261
7262 ;
7263 return 0;
7264}
7265_ACEOF
7266rm -f conftest.$ac_objext
7267if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007268 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007269 ac_status=$?
7270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7271 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007272 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7274 (eval $ac_try) 2>&5
7275 ac_status=$?
7276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7277 (exit $ac_status); }; }; then
7278 ac_hi=$ac_mid; break
7279else
7280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007281sed 's/^/| /' conftest.$ac_ext >&5
7282
Martin v. Löwis11437992002-04-12 09:54:03 +00007283ac_lo=`expr $ac_mid + 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007284 if test $ac_lo -le $ac_mid; then
7285 ac_lo= ac_hi=
7286 break
7287 fi
7288 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007289fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007290rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007291 done
7292else
7293 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007294sed 's/^/| /' conftest.$ac_ext >&5
7295
Martin v. Löwis11437992002-04-12 09:54:03 +00007296cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007297#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007298/* confdefs.h. */
7299_ACEOF
7300cat confdefs.h >>conftest.$ac_ext
7301cat >>conftest.$ac_ext <<_ACEOF
7302/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007303$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007304int
7305main ()
7306{
7307static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7308test_array [0] = 0
7309
7310 ;
7311 return 0;
7312}
7313_ACEOF
7314rm -f conftest.$ac_objext
7315if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007316 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007317 ac_status=$?
7318 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7319 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007320 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007321 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7322 (eval $ac_try) 2>&5
7323 ac_status=$?
7324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7325 (exit $ac_status); }; }; then
7326 ac_hi=-1 ac_mid=-1
7327 while :; do
7328 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007329#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007330/* confdefs.h. */
7331_ACEOF
7332cat confdefs.h >>conftest.$ac_ext
7333cat >>conftest.$ac_ext <<_ACEOF
7334/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007335$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007336int
7337main ()
7338{
7339static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7340test_array [0] = 0
7341
7342 ;
7343 return 0;
7344}
7345_ACEOF
7346rm -f conftest.$ac_objext
7347if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007348 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007349 ac_status=$?
7350 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7351 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007352 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007353 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7354 (eval $ac_try) 2>&5
7355 ac_status=$?
7356 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7357 (exit $ac_status); }; }; then
7358 ac_lo=$ac_mid; break
7359else
7360 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007361sed 's/^/| /' conftest.$ac_ext >&5
7362
Martin v. Löwis11437992002-04-12 09:54:03 +00007363ac_hi=`expr '(' $ac_mid ')' - 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007364 if test $ac_mid -le $ac_hi; then
7365 ac_lo= ac_hi=
7366 break
7367 fi
7368 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007369fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007370rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007371 done
7372else
7373 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007374sed 's/^/| /' conftest.$ac_ext >&5
7375
Martin v. Löwis11437992002-04-12 09:54:03 +00007376ac_lo= ac_hi=
7377fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007378rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007379fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007380rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007381# Binary search between lo and hi bounds.
7382while test "x$ac_lo" != "x$ac_hi"; do
7383 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7384 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007385#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007386/* confdefs.h. */
7387_ACEOF
7388cat confdefs.h >>conftest.$ac_ext
7389cat >>conftest.$ac_ext <<_ACEOF
7390/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007391$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007392int
7393main ()
7394{
7395static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7396test_array [0] = 0
7397
7398 ;
7399 return 0;
7400}
7401_ACEOF
7402rm -f conftest.$ac_objext
7403if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007404 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007405 ac_status=$?
7406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7407 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007408 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007409 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7410 (eval $ac_try) 2>&5
7411 ac_status=$?
7412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7413 (exit $ac_status); }; }; then
7414 ac_hi=$ac_mid
7415else
7416 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007417sed 's/^/| /' conftest.$ac_ext >&5
7418
Martin v. Löwis11437992002-04-12 09:54:03 +00007419ac_lo=`expr '(' $ac_mid ')' + 1`
7420fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007421rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007422done
7423case $ac_lo in
7424?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007425'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7426See \`config.log' for more details." >&5
7427echo "$as_me: error: cannot compute sizeof (float), 77
7428See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007429 { (exit 1); exit 1; }; } ;;
7430esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007431else
7432 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007433 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7434See \`config.log' for more details." >&5
7435echo "$as_me: error: cannot run test program while cross compiling
7436See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007437 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007438else
Martin v. Löwis11437992002-04-12 09:54:03 +00007439 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007440#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007441/* confdefs.h. */
7442_ACEOF
7443cat confdefs.h >>conftest.$ac_ext
7444cat >>conftest.$ac_ext <<_ACEOF
7445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007446$ac_includes_default
7447long longval () { return (long) (sizeof (float)); }
7448unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007449#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007450#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007451int
7452main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007453{
Martin v. Löwis11437992002-04-12 09:54:03 +00007454
7455 FILE *f = fopen ("conftest.val", "w");
7456 if (! f)
7457 exit (1);
7458 if (((long) (sizeof (float))) < 0)
7459 {
7460 long i = longval ();
7461 if (i != ((long) (sizeof (float))))
7462 exit (1);
7463 fprintf (f, "%ld\n", i);
7464 }
7465 else
7466 {
7467 unsigned long i = ulongval ();
7468 if (i != ((long) (sizeof (float))))
7469 exit (1);
7470 fprintf (f, "%lu\n", i);
7471 }
7472 exit (ferror (f) || fclose (f) != 0);
7473
7474 ;
7475 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007476}
Martin v. Löwis11437992002-04-12 09:54:03 +00007477_ACEOF
7478rm -f conftest$ac_exeext
7479if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7480 (eval $ac_link) 2>&5
7481 ac_status=$?
7482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7483 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7484 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7485 (eval $ac_try) 2>&5
7486 ac_status=$?
7487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7488 (exit $ac_status); }; }; then
7489 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007490else
Martin v. Löwis11437992002-04-12 09:54:03 +00007491 echo "$as_me: program exited with status $ac_status" >&5
7492echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007493sed 's/^/| /' conftest.$ac_ext >&5
7494
Martin v. Löwis11437992002-04-12 09:54:03 +00007495( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007496{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7497See \`config.log' for more details." >&5
7498echo "$as_me: error: cannot compute sizeof (float), 77
7499See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007500 { (exit 1); exit 1; }; }
7501fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007502rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007503fi
7504fi
7505rm -f conftest.val
7506else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007507 ac_cv_sizeof_float=0
7508fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007509fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007510echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7511echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7512cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007513#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007514_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007515
7516
Martin v. Löwis11437992002-04-12 09:54:03 +00007517echo "$as_me:$LINENO: checking for double" >&5
7518echo $ECHO_N "checking for double... $ECHO_C" >&6
7519if test "${ac_cv_type_double+set}" = set; then
7520 echo $ECHO_N "(cached) $ECHO_C" >&6
7521else
7522 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007523#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007524/* confdefs.h. */
7525_ACEOF
7526cat confdefs.h >>conftest.$ac_ext
7527cat >>conftest.$ac_ext <<_ACEOF
7528/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007529$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007530int
7531main ()
7532{
7533if ((double *) 0)
7534 return 0;
7535if (sizeof (double))
7536 return 0;
7537 ;
7538 return 0;
7539}
7540_ACEOF
7541rm -f conftest.$ac_objext
7542if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007543 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007544 ac_status=$?
7545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7546 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007547 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007548 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7549 (eval $ac_try) 2>&5
7550 ac_status=$?
7551 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7552 (exit $ac_status); }; }; then
7553 ac_cv_type_double=yes
7554else
7555 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007556sed 's/^/| /' conftest.$ac_ext >&5
7557
Martin v. Löwis11437992002-04-12 09:54:03 +00007558ac_cv_type_double=no
7559fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007560rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007561fi
7562echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7563echo "${ECHO_T}$ac_cv_type_double" >&6
7564
7565echo "$as_me:$LINENO: checking size of double" >&5
7566echo $ECHO_N "checking size of double... $ECHO_C" >&6
7567if test "${ac_cv_sizeof_double+set}" = set; then
7568 echo $ECHO_N "(cached) $ECHO_C" >&6
7569else
7570 if test "$ac_cv_type_double" = yes; then
7571 # The cast to unsigned long works around a bug in the HP C Compiler
7572 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7573 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7574 # This bug is HP SR number 8606223364.
7575 if test "$cross_compiling" = yes; then
7576 # Depending upon the size, compute the lo and hi bounds.
7577cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007578#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007579/* confdefs.h. */
7580_ACEOF
7581cat confdefs.h >>conftest.$ac_ext
7582cat >>conftest.$ac_ext <<_ACEOF
7583/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007584$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007585int
7586main ()
7587{
7588static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7589test_array [0] = 0
7590
7591 ;
7592 return 0;
7593}
7594_ACEOF
7595rm -f conftest.$ac_objext
7596if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007597 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007598 ac_status=$?
7599 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7600 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007601 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007602 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7603 (eval $ac_try) 2>&5
7604 ac_status=$?
7605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7606 (exit $ac_status); }; }; then
7607 ac_lo=0 ac_mid=0
7608 while :; do
7609 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007610#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007611/* confdefs.h. */
7612_ACEOF
7613cat confdefs.h >>conftest.$ac_ext
7614cat >>conftest.$ac_ext <<_ACEOF
7615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007616$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007617int
7618main ()
7619{
7620static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7621test_array [0] = 0
7622
7623 ;
7624 return 0;
7625}
7626_ACEOF
7627rm -f conftest.$ac_objext
7628if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007629 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007630 ac_status=$?
7631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7632 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007633 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007634 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7635 (eval $ac_try) 2>&5
7636 ac_status=$?
7637 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7638 (exit $ac_status); }; }; then
7639 ac_hi=$ac_mid; break
7640else
7641 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007642sed 's/^/| /' conftest.$ac_ext >&5
7643
Martin v. Löwis11437992002-04-12 09:54:03 +00007644ac_lo=`expr $ac_mid + 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007645 if test $ac_lo -le $ac_mid; then
7646 ac_lo= ac_hi=
7647 break
7648 fi
7649 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007650fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007651rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007652 done
7653else
7654 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007655sed 's/^/| /' conftest.$ac_ext >&5
7656
Martin v. Löwis11437992002-04-12 09:54:03 +00007657cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007658#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007659/* confdefs.h. */
7660_ACEOF
7661cat confdefs.h >>conftest.$ac_ext
7662cat >>conftest.$ac_ext <<_ACEOF
7663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007664$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007665int
7666main ()
7667{
7668static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7669test_array [0] = 0
7670
7671 ;
7672 return 0;
7673}
7674_ACEOF
7675rm -f conftest.$ac_objext
7676if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007677 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007678 ac_status=$?
7679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7680 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007681 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7683 (eval $ac_try) 2>&5
7684 ac_status=$?
7685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7686 (exit $ac_status); }; }; then
7687 ac_hi=-1 ac_mid=-1
7688 while :; do
7689 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007690#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007691/* confdefs.h. */
7692_ACEOF
7693cat confdefs.h >>conftest.$ac_ext
7694cat >>conftest.$ac_ext <<_ACEOF
7695/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007696$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007697int
7698main ()
7699{
7700static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7701test_array [0] = 0
7702
7703 ;
7704 return 0;
7705}
7706_ACEOF
7707rm -f conftest.$ac_objext
7708if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007709 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007710 ac_status=$?
7711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7712 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007713 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7715 (eval $ac_try) 2>&5
7716 ac_status=$?
7717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7718 (exit $ac_status); }; }; then
7719 ac_lo=$ac_mid; break
7720else
7721 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007722sed 's/^/| /' conftest.$ac_ext >&5
7723
Martin v. Löwis11437992002-04-12 09:54:03 +00007724ac_hi=`expr '(' $ac_mid ')' - 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007725 if test $ac_mid -le $ac_hi; then
7726 ac_lo= ac_hi=
7727 break
7728 fi
7729 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007730fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007731rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007732 done
7733else
7734 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007735sed 's/^/| /' conftest.$ac_ext >&5
7736
Martin v. Löwis11437992002-04-12 09:54:03 +00007737ac_lo= ac_hi=
7738fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007739rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007740fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007741rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007742# Binary search between lo and hi bounds.
7743while test "x$ac_lo" != "x$ac_hi"; do
7744 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7745 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007746#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007747/* confdefs.h. */
7748_ACEOF
7749cat confdefs.h >>conftest.$ac_ext
7750cat >>conftest.$ac_ext <<_ACEOF
7751/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007752$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007753int
7754main ()
7755{
7756static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7757test_array [0] = 0
7758
7759 ;
7760 return 0;
7761}
7762_ACEOF
7763rm -f conftest.$ac_objext
7764if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007765 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007766 ac_status=$?
7767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7768 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007769 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007770 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7771 (eval $ac_try) 2>&5
7772 ac_status=$?
7773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7774 (exit $ac_status); }; }; then
7775 ac_hi=$ac_mid
7776else
7777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007778sed 's/^/| /' conftest.$ac_ext >&5
7779
Martin v. Löwis11437992002-04-12 09:54:03 +00007780ac_lo=`expr '(' $ac_mid ')' + 1`
7781fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007782rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007783done
7784case $ac_lo in
7785?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007786'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7787See \`config.log' for more details." >&5
7788echo "$as_me: error: cannot compute sizeof (double), 77
7789See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007790 { (exit 1); exit 1; }; } ;;
7791esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007792else
7793 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007794 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7795See \`config.log' for more details." >&5
7796echo "$as_me: error: cannot run test program while cross compiling
7797See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007798 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007799else
Martin v. Löwis11437992002-04-12 09:54:03 +00007800 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007801#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007802/* confdefs.h. */
7803_ACEOF
7804cat confdefs.h >>conftest.$ac_ext
7805cat >>conftest.$ac_ext <<_ACEOF
7806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007807$ac_includes_default
7808long longval () { return (long) (sizeof (double)); }
7809unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007810#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007811#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007812int
7813main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007814{
Martin v. Löwis11437992002-04-12 09:54:03 +00007815
7816 FILE *f = fopen ("conftest.val", "w");
7817 if (! f)
7818 exit (1);
7819 if (((long) (sizeof (double))) < 0)
7820 {
7821 long i = longval ();
7822 if (i != ((long) (sizeof (double))))
7823 exit (1);
7824 fprintf (f, "%ld\n", i);
7825 }
7826 else
7827 {
7828 unsigned long i = ulongval ();
7829 if (i != ((long) (sizeof (double))))
7830 exit (1);
7831 fprintf (f, "%lu\n", i);
7832 }
7833 exit (ferror (f) || fclose (f) != 0);
7834
7835 ;
7836 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007837}
Martin v. Löwis11437992002-04-12 09:54:03 +00007838_ACEOF
7839rm -f conftest$ac_exeext
7840if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7841 (eval $ac_link) 2>&5
7842 ac_status=$?
7843 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7844 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7845 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7846 (eval $ac_try) 2>&5
7847 ac_status=$?
7848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7849 (exit $ac_status); }; }; then
7850 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007851else
Martin v. Löwis11437992002-04-12 09:54:03 +00007852 echo "$as_me: program exited with status $ac_status" >&5
7853echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007854sed 's/^/| /' conftest.$ac_ext >&5
7855
Martin v. Löwis11437992002-04-12 09:54:03 +00007856( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007857{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7858See \`config.log' for more details." >&5
7859echo "$as_me: error: cannot compute sizeof (double), 77
7860See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007861 { (exit 1); exit 1; }; }
7862fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007863rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007864fi
7865fi
7866rm -f conftest.val
7867else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007868 ac_cv_sizeof_double=0
7869fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007870fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007871echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7872echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7873cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007874#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007875_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007876
7877
Martin v. Löwis11437992002-04-12 09:54:03 +00007878echo "$as_me:$LINENO: checking for fpos_t" >&5
7879echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7880if test "${ac_cv_type_fpos_t+set}" = set; then
7881 echo $ECHO_N "(cached) $ECHO_C" >&6
7882else
7883 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007884#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007885/* confdefs.h. */
7886_ACEOF
7887cat confdefs.h >>conftest.$ac_ext
7888cat >>conftest.$ac_ext <<_ACEOF
7889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007890$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007891int
7892main ()
7893{
7894if ((fpos_t *) 0)
7895 return 0;
7896if (sizeof (fpos_t))
7897 return 0;
7898 ;
7899 return 0;
7900}
7901_ACEOF
7902rm -f conftest.$ac_objext
7903if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007904 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007905 ac_status=$?
7906 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7907 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007908 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007909 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7910 (eval $ac_try) 2>&5
7911 ac_status=$?
7912 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7913 (exit $ac_status); }; }; then
7914 ac_cv_type_fpos_t=yes
7915else
7916 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007917sed 's/^/| /' conftest.$ac_ext >&5
7918
Martin v. Löwis11437992002-04-12 09:54:03 +00007919ac_cv_type_fpos_t=no
7920fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007921rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007922fi
7923echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7924echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7925
7926echo "$as_me:$LINENO: checking size of fpos_t" >&5
7927echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7928if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7929 echo $ECHO_N "(cached) $ECHO_C" >&6
7930else
7931 if test "$ac_cv_type_fpos_t" = yes; then
7932 # The cast to unsigned long works around a bug in the HP C Compiler
7933 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7934 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7935 # This bug is HP SR number 8606223364.
7936 if test "$cross_compiling" = yes; then
7937 # Depending upon the size, compute the lo and hi bounds.
7938cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007939#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007940/* confdefs.h. */
7941_ACEOF
7942cat confdefs.h >>conftest.$ac_ext
7943cat >>conftest.$ac_ext <<_ACEOF
7944/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007945$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007946int
7947main ()
7948{
7949static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7950test_array [0] = 0
7951
7952 ;
7953 return 0;
7954}
7955_ACEOF
7956rm -f conftest.$ac_objext
7957if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007958 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007959 ac_status=$?
7960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7961 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007962 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007963 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7964 (eval $ac_try) 2>&5
7965 ac_status=$?
7966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7967 (exit $ac_status); }; }; then
7968 ac_lo=0 ac_mid=0
7969 while :; do
7970 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007971#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007972/* confdefs.h. */
7973_ACEOF
7974cat confdefs.h >>conftest.$ac_ext
7975cat >>conftest.$ac_ext <<_ACEOF
7976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007977$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007978int
7979main ()
7980{
7981static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7982test_array [0] = 0
7983
7984 ;
7985 return 0;
7986}
7987_ACEOF
7988rm -f conftest.$ac_objext
7989if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007990 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007991 ac_status=$?
7992 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7993 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007994 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007995 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7996 (eval $ac_try) 2>&5
7997 ac_status=$?
7998 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7999 (exit $ac_status); }; }; then
8000 ac_hi=$ac_mid; break
8001else
8002 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008003sed 's/^/| /' conftest.$ac_ext >&5
8004
Martin v. Löwis11437992002-04-12 09:54:03 +00008005ac_lo=`expr $ac_mid + 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008006 if test $ac_lo -le $ac_mid; then
8007 ac_lo= ac_hi=
8008 break
8009 fi
8010 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008011fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008012rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008013 done
8014else
8015 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008016sed 's/^/| /' conftest.$ac_ext >&5
8017
Martin v. Löwis11437992002-04-12 09:54:03 +00008018cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008019#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008020/* confdefs.h. */
8021_ACEOF
8022cat confdefs.h >>conftest.$ac_ext
8023cat >>conftest.$ac_ext <<_ACEOF
8024/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008025$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008026int
8027main ()
8028{
8029static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8030test_array [0] = 0
8031
8032 ;
8033 return 0;
8034}
8035_ACEOF
8036rm -f conftest.$ac_objext
8037if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008038 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008039 ac_status=$?
8040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8041 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008042 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008043 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8044 (eval $ac_try) 2>&5
8045 ac_status=$?
8046 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8047 (exit $ac_status); }; }; then
8048 ac_hi=-1 ac_mid=-1
8049 while :; do
8050 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008051#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008052/* confdefs.h. */
8053_ACEOF
8054cat confdefs.h >>conftest.$ac_ext
8055cat >>conftest.$ac_ext <<_ACEOF
8056/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008057$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008058int
8059main ()
8060{
8061static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8062test_array [0] = 0
8063
8064 ;
8065 return 0;
8066}
8067_ACEOF
8068rm -f conftest.$ac_objext
8069if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008070 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008071 ac_status=$?
8072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8073 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008074 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008075 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8076 (eval $ac_try) 2>&5
8077 ac_status=$?
8078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8079 (exit $ac_status); }; }; then
8080 ac_lo=$ac_mid; break
8081else
8082 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008083sed 's/^/| /' conftest.$ac_ext >&5
8084
Martin v. Löwis11437992002-04-12 09:54:03 +00008085ac_hi=`expr '(' $ac_mid ')' - 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008086 if test $ac_mid -le $ac_hi; then
8087 ac_lo= ac_hi=
8088 break
8089 fi
8090 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008091fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008092rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008093 done
8094else
8095 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008096sed 's/^/| /' conftest.$ac_ext >&5
8097
Martin v. Löwis11437992002-04-12 09:54:03 +00008098ac_lo= ac_hi=
8099fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008100rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008101fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008102rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008103# Binary search between lo and hi bounds.
8104while test "x$ac_lo" != "x$ac_hi"; do
8105 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8106 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008107#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008108/* confdefs.h. */
8109_ACEOF
8110cat confdefs.h >>conftest.$ac_ext
8111cat >>conftest.$ac_ext <<_ACEOF
8112/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008113$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008114int
8115main ()
8116{
8117static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8118test_array [0] = 0
8119
8120 ;
8121 return 0;
8122}
8123_ACEOF
8124rm -f conftest.$ac_objext
8125if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008126 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008127 ac_status=$?
8128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8129 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008130 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008131 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8132 (eval $ac_try) 2>&5
8133 ac_status=$?
8134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8135 (exit $ac_status); }; }; then
8136 ac_hi=$ac_mid
8137else
8138 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008139sed 's/^/| /' conftest.$ac_ext >&5
8140
Martin v. Löwis11437992002-04-12 09:54:03 +00008141ac_lo=`expr '(' $ac_mid ')' + 1`
8142fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008143rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008144done
8145case $ac_lo in
8146?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008147'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8148See \`config.log' for more details." >&5
8149echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8150See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008151 { (exit 1); exit 1; }; } ;;
8152esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008153else
8154 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008155 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8156See \`config.log' for more details." >&5
8157echo "$as_me: error: cannot run test program while cross compiling
8158See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008159 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008160else
Martin v. Löwis11437992002-04-12 09:54:03 +00008161 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008162#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008163/* confdefs.h. */
8164_ACEOF
8165cat confdefs.h >>conftest.$ac_ext
8166cat >>conftest.$ac_ext <<_ACEOF
8167/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008168$ac_includes_default
8169long longval () { return (long) (sizeof (fpos_t)); }
8170unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008171#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008172#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008173int
8174main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008175{
Martin v. Löwis11437992002-04-12 09:54:03 +00008176
8177 FILE *f = fopen ("conftest.val", "w");
8178 if (! f)
8179 exit (1);
8180 if (((long) (sizeof (fpos_t))) < 0)
8181 {
8182 long i = longval ();
8183 if (i != ((long) (sizeof (fpos_t))))
8184 exit (1);
8185 fprintf (f, "%ld\n", i);
8186 }
8187 else
8188 {
8189 unsigned long i = ulongval ();
8190 if (i != ((long) (sizeof (fpos_t))))
8191 exit (1);
8192 fprintf (f, "%lu\n", i);
8193 }
8194 exit (ferror (f) || fclose (f) != 0);
8195
8196 ;
8197 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008198}
Martin v. Löwis11437992002-04-12 09:54:03 +00008199_ACEOF
8200rm -f conftest$ac_exeext
8201if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8202 (eval $ac_link) 2>&5
8203 ac_status=$?
8204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8205 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8206 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8207 (eval $ac_try) 2>&5
8208 ac_status=$?
8209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8210 (exit $ac_status); }; }; then
8211 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008212else
Martin v. Löwis11437992002-04-12 09:54:03 +00008213 echo "$as_me: program exited with status $ac_status" >&5
8214echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008215sed 's/^/| /' conftest.$ac_ext >&5
8216
Martin v. Löwis11437992002-04-12 09:54:03 +00008217( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008218{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8219See \`config.log' for more details." >&5
8220echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8221See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008222 { (exit 1); exit 1; }; }
8223fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008224rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008225fi
8226fi
8227rm -f conftest.val
8228else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008229 ac_cv_sizeof_fpos_t=0
8230fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008231fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008232echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8233echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8234cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008235#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008236_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008237
Michael W. Hudson54241132001-12-07 15:38:26 +00008238
8239
Martin v. Löwis11437992002-04-12 09:54:03 +00008240echo "$as_me:$LINENO: checking for long long support" >&5
8241echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008242have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008243cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008244#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008245/* confdefs.h. */
8246_ACEOF
8247cat confdefs.h >>conftest.$ac_ext
8248cat >>conftest.$ac_ext <<_ACEOF
8249/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008250
Martin v. Löwis11437992002-04-12 09:54:03 +00008251int
8252main ()
8253{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008254long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008255 ;
8256 return 0;
8257}
8258_ACEOF
8259rm -f conftest.$ac_objext
8260if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008261 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008262 ac_status=$?
8263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8264 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008265 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008266 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8267 (eval $ac_try) 2>&5
8268 ac_status=$?
8269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8270 (exit $ac_status); }; }; then
8271
8272
8273cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008274#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008275_ACEOF
8276
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008277 have_long_long=yes
8278
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008279else
Martin v. Löwis11437992002-04-12 09:54:03 +00008280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008281sed 's/^/| /' conftest.$ac_ext >&5
8282
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008283fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008284rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008285echo "$as_me:$LINENO: result: $have_long_long" >&5
8286echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008287if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008288echo "$as_me:$LINENO: checking for long long" >&5
8289echo $ECHO_N "checking for long long... $ECHO_C" >&6
8290if test "${ac_cv_type_long_long+set}" = set; then
8291 echo $ECHO_N "(cached) $ECHO_C" >&6
8292else
8293 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008294#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008295/* confdefs.h. */
8296_ACEOF
8297cat confdefs.h >>conftest.$ac_ext
8298cat >>conftest.$ac_ext <<_ACEOF
8299/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008300$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008301int
8302main ()
8303{
8304if ((long long *) 0)
8305 return 0;
8306if (sizeof (long long))
8307 return 0;
8308 ;
8309 return 0;
8310}
8311_ACEOF
8312rm -f conftest.$ac_objext
8313if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008314 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008315 ac_status=$?
8316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8317 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008318 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008319 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8320 (eval $ac_try) 2>&5
8321 ac_status=$?
8322 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8323 (exit $ac_status); }; }; then
8324 ac_cv_type_long_long=yes
8325else
8326 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008327sed 's/^/| /' conftest.$ac_ext >&5
8328
Martin v. Löwis11437992002-04-12 09:54:03 +00008329ac_cv_type_long_long=no
8330fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008331rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008332fi
8333echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8334echo "${ECHO_T}$ac_cv_type_long_long" >&6
8335
8336echo "$as_me:$LINENO: checking size of long long" >&5
8337echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8338if test "${ac_cv_sizeof_long_long+set}" = set; then
8339 echo $ECHO_N "(cached) $ECHO_C" >&6
8340else
8341 if test "$ac_cv_type_long_long" = yes; then
8342 # The cast to unsigned long works around a bug in the HP C Compiler
8343 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8344 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8345 # This bug is HP SR number 8606223364.
8346 if test "$cross_compiling" = yes; then
8347 # Depending upon the size, compute the lo and hi bounds.
8348cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008349#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008350/* confdefs.h. */
8351_ACEOF
8352cat confdefs.h >>conftest.$ac_ext
8353cat >>conftest.$ac_ext <<_ACEOF
8354/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008355$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008356int
8357main ()
8358{
8359static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8360test_array [0] = 0
8361
8362 ;
8363 return 0;
8364}
8365_ACEOF
8366rm -f conftest.$ac_objext
8367if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008368 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008369 ac_status=$?
8370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8371 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008372 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008373 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8374 (eval $ac_try) 2>&5
8375 ac_status=$?
8376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8377 (exit $ac_status); }; }; then
8378 ac_lo=0 ac_mid=0
8379 while :; do
8380 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008381#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008382/* confdefs.h. */
8383_ACEOF
8384cat confdefs.h >>conftest.$ac_ext
8385cat >>conftest.$ac_ext <<_ACEOF
8386/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008387$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008388int
8389main ()
8390{
8391static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8392test_array [0] = 0
8393
8394 ;
8395 return 0;
8396}
8397_ACEOF
8398rm -f conftest.$ac_objext
8399if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008400 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008401 ac_status=$?
8402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8403 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008404 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8406 (eval $ac_try) 2>&5
8407 ac_status=$?
8408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8409 (exit $ac_status); }; }; then
8410 ac_hi=$ac_mid; break
8411else
8412 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008413sed 's/^/| /' conftest.$ac_ext >&5
8414
Martin v. Löwis11437992002-04-12 09:54:03 +00008415ac_lo=`expr $ac_mid + 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008416 if test $ac_lo -le $ac_mid; then
8417 ac_lo= ac_hi=
8418 break
8419 fi
8420 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008421fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008422rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008423 done
8424else
8425 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008426sed 's/^/| /' conftest.$ac_ext >&5
8427
Martin v. Löwis11437992002-04-12 09:54:03 +00008428cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008429#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008430/* confdefs.h. */
8431_ACEOF
8432cat confdefs.h >>conftest.$ac_ext
8433cat >>conftest.$ac_ext <<_ACEOF
8434/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008435$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008436int
8437main ()
8438{
8439static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8440test_array [0] = 0
8441
8442 ;
8443 return 0;
8444}
8445_ACEOF
8446rm -f conftest.$ac_objext
8447if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008448 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008449 ac_status=$?
8450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8451 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008452 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8454 (eval $ac_try) 2>&5
8455 ac_status=$?
8456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8457 (exit $ac_status); }; }; then
8458 ac_hi=-1 ac_mid=-1
8459 while :; do
8460 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008461#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008462/* confdefs.h. */
8463_ACEOF
8464cat confdefs.h >>conftest.$ac_ext
8465cat >>conftest.$ac_ext <<_ACEOF
8466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008467$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008468int
8469main ()
8470{
8471static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8472test_array [0] = 0
8473
8474 ;
8475 return 0;
8476}
8477_ACEOF
8478rm -f conftest.$ac_objext
8479if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008480 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008481 ac_status=$?
8482 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8483 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008484 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008485 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8486 (eval $ac_try) 2>&5
8487 ac_status=$?
8488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8489 (exit $ac_status); }; }; then
8490 ac_lo=$ac_mid; break
8491else
8492 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008493sed 's/^/| /' conftest.$ac_ext >&5
8494
Martin v. Löwis11437992002-04-12 09:54:03 +00008495ac_hi=`expr '(' $ac_mid ')' - 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008496 if test $ac_mid -le $ac_hi; then
8497 ac_lo= ac_hi=
8498 break
8499 fi
8500 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008501fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008502rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008503 done
8504else
8505 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008506sed 's/^/| /' conftest.$ac_ext >&5
8507
Martin v. Löwis11437992002-04-12 09:54:03 +00008508ac_lo= ac_hi=
8509fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008510rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008511fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008512rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008513# Binary search between lo and hi bounds.
8514while test "x$ac_lo" != "x$ac_hi"; do
8515 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8516 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008517#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008518/* confdefs.h. */
8519_ACEOF
8520cat confdefs.h >>conftest.$ac_ext
8521cat >>conftest.$ac_ext <<_ACEOF
8522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008523$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008524int
8525main ()
8526{
8527static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8528test_array [0] = 0
8529
8530 ;
8531 return 0;
8532}
8533_ACEOF
8534rm -f conftest.$ac_objext
8535if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008536 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008537 ac_status=$?
8538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8539 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008540 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008541 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8542 (eval $ac_try) 2>&5
8543 ac_status=$?
8544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8545 (exit $ac_status); }; }; then
8546 ac_hi=$ac_mid
8547else
8548 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008549sed 's/^/| /' conftest.$ac_ext >&5
8550
Martin v. Löwis11437992002-04-12 09:54:03 +00008551ac_lo=`expr '(' $ac_mid ')' + 1`
8552fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008553rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008554done
8555case $ac_lo in
8556?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008557'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8558See \`config.log' for more details." >&5
8559echo "$as_me: error: cannot compute sizeof (long long), 77
8560See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008561 { (exit 1); exit 1; }; } ;;
8562esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008563else
8564 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008565 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8566See \`config.log' for more details." >&5
8567echo "$as_me: error: cannot run test program while cross compiling
8568See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008569 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008570else
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008572#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008573/* confdefs.h. */
8574_ACEOF
8575cat confdefs.h >>conftest.$ac_ext
8576cat >>conftest.$ac_ext <<_ACEOF
8577/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008578$ac_includes_default
8579long longval () { return (long) (sizeof (long long)); }
8580unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008581#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008582#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008583int
8584main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008585{
Martin v. Löwis11437992002-04-12 09:54:03 +00008586
8587 FILE *f = fopen ("conftest.val", "w");
8588 if (! f)
8589 exit (1);
8590 if (((long) (sizeof (long long))) < 0)
8591 {
8592 long i = longval ();
8593 if (i != ((long) (sizeof (long long))))
8594 exit (1);
8595 fprintf (f, "%ld\n", i);
8596 }
8597 else
8598 {
8599 unsigned long i = ulongval ();
8600 if (i != ((long) (sizeof (long long))))
8601 exit (1);
8602 fprintf (f, "%lu\n", i);
8603 }
8604 exit (ferror (f) || fclose (f) != 0);
8605
8606 ;
8607 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008608}
Martin v. Löwis11437992002-04-12 09:54:03 +00008609_ACEOF
8610rm -f conftest$ac_exeext
8611if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8612 (eval $ac_link) 2>&5
8613 ac_status=$?
8614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8615 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8617 (eval $ac_try) 2>&5
8618 ac_status=$?
8619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8620 (exit $ac_status); }; }; then
8621 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008622else
Martin v. Löwis11437992002-04-12 09:54:03 +00008623 echo "$as_me: program exited with status $ac_status" >&5
8624echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008625sed 's/^/| /' conftest.$ac_ext >&5
8626
Martin v. Löwis11437992002-04-12 09:54:03 +00008627( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008628{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8629See \`config.log' for more details." >&5
8630echo "$as_me: error: cannot compute sizeof (long long), 77
8631See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008632 { (exit 1); exit 1; }; }
8633fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008634rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008635fi
8636fi
8637rm -f conftest.val
8638else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008639 ac_cv_sizeof_long_long=0
8640fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008641fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008642echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8643echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8644cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008645#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008646_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008647
Michael W. Hudson54241132001-12-07 15:38:26 +00008648
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008649fi
8650
Martin v. Löwis11437992002-04-12 09:54:03 +00008651echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8652echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008653have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008654cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008655#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008656/* confdefs.h. */
8657_ACEOF
8658cat confdefs.h >>conftest.$ac_ext
8659cat >>conftest.$ac_ext <<_ACEOF
8660/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008661
Martin v. Löwis11437992002-04-12 09:54:03 +00008662int
8663main ()
8664{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008665uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008666 ;
8667 return 0;
8668}
8669_ACEOF
8670rm -f conftest.$ac_objext
8671if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008672 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008673 ac_status=$?
8674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8675 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008676 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008677 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8678 (eval $ac_try) 2>&5
8679 ac_status=$?
8680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8681 (exit $ac_status); }; }; then
8682
8683
8684cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008685#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008686_ACEOF
8687
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008688 have_uintptr_t=yes
8689
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008690else
Martin v. Löwis11437992002-04-12 09:54:03 +00008691 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008692sed 's/^/| /' conftest.$ac_ext >&5
8693
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008694fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008695rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008696echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8697echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008698if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008699echo "$as_me:$LINENO: checking for uintptr_t" >&5
8700echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8701if test "${ac_cv_type_uintptr_t+set}" = set; then
8702 echo $ECHO_N "(cached) $ECHO_C" >&6
8703else
8704 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008705#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008706/* confdefs.h. */
8707_ACEOF
8708cat confdefs.h >>conftest.$ac_ext
8709cat >>conftest.$ac_ext <<_ACEOF
8710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008711$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008712int
8713main ()
8714{
8715if ((uintptr_t *) 0)
8716 return 0;
8717if (sizeof (uintptr_t))
8718 return 0;
8719 ;
8720 return 0;
8721}
8722_ACEOF
8723rm -f conftest.$ac_objext
8724if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008725 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008726 ac_status=$?
8727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8728 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008729 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008730 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8731 (eval $ac_try) 2>&5
8732 ac_status=$?
8733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8734 (exit $ac_status); }; }; then
8735 ac_cv_type_uintptr_t=yes
8736else
8737 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008738sed 's/^/| /' conftest.$ac_ext >&5
8739
Martin v. Löwis11437992002-04-12 09:54:03 +00008740ac_cv_type_uintptr_t=no
8741fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008742rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008743fi
8744echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8745echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8746
8747echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8748echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8749if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8750 echo $ECHO_N "(cached) $ECHO_C" >&6
8751else
8752 if test "$ac_cv_type_uintptr_t" = yes; then
8753 # The cast to unsigned long works around a bug in the HP C Compiler
8754 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8755 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8756 # This bug is HP SR number 8606223364.
8757 if test "$cross_compiling" = yes; then
8758 # Depending upon the size, compute the lo and hi bounds.
8759cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008760#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008761/* confdefs.h. */
8762_ACEOF
8763cat confdefs.h >>conftest.$ac_ext
8764cat >>conftest.$ac_ext <<_ACEOF
8765/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008766$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008767int
8768main ()
8769{
8770static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8771test_array [0] = 0
8772
8773 ;
8774 return 0;
8775}
8776_ACEOF
8777rm -f conftest.$ac_objext
8778if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008779 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008780 ac_status=$?
8781 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8782 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008783 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008784 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8785 (eval $ac_try) 2>&5
8786 ac_status=$?
8787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8788 (exit $ac_status); }; }; then
8789 ac_lo=0 ac_mid=0
8790 while :; do
8791 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008792#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008793/* confdefs.h. */
8794_ACEOF
8795cat confdefs.h >>conftest.$ac_ext
8796cat >>conftest.$ac_ext <<_ACEOF
8797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008798$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008799int
8800main ()
8801{
8802static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8803test_array [0] = 0
8804
8805 ;
8806 return 0;
8807}
8808_ACEOF
8809rm -f conftest.$ac_objext
8810if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008811 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 ac_status=$?
8813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8814 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008815 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8817 (eval $ac_try) 2>&5
8818 ac_status=$?
8819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8820 (exit $ac_status); }; }; then
8821 ac_hi=$ac_mid; break
8822else
8823 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008824sed 's/^/| /' conftest.$ac_ext >&5
8825
Martin v. Löwis11437992002-04-12 09:54:03 +00008826ac_lo=`expr $ac_mid + 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008827 if test $ac_lo -le $ac_mid; then
8828 ac_lo= ac_hi=
8829 break
8830 fi
8831 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008832fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008833rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008834 done
8835else
8836 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008837sed 's/^/| /' conftest.$ac_ext >&5
8838
Martin v. Löwis11437992002-04-12 09:54:03 +00008839cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008840#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008841/* confdefs.h. */
8842_ACEOF
8843cat confdefs.h >>conftest.$ac_ext
8844cat >>conftest.$ac_ext <<_ACEOF
8845/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008846$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008847int
8848main ()
8849{
8850static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8851test_array [0] = 0
8852
8853 ;
8854 return 0;
8855}
8856_ACEOF
8857rm -f conftest.$ac_objext
8858if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008859 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008860 ac_status=$?
8861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8862 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008863 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8865 (eval $ac_try) 2>&5
8866 ac_status=$?
8867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8868 (exit $ac_status); }; }; then
8869 ac_hi=-1 ac_mid=-1
8870 while :; do
8871 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008872#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008873/* confdefs.h. */
8874_ACEOF
8875cat confdefs.h >>conftest.$ac_ext
8876cat >>conftest.$ac_ext <<_ACEOF
8877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008878$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008879int
8880main ()
8881{
8882static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8883test_array [0] = 0
8884
8885 ;
8886 return 0;
8887}
8888_ACEOF
8889rm -f conftest.$ac_objext
8890if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008891 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 ac_status=$?
8893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8894 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008895 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008896 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8897 (eval $ac_try) 2>&5
8898 ac_status=$?
8899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8900 (exit $ac_status); }; }; then
8901 ac_lo=$ac_mid; break
8902else
8903 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008904sed 's/^/| /' conftest.$ac_ext >&5
8905
Martin v. Löwis11437992002-04-12 09:54:03 +00008906ac_hi=`expr '(' $ac_mid ')' - 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008907 if test $ac_mid -le $ac_hi; then
8908 ac_lo= ac_hi=
8909 break
8910 fi
8911 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008912fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008913rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008914 done
8915else
8916 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008917sed 's/^/| /' conftest.$ac_ext >&5
8918
Martin v. Löwis11437992002-04-12 09:54:03 +00008919ac_lo= ac_hi=
8920fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008921rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008922fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008923rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008924# Binary search between lo and hi bounds.
8925while test "x$ac_lo" != "x$ac_hi"; do
8926 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8927 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008928#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008929/* confdefs.h. */
8930_ACEOF
8931cat confdefs.h >>conftest.$ac_ext
8932cat >>conftest.$ac_ext <<_ACEOF
8933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008934$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008935int
8936main ()
8937{
8938static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8939test_array [0] = 0
8940
8941 ;
8942 return 0;
8943}
8944_ACEOF
8945rm -f conftest.$ac_objext
8946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008947 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008948 ac_status=$?
8949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8950 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008951 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8953 (eval $ac_try) 2>&5
8954 ac_status=$?
8955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8956 (exit $ac_status); }; }; then
8957 ac_hi=$ac_mid
8958else
8959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008960sed 's/^/| /' conftest.$ac_ext >&5
8961
Martin v. Löwis11437992002-04-12 09:54:03 +00008962ac_lo=`expr '(' $ac_mid ')' + 1`
8963fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008964rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008965done
8966case $ac_lo in
8967?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008968'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8969See \`config.log' for more details." >&5
8970echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8971See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008972 { (exit 1); exit 1; }; } ;;
8973esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008974else
8975 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008976 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8977See \`config.log' for more details." >&5
8978echo "$as_me: error: cannot run test program while cross compiling
8979See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008980 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008981else
Martin v. Löwis11437992002-04-12 09:54:03 +00008982 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008983#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008984/* confdefs.h. */
8985_ACEOF
8986cat confdefs.h >>conftest.$ac_ext
8987cat >>conftest.$ac_ext <<_ACEOF
8988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008989$ac_includes_default
8990long longval () { return (long) (sizeof (uintptr_t)); }
8991unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008992#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008993#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008994int
8995main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008996{
Martin v. Löwis11437992002-04-12 09:54:03 +00008997
8998 FILE *f = fopen ("conftest.val", "w");
8999 if (! f)
9000 exit (1);
9001 if (((long) (sizeof (uintptr_t))) < 0)
9002 {
9003 long i = longval ();
9004 if (i != ((long) (sizeof (uintptr_t))))
9005 exit (1);
9006 fprintf (f, "%ld\n", i);
9007 }
9008 else
9009 {
9010 unsigned long i = ulongval ();
9011 if (i != ((long) (sizeof (uintptr_t))))
9012 exit (1);
9013 fprintf (f, "%lu\n", i);
9014 }
9015 exit (ferror (f) || fclose (f) != 0);
9016
9017 ;
9018 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009019}
Martin v. Löwis11437992002-04-12 09:54:03 +00009020_ACEOF
9021rm -f conftest$ac_exeext
9022if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9023 (eval $ac_link) 2>&5
9024 ac_status=$?
9025 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9026 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9027 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9028 (eval $ac_try) 2>&5
9029 ac_status=$?
9030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9031 (exit $ac_status); }; }; then
9032 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009033else
Martin v. Löwis11437992002-04-12 09:54:03 +00009034 echo "$as_me: program exited with status $ac_status" >&5
9035echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009036sed 's/^/| /' conftest.$ac_ext >&5
9037
Martin v. Löwis11437992002-04-12 09:54:03 +00009038( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009039{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9040See \`config.log' for more details." >&5
9041echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9042See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009043 { (exit 1); exit 1; }; }
9044fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009045rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009046fi
9047fi
9048rm -f conftest.val
9049else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009050 ac_cv_sizeof_uintptr_t=0
9051fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009052fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009053echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9054echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9055cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009056#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009057_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009058
Michael W. Hudson54241132001-12-07 15:38:26 +00009059
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009060fi
9061
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009062# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009063echo "$as_me:$LINENO: checking size of off_t" >&5
9064echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9065if test "${ac_cv_sizeof_off_t+set}" = set; then
9066 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009067else
9068 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009069 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009070else
Martin v. Löwis11437992002-04-12 09:54:03 +00009071 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009072#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009073/* confdefs.h. */
9074_ACEOF
9075cat confdefs.h >>conftest.$ac_ext
9076cat >>conftest.$ac_ext <<_ACEOF
9077/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009078#include <stdio.h>
9079#include <sys/types.h>
9080main()
9081{
9082 FILE *f=fopen("conftestval", "w");
9083 if (!f) exit(1);
9084 fprintf(f, "%d\n", sizeof(off_t));
9085 exit(0);
9086}
Martin v. Löwis11437992002-04-12 09:54:03 +00009087_ACEOF
9088rm -f conftest$ac_exeext
9089if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9090 (eval $ac_link) 2>&5
9091 ac_status=$?
9092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9093 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9094 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9095 (eval $ac_try) 2>&5
9096 ac_status=$?
9097 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9098 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009099 ac_cv_sizeof_off_t=`cat conftestval`
9100else
Martin v. Löwis11437992002-04-12 09:54:03 +00009101 echo "$as_me: program exited with status $ac_status" >&5
9102echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009103sed 's/^/| /' conftest.$ac_ext >&5
9104
Martin v. Löwis11437992002-04-12 09:54:03 +00009105( exit $ac_status )
9106ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009107fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009108rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009109fi
9110
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009111fi
9112
Martin v. Löwis11437992002-04-12 09:54:03 +00009113echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9114echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9115
9116cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009117#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009118_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009119
Michael W. Hudson54241132001-12-07 15:38:26 +00009120
Martin v. Löwis11437992002-04-12 09:54:03 +00009121echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9122echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009123if test "$have_long_long" = yes -a \
9124 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9125 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009126
Martin v. Löwis11437992002-04-12 09:54:03 +00009127cat >>confdefs.h <<\_ACEOF
9128#define HAVE_LARGEFILE_SUPPORT 1
9129_ACEOF
9130
9131 echo "$as_me:$LINENO: result: yes" >&5
9132echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009133else
Martin v. Löwis11437992002-04-12 09:54:03 +00009134 echo "$as_me:$LINENO: result: no" >&5
9135echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009136fi
9137
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009138# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009139echo "$as_me:$LINENO: checking size of time_t" >&5
9140echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9141if test "${ac_cv_sizeof_time_t+set}" = set; then
9142 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009143else
9144 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009145 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009146else
Martin v. Löwis11437992002-04-12 09:54:03 +00009147 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009148#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009149/* confdefs.h. */
9150_ACEOF
9151cat confdefs.h >>conftest.$ac_ext
9152cat >>conftest.$ac_ext <<_ACEOF
9153/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009154#include <stdio.h>
9155#include <time.h>
9156main()
9157{
9158 FILE *f=fopen("conftestval", "w");
9159 if (!f) exit(1);
9160 fprintf(f, "%d\n", sizeof(time_t));
9161 exit(0);
9162}
Martin v. Löwis11437992002-04-12 09:54:03 +00009163_ACEOF
9164rm -f conftest$ac_exeext
9165if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9166 (eval $ac_link) 2>&5
9167 ac_status=$?
9168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9169 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9170 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9171 (eval $ac_try) 2>&5
9172 ac_status=$?
9173 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9174 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009175 ac_cv_sizeof_time_t=`cat conftestval`
9176else
Martin v. Löwis11437992002-04-12 09:54:03 +00009177 echo "$as_me: program exited with status $ac_status" >&5
9178echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009179sed 's/^/| /' conftest.$ac_ext >&5
9180
Martin v. Löwis11437992002-04-12 09:54:03 +00009181( exit $ac_status )
9182ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009183fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009184rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009185fi
9186
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009187fi
9188
Martin v. Löwis11437992002-04-12 09:54:03 +00009189echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9190echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9191
9192cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009193#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009194_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009195
Michael W. Hudson54241132001-12-07 15:38:26 +00009196
9197
Trent Mick635f6fb2000-08-23 21:33:05 +00009198# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009199ac_save_cc="$CC"
9200if test "$ac_cv_kpthread" = "yes"
9201then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009202elif test "$ac_cv_kthread" = "yes"
9203then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009204elif test "$ac_cv_pthread" = "yes"
9205then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009206fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009207echo "$as_me:$LINENO: checking for pthread_t" >&5
9208echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009209have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009210cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009211#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009212/* confdefs.h. */
9213_ACEOF
9214cat confdefs.h >>conftest.$ac_ext
9215cat >>conftest.$ac_ext <<_ACEOF
9216/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009217#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009218int
9219main ()
9220{
Guido van Rossum12580492000-09-24 16:47:19 +00009221pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009222 ;
9223 return 0;
9224}
9225_ACEOF
9226rm -f conftest.$ac_objext
9227if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009228 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009229 ac_status=$?
9230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9231 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009232 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9234 (eval $ac_try) 2>&5
9235 ac_status=$?
9236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9237 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009238 have_pthread_t=yes
9239else
Martin v. Löwis11437992002-04-12 09:54:03 +00009240 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009241sed 's/^/| /' conftest.$ac_ext >&5
9242
Trent Mick635f6fb2000-08-23 21:33:05 +00009243fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009244rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009245echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9246echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009247if test "$have_pthread_t" = yes ; then
9248 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009249 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9250echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9251 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9252 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009253else
9254 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009255 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009256else
Martin v. Löwis11437992002-04-12 09:54:03 +00009257 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009258#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009259/* confdefs.h. */
9260_ACEOF
9261cat confdefs.h >>conftest.$ac_ext
9262cat >>conftest.$ac_ext <<_ACEOF
9263/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009264#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009265#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009266 main()
9267 {
9268 FILE *f=fopen("conftestval", "w");
9269 if (!f) exit(1);
9270 fprintf(f, "%d\n", sizeof(pthread_t));
9271 exit(0);
9272 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009273_ACEOF
9274rm -f conftest$ac_exeext
9275if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9276 (eval $ac_link) 2>&5
9277 ac_status=$?
9278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9279 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9281 (eval $ac_try) 2>&5
9282 ac_status=$?
9283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9284 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009285 ac_cv_sizeof_pthread_t=`cat conftestval`
9286else
Martin v. Löwis11437992002-04-12 09:54:03 +00009287 echo "$as_me: program exited with status $ac_status" >&5
9288echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009289sed 's/^/| /' conftest.$ac_ext >&5
9290
Martin v. Löwis11437992002-04-12 09:54:03 +00009291( exit $ac_status )
9292ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009293fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009294rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009295fi
9296
Trent Mick635f6fb2000-08-23 21:33:05 +00009297fi
9298
Martin v. Löwis11437992002-04-12 09:54:03 +00009299 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9300echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9301
9302cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009303#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009304_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009305
9306fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009307CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009308
Martin v. Löwis11437992002-04-12 09:54:03 +00009309echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9310echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009311# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9312if test "${enable_toolbox_glue+set}" = set; then
9313 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009314
Martin v. Löwis11437992002-04-12 09:54:03 +00009315fi;
Jack Jansene578a632001-08-15 01:27:14 +00009316
9317if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009318then
Jack Jansene578a632001-08-15 01:27:14 +00009319 case $ac_sys_system/$ac_sys_release in
9320 Darwin/*)
9321 enable_toolbox_glue="yes";;
9322 *)
9323 enable_toolbox_glue="no";;
9324 esac
9325fi
9326case "$enable_toolbox_glue" in
9327yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009328 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009329 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009330 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009331
9332cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009333#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009334_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009335
9336 ;;
9337*)
9338 extra_frameworks=""
9339 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009340 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009341 ;;
9342esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009343echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9344echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009345
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009346
9347case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009348 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009349 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009350 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansenb36687a2004-07-16 08:43:47 +00009351 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009352 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009353 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009354 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009355 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansenb36687a2004-07-16 08:43:47 +00009356 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009357 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009358esac
9359
Martin v. Löwis11437992002-04-12 09:54:03 +00009360echo "$as_me:$LINENO: checking for --enable-framework" >&5
9361echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009362if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009363then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009364 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009365 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009366 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009367
Martin v. Löwis11437992002-04-12 09:54:03 +00009368cat >>confdefs.h <<\_ACEOF
9369#define WITH_NEXT_FRAMEWORK 1
9370_ACEOF
9371
9372 echo "$as_me:$LINENO: result: yes" >&5
9373echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009374else
Martin v. Löwis11437992002-04-12 09:54:03 +00009375 echo "$as_me:$LINENO: result: no" >&5
9376echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009377fi
9378
Martin v. Löwis11437992002-04-12 09:54:03 +00009379echo "$as_me:$LINENO: checking for dyld" >&5
9380echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009381case $ac_sys_system/$ac_sys_release in
9382 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009383
Martin v. Löwis11437992002-04-12 09:54:03 +00009384cat >>confdefs.h <<\_ACEOF
9385#define WITH_DYLD 1
9386_ACEOF
9387
9388 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9389echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009390 ;;
9391 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009392 echo "$as_me:$LINENO: result: no" >&5
9393echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009394 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009395esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009396
Guido van Rossum0a516c91994-09-12 10:58:40 +00009397# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009398
Michael W. Hudson54241132001-12-07 15:38:26 +00009399
9400
9401
9402
Guido van Rossum0a516c91994-09-12 10:58:40 +00009403# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009404# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009405echo "$as_me:$LINENO: checking SO" >&5
9406echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009407if test -z "$SO"
9408then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009409 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009410 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009411 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009412 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009413 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00009414else
9415 # this might also be a termcap variable, see #610332
9416 echo
9417 echo '====================================================================='
9418 echo '+ +'
9419 echo '+ WARNING: You have set SO in your environment. +'
9420 echo '+ Do you really mean to change the extension for shared libraries? +'
9421 echo '+ Continuing in 10 seconds to let you to ponder. +'
9422 echo '+ +'
9423 echo '====================================================================='
9424 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00009425fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009426echo "$as_me:$LINENO: result: $SO" >&5
9427echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009428# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009429# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009430# (Shared libraries in this instance are shared modules to be loaded into
9431# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009432echo "$as_me:$LINENO: checking LDSHARED" >&5
9433echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009434if test -z "$LDSHARED"
9435then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009436 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009437 AIX*)
9438 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009439 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009440 ;;
9441 BeOS*)
9442 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009443 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009444 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009445 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009446 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009447 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009448 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009449 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009450 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009451 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009452 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009453 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009454 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009455 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9456 if test "$enable_framework" ; then
9457 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009458 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9459 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009460 else
9461 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009462 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009463 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009464 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00009465 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9466 if test "$enable_framework" ; then
9467 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009468 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9469 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009470 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009471 # No framework, use the Python app as bundle-loader
9472 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009473 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009474 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009475 Darwin/*)
9476 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9477 # This allows an extension to be used in any Python
9478 if test ${MACOSX_DEPLOYMENT_TARGET-10.1} '>' 10.2
9479 then
9480 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
9481 BLDSHARED="$LDSHARED"
9482 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET
9483 else
9484 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9485 if test "$enable_framework" ; then
9486 # Link against the framework. All externals should be defined.
9487 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9488 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
9489 else
9490 # No framework, use the Python app as bundle-loader
9491 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9492 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
9493 fi
9494 fi
9495 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009496 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009497 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009498 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009499 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009500 then
9501 LDSHARED="cc -shared ${LDFLAGS}"
9502 else
9503 LDSHARED="ld -Bshareable ${LDFLAGS}"
9504 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009505 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009506 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009507 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009508 then LDSHARED='$(CC) -shared'
9509 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009510 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009511 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009512 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009513 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009514 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009515 *) LDSHARED="ld";;
9516 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009517fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009518echo "$as_me:$LINENO: result: $LDSHARED" >&5
9519echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009520BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009521# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009522# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009523echo "$as_me:$LINENO: checking CCSHARED" >&5
9524echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009525if test -z "$CCSHARED"
9526then
Guido van Rossum07397971997-04-29 21:49:50 +00009527 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009528 SunOS*) if test "$GCC" = yes;
9529 then CCSHARED="-fPIC";
9530 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009531 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009532 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009533 else CCSHARED="+z";
9534 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009535 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009536 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009537 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009538 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009539 if test "$GCC" = "yes"
9540 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009541 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009542 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009543 SCO_SV*)
9544 if test "$GCC" = "yes"
9545 then CCSHARED="-fPIC"
9546 else CCSHARED="-Kpic -belf"
9547 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009548 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009549 IRIX*/6*) case $CC in
9550 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009551 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009552 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009553 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009554 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009555fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009556echo "$as_me:$LINENO: result: $CCSHARED" >&5
9557echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009558# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009559# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009560echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9561echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009562if test -z "$LINKFORSHARED"
9563then
Guido van Rossum07397971997-04-29 21:49:50 +00009564 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009565 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009566 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009567 LINKFORSHARED="-Wl,-E -Wl,+s";;
9568# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009569 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009570 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009571 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009572 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009573 # -u __dummy makes the linker aware of the objc runtime
9574 # in System.framework; otherwise, __objcInit (referenced in
9575 # crt1.o) gets erroneously defined as common, which breaks dynamic
9576 # loading of any modules which reference it in System.framework.
9577 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9578 # not used by the core itself but which needs to be in the core so
9579 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009580 # -prebind is no longer used, because it actually seems to give a
9581 # slowdown in stead of a speedup, maybe due to the large number of
9582 # dynamic loads Python does.
9583 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009584 if test "$enable_framework"
9585 then
Jack Jansenb36687a2004-07-16 08:43:47 +00009586 LINKFORSHARED="$LINKFORSHARED -Wl,-F. -framework "'$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009587 fi
9588 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009589 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009590 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009591 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009592 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009593 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9594 then
9595 LINKFORSHARED="-Wl,--export-dynamic"
9596 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009597 SunOS/5*) case $CC in
9598 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009599 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009600 then
9601 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009602 fi;;
9603 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009604 CYGWIN*)
9605 if test $enable_shared = "no"
9606 then
9607 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9608 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009609 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009610fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009611echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9612echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009613
Michael W. Hudson54241132001-12-07 15:38:26 +00009614
Martin v. Löwis11437992002-04-12 09:54:03 +00009615echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9616echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009617if test ! "$LIBRARY" = "$LDLIBRARY"
9618then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009619 case $ac_sys_system in
9620 CYGWIN*)
9621 # Cygwin needs CCSHARED when building extension DLLs
9622 # but not when building the interpreter DLL.
9623 CFLAGSFORSHARED='';;
9624 *)
9625 CFLAGSFORSHARED='$(CCSHARED)'
9626 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009627fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009628echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9629echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009630
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009631# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9632# library (with --enable-shared).
9633# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009634# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9635# if it is not required, since it creates a dependency of the shared library
9636# to LIBS. This, in turn, means that applications linking the shared libpython
9637# don't need to link LIBS explicitly. The default should be only changed
9638# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009639
9640echo "$as_me:$LINENO: checking SHLIBS" >&5
9641echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9642case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009643 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009644 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009645esac
9646echo "$as_me:$LINENO: result: $SHLIBS" >&5
9647echo "${ECHO_T}$SHLIBS" >&6
9648
9649
Guido van Rossum627b2d71993-12-24 10:39:16 +00009650# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009651
9652echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9653echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9654if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9655 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009656else
Martin v. Löwis11437992002-04-12 09:54:03 +00009657 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009658LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009659cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009660#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009661/* confdefs.h. */
9662_ACEOF
9663cat confdefs.h >>conftest.$ac_ext
9664cat >>conftest.$ac_ext <<_ACEOF
9665/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009666
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009667/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009668#ifdef __cplusplus
9669extern "C"
9670#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009671/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009672 builtin and then its argument prototype would still apply. */
9673char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009674int
9675main ()
9676{
9677dlopen ();
9678 ;
9679 return 0;
9680}
9681_ACEOF
9682rm -f conftest.$ac_objext conftest$ac_exeext
9683if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009684 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009685 ac_status=$?
9686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9687 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009688 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9690 (eval $ac_try) 2>&5
9691 ac_status=$?
9692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9693 (exit $ac_status); }; }; then
9694 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009695else
Martin v. Löwis11437992002-04-12 09:54:03 +00009696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009697sed 's/^/| /' conftest.$ac_ext >&5
9698
Martin v. Löwis11437992002-04-12 09:54:03 +00009699ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009700fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009701rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009702LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009703fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009704echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9705echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9706if test $ac_cv_lib_dl_dlopen = yes; then
9707 cat >>confdefs.h <<_ACEOF
9708#define HAVE_LIBDL 1
9709_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009710
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009711 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009712
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009713fi
9714 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009715
9716echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9717echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9718if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9719 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009720else
Martin v. Löwis11437992002-04-12 09:54:03 +00009721 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009722LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009723cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009724#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009725/* confdefs.h. */
9726_ACEOF
9727cat confdefs.h >>conftest.$ac_ext
9728cat >>conftest.$ac_ext <<_ACEOF
9729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009730
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009731/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009732#ifdef __cplusplus
9733extern "C"
9734#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009735/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009736 builtin and then its argument prototype would still apply. */
9737char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009738int
9739main ()
9740{
9741shl_load ();
9742 ;
9743 return 0;
9744}
9745_ACEOF
9746rm -f conftest.$ac_objext conftest$ac_exeext
9747if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009748 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009749 ac_status=$?
9750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9751 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009752 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009753 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9754 (eval $ac_try) 2>&5
9755 ac_status=$?
9756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9757 (exit $ac_status); }; }; then
9758 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009759else
Martin v. Löwis11437992002-04-12 09:54:03 +00009760 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009761sed 's/^/| /' conftest.$ac_ext >&5
9762
Martin v. Löwis11437992002-04-12 09:54:03 +00009763ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009764fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009765rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009766LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009767fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009768echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9769echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9770if test $ac_cv_lib_dld_shl_load = yes; then
9771 cat >>confdefs.h <<_ACEOF
9772#define HAVE_LIBDLD 1
9773_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009774
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009775 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009776
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009777fi
9778 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009779
9780# only check for sem_ini if thread support is requested
9781if test "$with_threads" = "yes" -o -z "$with_threads"; then
9782 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009783echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9784if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009785 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009786else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009787 ac_func_search_save_LIBS=$LIBS
9788ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009789cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009790#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009791/* confdefs.h. */
9792_ACEOF
9793cat confdefs.h >>conftest.$ac_ext
9794cat >>conftest.$ac_ext <<_ACEOF
9795/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009796
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009797/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009798#ifdef __cplusplus
9799extern "C"
9800#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009801/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009802 builtin and then its argument prototype would still apply. */
9803char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009804int
9805main ()
9806{
9807sem_init ();
9808 ;
9809 return 0;
9810}
9811_ACEOF
9812rm -f conftest.$ac_objext conftest$ac_exeext
9813if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009814 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009815 ac_status=$?
9816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9817 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009818 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009819 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9820 (eval $ac_try) 2>&5
9821 ac_status=$?
9822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9823 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009824 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009825else
Martin v. Löwis11437992002-04-12 09:54:03 +00009826 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009827sed 's/^/| /' conftest.$ac_ext >&5
9828
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009829fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009830rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009831if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009832 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009833 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9834 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009835#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009836/* confdefs.h. */
9837_ACEOF
9838cat confdefs.h >>conftest.$ac_ext
9839cat >>conftest.$ac_ext <<_ACEOF
9840/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009841
9842/* Override any gcc2 internal prototype to avoid an error. */
9843#ifdef __cplusplus
9844extern "C"
9845#endif
9846/* We use char because int might match the return type of a gcc2
9847 builtin and then its argument prototype would still apply. */
9848char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009849int
9850main ()
9851{
9852sem_init ();
9853 ;
9854 return 0;
9855}
Martin v. Löwis11437992002-04-12 09:54:03 +00009856_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009857rm -f conftest.$ac_objext conftest$ac_exeext
9858if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009859 (eval $ac_link) 2>&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009860 ac_status=$?
9861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9862 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009863 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9865 (eval $ac_try) 2>&5
9866 ac_status=$?
9867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9868 (exit $ac_status); }; }; then
9869 ac_cv_search_sem_init="-l$ac_lib"
9870break
9871else
9872 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009873sed 's/^/| /' conftest.$ac_ext >&5
9874
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009875fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009876rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009877 done
9878fi
9879LIBS=$ac_func_search_save_LIBS
9880fi
9881echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9882echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9883if test "$ac_cv_search_sem_init" != no; then
9884 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009885
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009886fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009887 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009888 # posix4 on Solaris 2.6
9889 # pthread (first!) on Linux
9890fi
9891
Martin v. Löwis19d17342003-06-14 21:03:05 +00009892# check if we need libintl for locale functions
9893echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
9894echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
9895if test "${ac_cv_lib_intl_textdomain+set}" = set; then
9896 echo $ECHO_N "(cached) $ECHO_C" >&6
9897else
9898 ac_check_lib_save_LIBS=$LIBS
9899LIBS="-lintl $LIBS"
9900cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009901#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009902/* confdefs.h. */
9903_ACEOF
9904cat confdefs.h >>conftest.$ac_ext
9905cat >>conftest.$ac_ext <<_ACEOF
9906/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009907
9908/* Override any gcc2 internal prototype to avoid an error. */
9909#ifdef __cplusplus
9910extern "C"
9911#endif
9912/* We use char because int might match the return type of a gcc2
9913 builtin and then its argument prototype would still apply. */
9914char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009915int
9916main ()
9917{
9918textdomain ();
9919 ;
9920 return 0;
9921}
9922_ACEOF
9923rm -f conftest.$ac_objext conftest$ac_exeext
9924if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009925 (eval $ac_link) 2>&5
Martin v. Löwis19d17342003-06-14 21:03:05 +00009926 ac_status=$?
9927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9928 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009929 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis19d17342003-06-14 21:03:05 +00009930 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9931 (eval $ac_try) 2>&5
9932 ac_status=$?
9933 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9934 (exit $ac_status); }; }; then
9935 ac_cv_lib_intl_textdomain=yes
9936else
9937 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009938sed 's/^/| /' conftest.$ac_ext >&5
9939
Martin v. Löwis19d17342003-06-14 21:03:05 +00009940ac_cv_lib_intl_textdomain=no
9941fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009942rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009943LIBS=$ac_check_lib_save_LIBS
9944fi
9945echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
9946echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
9947if test $ac_cv_lib_intl_textdomain = yes; then
9948
9949cat >>confdefs.h <<\_ACEOF
9950#define WITH_LIBINTL 1
9951_ACEOF
9952
9953fi
9954
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009955
9956# checks for system dependent C++ extensions support
9957case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009958 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9959echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9960 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009961#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009962/* confdefs.h. */
9963_ACEOF
9964cat confdefs.h >>conftest.$ac_ext
9965cat >>conftest.$ac_ext <<_ACEOF
9966/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009967#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009968int
9969main ()
9970{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009971loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009972 ;
9973 return 0;
9974}
9975_ACEOF
9976rm -f conftest.$ac_objext conftest$ac_exeext
9977if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009978 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009979 ac_status=$?
9980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9981 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009982 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009983 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9984 (eval $ac_try) 2>&5
9985 ac_status=$?
9986 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9987 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009988
Martin v. Löwis11437992002-04-12 09:54:03 +00009989cat >>confdefs.h <<\_ACEOF
9990#define AIX_GENUINE_CPLUSPLUS 1
9991_ACEOF
9992
9993 echo "$as_me:$LINENO: result: yes" >&5
9994echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009995else
Martin v. Löwis11437992002-04-12 09:54:03 +00009996 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009997sed 's/^/| /' conftest.$ac_ext >&5
9998
Martin v. Löwis11437992002-04-12 09:54:03 +00009999echo "$as_me:$LINENO: result: no" >&5
10000echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010001fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010002rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000010003 *) ;;
10004esac
10005
Guido van Rossum70c7f481998-03-26 18:44:10 +000010006# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010007# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +000010008echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
10009echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
10010if test "${ac_cv_lib_nsl_t_open+set}" = set; then
10011 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010012else
Martin v. Löwis11437992002-04-12 09:54:03 +000010013 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010014LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010015cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010016#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010017/* confdefs.h. */
10018_ACEOF
10019cat confdefs.h >>conftest.$ac_ext
10020cat >>conftest.$ac_ext <<_ACEOF
10021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010022
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010023/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010024#ifdef __cplusplus
10025extern "C"
10026#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010027/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010028 builtin and then its argument prototype would still apply. */
10029char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010030int
10031main ()
10032{
10033t_open ();
10034 ;
10035 return 0;
10036}
10037_ACEOF
10038rm -f conftest.$ac_objext conftest$ac_exeext
10039if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010040 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010041 ac_status=$?
10042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10043 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010044 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010045 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10046 (eval $ac_try) 2>&5
10047 ac_status=$?
10048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10049 (exit $ac_status); }; }; then
10050 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010051else
Martin v. Löwis11437992002-04-12 09:54:03 +000010052 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010053sed 's/^/| /' conftest.$ac_ext >&5
10054
Martin v. Löwis11437992002-04-12 09:54:03 +000010055ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010056fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010057rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010058LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010059fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010060echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
10061echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
10062if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010063 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010064fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010065 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000010066echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10067echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10068if test "${ac_cv_lib_socket_socket+set}" = set; then
10069 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010070else
Martin v. Löwis11437992002-04-12 09:54:03 +000010071 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010072LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010073cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010074#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010075/* confdefs.h. */
10076_ACEOF
10077cat confdefs.h >>conftest.$ac_ext
10078cat >>conftest.$ac_ext <<_ACEOF
10079/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010080
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010081/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010082#ifdef __cplusplus
10083extern "C"
10084#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010085/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010086 builtin and then its argument prototype would still apply. */
10087char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010088int
10089main ()
10090{
10091socket ();
10092 ;
10093 return 0;
10094}
10095_ACEOF
10096rm -f conftest.$ac_objext conftest$ac_exeext
10097if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010098 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010099 ac_status=$?
10100 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10101 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010102 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010103 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10104 (eval $ac_try) 2>&5
10105 ac_status=$?
10106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10107 (exit $ac_status); }; }; then
10108 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010109else
Martin v. Löwis11437992002-04-12 09:54:03 +000010110 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010111sed 's/^/| /' conftest.$ac_ext >&5
10112
Martin v. Löwis11437992002-04-12 09:54:03 +000010113ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010114fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010115rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010116LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010117fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010118echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10119echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10120if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010121 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010122fi
10123 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010124
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010125case "$ac_sys_system" in
10126BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010127echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10128echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10129if test "${ac_cv_lib_net_socket+set}" = set; then
10130 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010131else
Martin v. Löwis11437992002-04-12 09:54:03 +000010132 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010133LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010134cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010135#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010136/* confdefs.h. */
10137_ACEOF
10138cat confdefs.h >>conftest.$ac_ext
10139cat >>conftest.$ac_ext <<_ACEOF
10140/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010141
Guido van Rossumad678af1998-10-02 14:42:15 +000010142/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010143#ifdef __cplusplus
10144extern "C"
10145#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010146/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010147 builtin and then its argument prototype would still apply. */
10148char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010149int
10150main ()
10151{
10152socket ();
10153 ;
10154 return 0;
10155}
10156_ACEOF
10157rm -f conftest.$ac_objext conftest$ac_exeext
10158if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010159 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010160 ac_status=$?
10161 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10162 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010163 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010164 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10165 (eval $ac_try) 2>&5
10166 ac_status=$?
10167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10168 (exit $ac_status); }; }; then
10169 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010170else
Martin v. Löwis11437992002-04-12 09:54:03 +000010171 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010172sed 's/^/| /' conftest.$ac_ext >&5
10173
Martin v. Löwis11437992002-04-12 09:54:03 +000010174ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010175fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010176rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010177LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010178fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010179echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10180echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10181if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010182 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010183fi
10184 # BeOS
10185;;
10186esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010187
Martin v. Löwis11437992002-04-12 09:54:03 +000010188echo "$as_me:$LINENO: checking for --with-libs" >&5
10189echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10190
Guido van Rossuma68acba1996-07-31 17:36:39 +000010191# Check whether --with-libs or --without-libs was given.
10192if test "${with_libs+set}" = set; then
10193 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010194
10195echo "$as_me:$LINENO: result: $withval" >&5
10196echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010197LIBS="$withval $LIBS"
10198
10199else
Martin v. Löwis11437992002-04-12 09:54:03 +000010200 echo "$as_me:$LINENO: result: no" >&5
10201echo "${ECHO_T}no" >&6
10202fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010203
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010204# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010205
10206
Martin v. Löwis11437992002-04-12 09:54:03 +000010207echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10208echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10209
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010210# Check whether --with-signal-module or --without-signal-module was given.
10211if test "${with_signal_module+set}" = set; then
10212 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010213
Martin v. Löwis11437992002-04-12 09:54:03 +000010214fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010215
10216if test -z "$with_signal_module"
10217then with_signal_module="yes"
10218fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010219echo "$as_me:$LINENO: result: $with_signal_module" >&5
10220echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010221
10222if test "${with_signal_module}" = "yes"; then
10223 USE_SIGNAL_MODULE=""
10224 SIGNAL_OBJS=""
10225else
10226 USE_SIGNAL_MODULE="#"
10227 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10228fi
10229
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010230# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010231
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010232USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010233
Martin v. Löwis11437992002-04-12 09:54:03 +000010234echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10235echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10236
Guido van Rossumec2f0731997-01-22 20:54:01 +000010237
10238# Check whether --with-dec-threads or --without-dec-threads was given.
10239if test "${with_dec_threads+set}" = set; then
10240 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010241
10242echo "$as_me:$LINENO: result: $withval" >&5
10243echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010244LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010245if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010246 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010247fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010248else
Martin v. Löwis11437992002-04-12 09:54:03 +000010249 echo "$as_me:$LINENO: result: no" >&5
10250echo "${ECHO_T}no" >&6
10251fi;
10252
10253# Templates for things AC_DEFINEd more than once.
10254# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010255
10256
Martin v. Löwis11437992002-04-12 09:54:03 +000010257
10258
10259
10260
10261
10262echo "$as_me:$LINENO: checking for --with-threads" >&5
10263echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10264
Guido van Rossumec2f0731997-01-22 20:54:01 +000010265# Check whether --with-threads or --without-threads was given.
10266if test "${with_threads+set}" = set; then
10267 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010268
Martin v. Löwis11437992002-04-12 09:54:03 +000010269fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010270
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010271# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010272
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010273# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010274if test "${with_thread+set}" = set; then
10275 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010276 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010277fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010278
10279if test -z "$with_threads"
10280then with_threads="yes"
10281fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010282echo "$as_me:$LINENO: result: $with_threads" >&5
10283echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010284
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010285
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010286if test "$with_threads" = "no"
10287then
10288 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010289elif test "$ac_cv_pthread_is_default" = yes
10290then
Martin v. Löwis11437992002-04-12 09:54:03 +000010291 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010292#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010293_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010294
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010295 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010296 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010297#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010298_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010299
10300 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010301 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010302elif test "$ac_cv_kpthread" = "yes"
10303then
10304 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010305 if test "$ac_cv_cxx_thread" = "yes"; then
10306 CXX="$CXX -Kpthread"
10307 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010308 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010309#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010310_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010311
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010312 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010313 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010314elif test "$ac_cv_kthread" = "yes"
10315then
10316 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010317 if test "$ac_cv_cxx_thread" = "yes"; then
10318 CXX="$CXX -Kthread"
10319 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010320 cat >>confdefs.h <<\_ACEOF
10321#define WITH_THREAD 1
10322_ACEOF
10323
10324 posix_threads=yes
10325 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010326elif test "$ac_cv_pthread" = "yes"
10327then
10328 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010329 if test "$ac_cv_cxx_thread" = "yes"; then
10330 CXX="$CXX -pthread"
10331 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010332 cat >>confdefs.h <<\_ACEOF
10333#define WITH_THREAD 1
10334_ACEOF
10335
10336 posix_threads=yes
10337 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010338else
10339 if test ! -z "$with_threads" -a -d "$with_threads"
10340 then LDFLAGS="$LDFLAGS -L$with_threads"
10341 fi
10342 if test ! -z "$withval" -a -d "$withval"
10343 then LDFLAGS="$LDFLAGS -L$withval"
10344 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010345
10346 # According to the POSIX spec, a pthreads implementation must
10347 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010348 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10349echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10350 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010351#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010352/* confdefs.h. */
10353_ACEOF
10354cat confdefs.h >>conftest.$ac_ext
10355cat >>conftest.$ac_ext <<_ACEOF
10356/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010357
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010358#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010359#ifdef _POSIX_THREADS
10360yes
10361#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010362
10363_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010364if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000010365 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010366 unistd_defines_pthreads=yes
10367else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010368 unistd_defines_pthreads=no
10369fi
10370rm -f conftest*
10371
Martin v. Löwis11437992002-04-12 09:54:03 +000010372 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10373echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010374
Martin v. Löwis11437992002-04-12 09:54:03 +000010375 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010376#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010377_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010378
Martin v. Löwis11437992002-04-12 09:54:03 +000010379 if test "${ac_cv_header_cthreads_h+set}" = set; then
10380 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10381echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10382if test "${ac_cv_header_cthreads_h+set}" = set; then
10383 echo $ECHO_N "(cached) $ECHO_C" >&6
10384fi
10385echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10386echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010387else
Martin v. Löwis11437992002-04-12 09:54:03 +000010388 # Is the header compilable?
10389echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10390echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10391cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010392#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010393/* confdefs.h. */
10394_ACEOF
10395cat confdefs.h >>conftest.$ac_ext
10396cat >>conftest.$ac_ext <<_ACEOF
10397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010398$ac_includes_default
10399#include <cthreads.h>
10400_ACEOF
10401rm -f conftest.$ac_objext
10402if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010403 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010404 ac_status=$?
10405 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10406 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010407 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010408 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10409 (eval $ac_try) 2>&5
10410 ac_status=$?
10411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10412 (exit $ac_status); }; }; then
10413 ac_header_compiler=yes
10414else
10415 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010416sed 's/^/| /' conftest.$ac_ext >&5
10417
Martin v. Löwis11437992002-04-12 09:54:03 +000010418ac_header_compiler=no
10419fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010420rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010421echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10422echo "${ECHO_T}$ac_header_compiler" >&6
10423
10424# Is the header present?
10425echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10426echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10427cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010428#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010429/* confdefs.h. */
10430_ACEOF
10431cat confdefs.h >>conftest.$ac_ext
10432cat >>conftest.$ac_ext <<_ACEOF
10433/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010434#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010435_ACEOF
10436if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10437 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10438 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010439 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010440 rm -f conftest.er1
10441 cat conftest.err >&5
10442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10443 (exit $ac_status); } >/dev/null; then
10444 if test -s conftest.err; then
10445 ac_cpp_err=$ac_c_preproc_warn_flag
10446 else
10447 ac_cpp_err=
10448 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010449else
Martin v. Löwis11437992002-04-12 09:54:03 +000010450 ac_cpp_err=yes
10451fi
10452if test -z "$ac_cpp_err"; then
10453 ac_header_preproc=yes
10454else
10455 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010456sed 's/^/| /' conftest.$ac_ext >&5
10457
Martin v. Löwis11437992002-04-12 09:54:03 +000010458 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010459fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010460rm -f conftest.err conftest.$ac_ext
10461echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10462echo "${ECHO_T}$ac_header_preproc" >&6
10463
10464# So? What about this header?
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010465case $ac_header_compiler:$ac_header_preproc in
10466 yes:no )
Martin v. Löwis11437992002-04-12 09:54:03 +000010467 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10468echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000010469 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010470echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10471 (
10472 cat <<\_ASBOX
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010473## ------------------------------------ ##
10474## Report this to bug-autoconf@gnu.org. ##
10475## ------------------------------------ ##
10476_ASBOX
10477 ) |
10478 sed "s/^/$as_me: WARNING: /" >&2
10479 ;;
10480 no:yes )
10481 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10482echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10483 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10484echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10485 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10486echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10487 (
10488 cat <<\_ASBOX
10489## ------------------------------------ ##
10490## Report this to bug-autoconf@gnu.org. ##
10491## ------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000010492_ASBOX
10493 ) |
10494 sed "s/^/$as_me: WARNING: /" >&2
10495 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010496esac
10497echo "$as_me:$LINENO: checking for cthreads.h" >&5
10498echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10499if test "${ac_cv_header_cthreads_h+set}" = set; then
10500 echo $ECHO_N "(cached) $ECHO_C" >&6
10501else
10502 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010503fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010504echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10505echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10506
10507fi
10508if test $ac_cv_header_cthreads_h = yes; then
10509 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010510#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010511_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010512
Martin v. Löwis11437992002-04-12 09:54:03 +000010513 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010514#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010515_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010516
Martin v. Löwis11437992002-04-12 09:54:03 +000010517
10518cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010519#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010520_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010521
10522 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010523 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010524else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010525
Martin v. Löwis11437992002-04-12 09:54:03 +000010526 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10527 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10528echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10529if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10530 echo $ECHO_N "(cached) $ECHO_C" >&6
10531fi
10532echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10533echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010534else
Martin v. Löwis11437992002-04-12 09:54:03 +000010535 # Is the header compilable?
10536echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10537echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10538cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010539#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010540/* confdefs.h. */
10541_ACEOF
10542cat confdefs.h >>conftest.$ac_ext
10543cat >>conftest.$ac_ext <<_ACEOF
10544/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010545$ac_includes_default
10546#include <mach/cthreads.h>
10547_ACEOF
10548rm -f conftest.$ac_objext
10549if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010550 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010551 ac_status=$?
10552 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10553 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010554 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010555 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10556 (eval $ac_try) 2>&5
10557 ac_status=$?
10558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10559 (exit $ac_status); }; }; then
10560 ac_header_compiler=yes
10561else
10562 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010563sed 's/^/| /' conftest.$ac_ext >&5
10564
Martin v. Löwis11437992002-04-12 09:54:03 +000010565ac_header_compiler=no
10566fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010567rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010568echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10569echo "${ECHO_T}$ac_header_compiler" >&6
10570
10571# Is the header present?
10572echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10573echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10574cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010575#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010576/* confdefs.h. */
10577_ACEOF
10578cat confdefs.h >>conftest.$ac_ext
10579cat >>conftest.$ac_ext <<_ACEOF
10580/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010581#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010582_ACEOF
10583if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10584 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10585 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010586 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010587 rm -f conftest.er1
10588 cat conftest.err >&5
10589 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10590 (exit $ac_status); } >/dev/null; then
10591 if test -s conftest.err; then
10592 ac_cpp_err=$ac_c_preproc_warn_flag
10593 else
10594 ac_cpp_err=
10595 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010596else
Martin v. Löwis11437992002-04-12 09:54:03 +000010597 ac_cpp_err=yes
10598fi
10599if test -z "$ac_cpp_err"; then
10600 ac_header_preproc=yes
10601else
10602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010603sed 's/^/| /' conftest.$ac_ext >&5
10604
Martin v. Löwis11437992002-04-12 09:54:03 +000010605 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010606fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010607rm -f conftest.err conftest.$ac_ext
10608echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10609echo "${ECHO_T}$ac_header_preproc" >&6
10610
10611# So? What about this header?
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010612case $ac_header_compiler:$ac_header_preproc in
10613 yes:no )
Martin v. Löwis11437992002-04-12 09:54:03 +000010614 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10615echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000010616 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010617echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10618 (
10619 cat <<\_ASBOX
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010620## ------------------------------------ ##
10621## Report this to bug-autoconf@gnu.org. ##
10622## ------------------------------------ ##
10623_ASBOX
10624 ) |
10625 sed "s/^/$as_me: WARNING: /" >&2
10626 ;;
10627 no:yes )
10628 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10629echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10630 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10631echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10632 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10633echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10634 (
10635 cat <<\_ASBOX
10636## ------------------------------------ ##
10637## Report this to bug-autoconf@gnu.org. ##
10638## ------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000010639_ASBOX
10640 ) |
10641 sed "s/^/$as_me: WARNING: /" >&2
10642 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010643esac
10644echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10645echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10646if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10647 echo $ECHO_N "(cached) $ECHO_C" >&6
10648else
10649 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010650fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010651echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10652echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10653
10654fi
10655if test $ac_cv_header_mach_cthreads_h = yes; then
10656 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010657#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010658_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010659
Martin v. Löwis11437992002-04-12 09:54:03 +000010660 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010661#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010662_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010663
Martin v. Löwis11437992002-04-12 09:54:03 +000010664
10665cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010666#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010667_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010668
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010669 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010670else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010671
Martin v. Löwis11437992002-04-12 09:54:03 +000010672 echo "$as_me:$LINENO: checking for --with-pth" >&5
10673echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10674
10675# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010676if test "${with_pth+set}" = set; then
10677 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010678 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010679echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010680 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010681#define WITH_THREAD 1
10682_ACEOF
10683
10684
10685cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010686#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010687_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010688
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010689 LIBS="-lpth $LIBS"
10690 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010691else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010692 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010693echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010694
10695 # Just looking for pthread_create in libpthread is not enough:
10696 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10697 # So we really have to include pthread.h, and then link.
10698 _libs=$LIBS
10699 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010700 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10701echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10702 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010703#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010704/* confdefs.h. */
10705_ACEOF
10706cat confdefs.h >>conftest.$ac_ext
10707cat >>conftest.$ac_ext <<_ACEOF
10708/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010709#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010710
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010711void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010712int
10713main ()
10714{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010715
10716pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010717 ;
10718 return 0;
10719}
10720_ACEOF
10721rm -f conftest.$ac_objext conftest$ac_exeext
10722if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010723 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010724 ac_status=$?
10725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10726 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010727 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010728 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10729 (eval $ac_try) 2>&5
10730 ac_status=$?
10731 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10732 (exit $ac_status); }; }; then
10733
10734 echo "$as_me:$LINENO: result: yes" >&5
10735echo "${ECHO_T}yes" >&6
10736 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010737#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010738_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010739
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010740 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010741 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010742else
Martin v. Löwis11437992002-04-12 09:54:03 +000010743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010744sed 's/^/| /' conftest.$ac_ext >&5
10745
Martin v. Löwis11437992002-04-12 09:54:03 +000010746
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010747 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010748 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10749echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10750if test "${ac_cv_func_pthread_detach+set}" = set; then
10751 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010752else
Martin v. Löwis11437992002-04-12 09:54:03 +000010753 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010754#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010755/* confdefs.h. */
10756_ACEOF
10757cat confdefs.h >>conftest.$ac_ext
10758cat >>conftest.$ac_ext <<_ACEOF
10759/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010760/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000010761 which can conflict with char pthread_detach (); below.
10762 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000010763 <limits.h> exists even on freestanding compilers. Under hpux,
10764 including <limits.h> includes <sys/time.h> and causes problems
10765 checking for functions defined therein. */
10766#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000010767# include <limits.h>
10768#else
10769# include <assert.h>
10770#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010771/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010772#ifdef __cplusplus
10773extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000010774{
Martin v. Löwis11437992002-04-12 09:54:03 +000010775#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010776/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010777 builtin and then its argument prototype would still apply. */
10778char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010779/* The GNU C library defines this for functions which it implements
10780 to always fail with ENOSYS. Some functions are actually named
10781 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010782#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010783choke me
10784#else
Skip Montanaro6dead952003-09-25 14:50:04 +000010785char (*f) () = pthread_detach;
10786#endif
10787#ifdef __cplusplus
10788}
Guido van Rossumad678af1998-10-02 14:42:15 +000010789#endif
10790
Skip Montanaro6dead952003-09-25 14:50:04 +000010791int
10792main ()
10793{
10794return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000010795 ;
10796 return 0;
10797}
10798_ACEOF
10799rm -f conftest.$ac_objext conftest$ac_exeext
10800if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010801 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010802 ac_status=$?
10803 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10804 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010805 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010806 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10807 (eval $ac_try) 2>&5
10808 ac_status=$?
10809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10810 (exit $ac_status); }; }; then
10811 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010812else
Martin v. Löwis11437992002-04-12 09:54:03 +000010813 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010814sed 's/^/| /' conftest.$ac_ext >&5
10815
Martin v. Löwis11437992002-04-12 09:54:03 +000010816ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010817fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010818rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010819fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010820echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10821echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10822if test $ac_cv_func_pthread_detach = yes; then
10823 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010824#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010825_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010826
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010827 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010828 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010829else
Guido van Rossumad678af1998-10-02 14:42:15 +000010830
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010831 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10832 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10833echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10834if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10835 echo $ECHO_N "(cached) $ECHO_C" >&6
10836fi
10837echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10838echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10839else
10840 # Is the header compilable?
10841echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10842echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10843cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010844#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010845/* confdefs.h. */
10846_ACEOF
10847cat confdefs.h >>conftest.$ac_ext
10848cat >>conftest.$ac_ext <<_ACEOF
10849/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010850$ac_includes_default
10851#include <atheos/threads.h>
10852_ACEOF
10853rm -f conftest.$ac_objext
10854if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010855 (eval $ac_compile) 2>&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010856 ac_status=$?
10857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10858 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010859 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010860 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10861 (eval $ac_try) 2>&5
10862 ac_status=$?
10863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10864 (exit $ac_status); }; }; then
10865 ac_header_compiler=yes
10866else
10867 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010868sed 's/^/| /' conftest.$ac_ext >&5
10869
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010870ac_header_compiler=no
10871fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010872rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010873echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10874echo "${ECHO_T}$ac_header_compiler" >&6
10875
10876# Is the header present?
10877echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10878echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10879cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010880#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010881/* confdefs.h. */
10882_ACEOF
10883cat confdefs.h >>conftest.$ac_ext
10884cat >>conftest.$ac_ext <<_ACEOF
10885/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010886#include <atheos/threads.h>
10887_ACEOF
10888if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10889 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10890 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010891 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010892 rm -f conftest.er1
10893 cat conftest.err >&5
10894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10895 (exit $ac_status); } >/dev/null; then
10896 if test -s conftest.err; then
10897 ac_cpp_err=$ac_c_preproc_warn_flag
10898 else
10899 ac_cpp_err=
10900 fi
10901else
10902 ac_cpp_err=yes
10903fi
10904if test -z "$ac_cpp_err"; then
10905 ac_header_preproc=yes
10906else
10907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010908sed 's/^/| /' conftest.$ac_ext >&5
10909
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010910 ac_header_preproc=no
10911fi
10912rm -f conftest.err conftest.$ac_ext
10913echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10914echo "${ECHO_T}$ac_header_preproc" >&6
10915
10916# So? What about this header?
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010917case $ac_header_compiler:$ac_header_preproc in
10918 yes:no )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010919 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10920echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010921 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010922echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10923 (
10924 cat <<\_ASBOX
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010925## ------------------------------------ ##
10926## Report this to bug-autoconf@gnu.org. ##
10927## ------------------------------------ ##
10928_ASBOX
10929 ) |
10930 sed "s/^/$as_me: WARNING: /" >&2
10931 ;;
10932 no:yes )
10933 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10934echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10935 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10936echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10937 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10938echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10939 (
10940 cat <<\_ASBOX
10941## ------------------------------------ ##
10942## Report this to bug-autoconf@gnu.org. ##
10943## ------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000010944_ASBOX
10945 ) |
10946 sed "s/^/$as_me: WARNING: /" >&2
10947 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010948esac
10949echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10950echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10951if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10952 echo $ECHO_N "(cached) $ECHO_C" >&6
10953else
10954 ac_cv_header_atheos_threads_h=$ac_header_preproc
10955fi
10956echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10957echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10958
10959fi
10960if test $ac_cv_header_atheos_threads_h = yes; then
10961 cat >>confdefs.h <<\_ACEOF
10962#define WITH_THREAD 1
10963_ACEOF
10964
10965
10966cat >>confdefs.h <<\_ACEOF
10967#define ATHEOS_THREADS 1
10968_ACEOF
10969
10970 THREADOBJ="Python/thread.o"
10971else
10972
Martin v. Löwis11437992002-04-12 09:54:03 +000010973 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10974 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10975echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10976if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10977 echo $ECHO_N "(cached) $ECHO_C" >&6
10978fi
10979echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10980echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010981else
Martin v. Löwis11437992002-04-12 09:54:03 +000010982 # Is the header compilable?
10983echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10984echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10985cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010986#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010987/* confdefs.h. */
10988_ACEOF
10989cat confdefs.h >>conftest.$ac_ext
10990cat >>conftest.$ac_ext <<_ACEOF
10991/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010992$ac_includes_default
10993#include <kernel/OS.h>
10994_ACEOF
10995rm -f conftest.$ac_objext
10996if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010997 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010998 ac_status=$?
10999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11000 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011001 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011002 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11003 (eval $ac_try) 2>&5
11004 ac_status=$?
11005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11006 (exit $ac_status); }; }; then
11007 ac_header_compiler=yes
11008else
11009 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011010sed 's/^/| /' conftest.$ac_ext >&5
11011
Martin v. Löwis11437992002-04-12 09:54:03 +000011012ac_header_compiler=no
11013fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011014rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011015echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11016echo "${ECHO_T}$ac_header_compiler" >&6
11017
11018# Is the header present?
11019echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
11020echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
11021cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011022#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011023/* confdefs.h. */
11024_ACEOF
11025cat confdefs.h >>conftest.$ac_ext
11026cat >>conftest.$ac_ext <<_ACEOF
11027/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011028#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011029_ACEOF
11030if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11031 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11032 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011033 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011034 rm -f conftest.er1
11035 cat conftest.err >&5
11036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11037 (exit $ac_status); } >/dev/null; then
11038 if test -s conftest.err; then
11039 ac_cpp_err=$ac_c_preproc_warn_flag
11040 else
11041 ac_cpp_err=
11042 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011043else
Martin v. Löwis11437992002-04-12 09:54:03 +000011044 ac_cpp_err=yes
11045fi
11046if test -z "$ac_cpp_err"; then
11047 ac_header_preproc=yes
11048else
11049 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011050sed 's/^/| /' conftest.$ac_ext >&5
11051
Martin v. Löwis11437992002-04-12 09:54:03 +000011052 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011053fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011054rm -f conftest.err conftest.$ac_ext
11055echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11056echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011057
Martin v. Löwis11437992002-04-12 09:54:03 +000011058# So? What about this header?
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011059case $ac_header_compiler:$ac_header_preproc in
11060 yes:no )
Martin v. Löwis11437992002-04-12 09:54:03 +000011061 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
11062echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000011063 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011064echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
11065 (
11066 cat <<\_ASBOX
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011067## ------------------------------------ ##
11068## Report this to bug-autoconf@gnu.org. ##
11069## ------------------------------------ ##
11070_ASBOX
11071 ) |
11072 sed "s/^/$as_me: WARNING: /" >&2
11073 ;;
11074 no:yes )
11075 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
11076echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
11077 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
11078echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
11079 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
11080echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
11081 (
11082 cat <<\_ASBOX
11083## ------------------------------------ ##
11084## Report this to bug-autoconf@gnu.org. ##
11085## ------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011086_ASBOX
11087 ) |
11088 sed "s/^/$as_me: WARNING: /" >&2
11089 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011090esac
11091echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11092echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11093if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11094 echo $ECHO_N "(cached) $ECHO_C" >&6
11095else
11096 ac_cv_header_kernel_OS_h=$ac_header_preproc
11097fi
11098echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11099echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11100
11101fi
11102if test $ac_cv_header_kernel_OS_h = yes; then
11103 cat >>confdefs.h <<\_ACEOF
11104#define WITH_THREAD 1
11105_ACEOF
11106
11107
11108cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011109#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011110_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011111
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011112 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011113else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011114
Martin v. Löwis11437992002-04-12 09:54:03 +000011115 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11116echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11117if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11118 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011119else
Martin v. Löwis11437992002-04-12 09:54:03 +000011120 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011121LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011122cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011123#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011124/* confdefs.h. */
11125_ACEOF
11126cat confdefs.h >>conftest.$ac_ext
11127cat >>conftest.$ac_ext <<_ACEOF
11128/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011129
Greg Steinadf63d62000-07-05 10:38:09 +000011130/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011131#ifdef __cplusplus
11132extern "C"
11133#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011134/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011135 builtin and then its argument prototype would still apply. */
11136char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011137int
11138main ()
11139{
11140pthread_create ();
11141 ;
11142 return 0;
11143}
11144_ACEOF
11145rm -f conftest.$ac_objext conftest$ac_exeext
11146if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011147 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011148 ac_status=$?
11149 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11150 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011151 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011152 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11153 (eval $ac_try) 2>&5
11154 ac_status=$?
11155 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11156 (exit $ac_status); }; }; then
11157 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011158else
Martin v. Löwis11437992002-04-12 09:54:03 +000011159 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011160sed 's/^/| /' conftest.$ac_ext >&5
11161
Martin v. Löwis11437992002-04-12 09:54:03 +000011162ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011163fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011164rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011165LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011166fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011167echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11168echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11169if test $ac_cv_lib_pthreads_pthread_create = yes; then
11170 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011171#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011172_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011173
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011174 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011175 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011176 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011177else
Greg Steinadf63d62000-07-05 10:38:09 +000011178
Martin v. Löwis11437992002-04-12 09:54:03 +000011179 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11180echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11181if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11182 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011183else
Martin v. Löwis11437992002-04-12 09:54:03 +000011184 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011185LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011186cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011187#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011188/* confdefs.h. */
11189_ACEOF
11190cat confdefs.h >>conftest.$ac_ext
11191cat >>conftest.$ac_ext <<_ACEOF
11192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011193
Guido van Rossum49545951997-12-02 19:28:29 +000011194/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011195#ifdef __cplusplus
11196extern "C"
11197#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011198/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011199 builtin and then its argument prototype would still apply. */
11200char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011201int
11202main ()
11203{
11204pthread_create ();
11205 ;
11206 return 0;
11207}
11208_ACEOF
11209rm -f conftest.$ac_objext conftest$ac_exeext
11210if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011211 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011212 ac_status=$?
11213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11214 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011215 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011216 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11217 (eval $ac_try) 2>&5
11218 ac_status=$?
11219 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11220 (exit $ac_status); }; }; then
11221 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011222else
Martin v. Löwis11437992002-04-12 09:54:03 +000011223 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011224sed 's/^/| /' conftest.$ac_ext >&5
11225
Martin v. Löwis11437992002-04-12 09:54:03 +000011226ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011227fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011228rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011229LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011230fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011231echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11232echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11233if test $ac_cv_lib_c_r_pthread_create = yes; then
11234 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011235#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011236_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011237
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011238 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011239 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011240 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011241else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011242
Martin v. Löwis11437992002-04-12 09:54:03 +000011243 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11244echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11245if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11246 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011247else
Martin v. Löwis11437992002-04-12 09:54:03 +000011248 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011249LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011250cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011251#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011252/* confdefs.h. */
11253_ACEOF
11254cat confdefs.h >>conftest.$ac_ext
11255cat >>conftest.$ac_ext <<_ACEOF
11256/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011257
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011258/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011259#ifdef __cplusplus
11260extern "C"
11261#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011262/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011263 builtin and then its argument prototype would still apply. */
11264char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011265int
11266main ()
11267{
11268__pthread_create_system ();
11269 ;
11270 return 0;
11271}
11272_ACEOF
11273rm -f conftest.$ac_objext conftest$ac_exeext
11274if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011275 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011276 ac_status=$?
11277 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11278 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011279 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11281 (eval $ac_try) 2>&5
11282 ac_status=$?
11283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11284 (exit $ac_status); }; }; then
11285 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011286else
Martin v. Löwis11437992002-04-12 09:54:03 +000011287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011288sed 's/^/| /' conftest.$ac_ext >&5
11289
Martin v. Löwis11437992002-04-12 09:54:03 +000011290ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011291fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011292rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011293LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011294fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011295echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11296echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11297if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11298 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011299#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011300_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011301
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011302 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011303 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011304 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011305else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011306
Martin v. Löwis11437992002-04-12 09:54:03 +000011307 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11308echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11309if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11310 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011311else
Martin v. Löwis11437992002-04-12 09:54:03 +000011312 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011313LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011314cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011315#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011316/* confdefs.h. */
11317_ACEOF
11318cat confdefs.h >>conftest.$ac_ext
11319cat >>conftest.$ac_ext <<_ACEOF
11320/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011321
Guido van Rossumb93a8621998-05-07 13:27:32 +000011322/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011323#ifdef __cplusplus
11324extern "C"
11325#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011326/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011327 builtin and then its argument prototype would still apply. */
11328char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011329int
11330main ()
11331{
11332pthread_create ();
11333 ;
11334 return 0;
11335}
11336_ACEOF
11337rm -f conftest.$ac_objext conftest$ac_exeext
11338if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011339 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011340 ac_status=$?
11341 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11342 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011343 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011344 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11345 (eval $ac_try) 2>&5
11346 ac_status=$?
11347 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11348 (exit $ac_status); }; }; then
11349 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011350else
Martin v. Löwis11437992002-04-12 09:54:03 +000011351 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011352sed 's/^/| /' conftest.$ac_ext >&5
11353
Martin v. Löwis11437992002-04-12 09:54:03 +000011354ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011355fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011356rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011357LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011358fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011359echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11360echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11361if test $ac_cv_lib_cma_pthread_create = yes; then
11362 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011363#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011364_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011365
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011366 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011367 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011368 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011369else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011370
Martin v. Löwis130fb172001-07-19 11:00:41 +000011371 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011372fi
11373
Guido van Rossum627b2d71993-12-24 10:39:16 +000011374
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011375fi
11376
Guido van Rossum0be3e491997-05-22 20:33:33 +000011377fi
11378
Guido van Rossum49545951997-12-02 19:28:29 +000011379fi
11380
Guido van Rossumb93a8621998-05-07 13:27:32 +000011381fi
11382
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011383
Michael W. Hudson54241132001-12-07 15:38:26 +000011384fi
11385
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011386
11387fi
11388
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011389fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011390rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011391fi;
11392fi
11393
11394
11395fi
11396
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011397
Michael W. Hudson54241132001-12-07 15:38:26 +000011398
Martin v. Löwis11437992002-04-12 09:54:03 +000011399 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11400echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11401if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11402 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011403else
Martin v. Löwis11437992002-04-12 09:54:03 +000011404 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011405LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011406cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011407#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011408/* confdefs.h. */
11409_ACEOF
11410cat confdefs.h >>conftest.$ac_ext
11411cat >>conftest.$ac_ext <<_ACEOF
11412/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011413
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011414/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011415#ifdef __cplusplus
11416extern "C"
11417#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011418/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011419 builtin and then its argument prototype would still apply. */
11420char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011421int
11422main ()
11423{
11424usconfig ();
11425 ;
11426 return 0;
11427}
11428_ACEOF
11429rm -f conftest.$ac_objext conftest$ac_exeext
11430if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011431 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011432 ac_status=$?
11433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11434 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011435 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011436 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11437 (eval $ac_try) 2>&5
11438 ac_status=$?
11439 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11440 (exit $ac_status); }; }; then
11441 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011442else
Martin v. Löwis11437992002-04-12 09:54:03 +000011443 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011444sed 's/^/| /' conftest.$ac_ext >&5
11445
Martin v. Löwis11437992002-04-12 09:54:03 +000011446ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011447fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011448rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011449LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011450fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011451echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11452echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11453if test $ac_cv_lib_mpc_usconfig = yes; then
11454 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011455#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011456_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011457
Martin v. Löwis130fb172001-07-19 11:00:41 +000011458 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011459 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011460 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011461fi
11462
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011463
Neal Norwitza978ab02002-11-02 16:58:05 +000011464 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011465 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11466echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11467if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11468 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011469else
Martin v. Löwis11437992002-04-12 09:54:03 +000011470 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011471LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011472cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011473#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011474/* confdefs.h. */
11475_ACEOF
11476cat confdefs.h >>conftest.$ac_ext
11477cat >>conftest.$ac_ext <<_ACEOF
11478/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011479
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011480/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011481#ifdef __cplusplus
11482extern "C"
11483#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011484/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011485 builtin and then its argument prototype would still apply. */
11486char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011487int
11488main ()
11489{
11490thr_create ();
11491 ;
11492 return 0;
11493}
11494_ACEOF
11495rm -f conftest.$ac_objext conftest$ac_exeext
11496if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011497 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011498 ac_status=$?
11499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11500 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011501 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11503 (eval $ac_try) 2>&5
11504 ac_status=$?
11505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11506 (exit $ac_status); }; }; then
11507 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011508else
Martin v. Löwis11437992002-04-12 09:54:03 +000011509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011510sed 's/^/| /' conftest.$ac_ext >&5
11511
Martin v. Löwis11437992002-04-12 09:54:03 +000011512ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011513fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011514rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011515LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011516fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011517echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11518echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11519if test $ac_cv_lib_thread_thr_create = yes; then
11520 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011521#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011522_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011523
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011524 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011525 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011526 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011527fi
11528
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011529 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011530
Martin v. Löwis130fb172001-07-19 11:00:41 +000011531 if test "$USE_THREAD_MODULE" != "#"
11532 then
11533 # If the above checks didn't disable threads, (at least) OSF1
11534 # needs this '-threads' argument during linking.
11535 case $ac_sys_system in
11536 OSF1) LDLAST=-threads;;
11537 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011538 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011539fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011540
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011541if test "$posix_threads" = "yes"; then
11542 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011543
11544cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011545#define _POSIX_THREADS 1
11546_ACEOF
11547
11548 fi
11549
11550 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11551 case $ac_sys_system/$ac_sys_release in
11552 SunOS/5.6)
11553cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011554#define HAVE_PTHREAD_DESTRUCTOR 1
11555_ACEOF
11556
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011557 ;;
11558 SunOS/5.8)
11559cat >>confdefs.h <<\_ACEOF
11560#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11561_ACEOF
11562
11563 ;;
11564 esac
11565
11566 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11567echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11568 if test "${ac_cv_pthread_system_supported+set}" = set; then
11569 echo $ECHO_N "(cached) $ECHO_C" >&6
11570else
11571 if test "$cross_compiling" = yes; then
11572 ac_cv_pthread_system_supported=no
11573else
11574 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011575#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011576/* confdefs.h. */
11577_ACEOF
11578cat confdefs.h >>conftest.$ac_ext
11579cat >>conftest.$ac_ext <<_ACEOF
11580/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011581#include <pthread.h>
11582 void *foo(void *parm) {
11583 return NULL;
11584 }
11585 main() {
11586 pthread_attr_t attr;
11587 pthread_t id;
11588 if (pthread_attr_init(&attr)) exit(-1);
11589 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11590 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11591 exit(0);
11592 }
11593_ACEOF
11594rm -f conftest$ac_exeext
11595if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11596 (eval $ac_link) 2>&5
11597 ac_status=$?
11598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11599 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11600 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11601 (eval $ac_try) 2>&5
11602 ac_status=$?
11603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11604 (exit $ac_status); }; }; then
11605 ac_cv_pthread_system_supported=yes
11606else
11607 echo "$as_me: program exited with status $ac_status" >&5
11608echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011609sed 's/^/| /' conftest.$ac_ext >&5
11610
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011611( exit $ac_status )
11612ac_cv_pthread_system_supported=no
11613fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011614rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011615fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011616
Guido van Rossum627b2d71993-12-24 10:39:16 +000011617fi
11618
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011619 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11620echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11621 if test "$ac_cv_pthread_system_supported" = "yes"; then
11622
11623cat >>confdefs.h <<\_ACEOF
11624#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11625_ACEOF
11626
11627 fi
11628
11629for ac_func in pthread_sigmask
11630do
11631as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11632echo "$as_me:$LINENO: checking for $ac_func" >&5
11633echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11634if eval "test \"\${$as_ac_var+set}\" = set"; then
11635 echo $ECHO_N "(cached) $ECHO_C" >&6
11636else
11637 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011638#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011639/* confdefs.h. */
11640_ACEOF
11641cat confdefs.h >>conftest.$ac_ext
11642cat >>conftest.$ac_ext <<_ACEOF
11643/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011644/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011645 which can conflict with char $ac_func (); below.
11646 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011647 <limits.h> exists even on freestanding compilers. Under hpux,
11648 including <limits.h> includes <sys/time.h> and causes problems
11649 checking for functions defined therein. */
11650#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011651# include <limits.h>
11652#else
11653# include <assert.h>
11654#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011655/* Override any gcc2 internal prototype to avoid an error. */
11656#ifdef __cplusplus
11657extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011658{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011659#endif
11660/* We use char because int might match the return type of a gcc2
11661 builtin and then its argument prototype would still apply. */
11662char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011663/* The GNU C library defines this for functions which it implements
11664 to always fail with ENOSYS. Some functions are actually named
11665 something starting with __ and the normal name is an alias. */
11666#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11667choke me
11668#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011669char (*f) () = $ac_func;
11670#endif
11671#ifdef __cplusplus
11672}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011673#endif
11674
Skip Montanaro6dead952003-09-25 14:50:04 +000011675int
11676main ()
11677{
11678return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011679 ;
11680 return 0;
11681}
11682_ACEOF
11683rm -f conftest.$ac_objext conftest$ac_exeext
11684if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011685 (eval $ac_link) 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011686 ac_status=$?
11687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11688 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011689 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011690 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11691 (eval $ac_try) 2>&5
11692 ac_status=$?
11693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11694 (exit $ac_status); }; }; then
11695 eval "$as_ac_var=yes"
11696else
11697 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011698sed 's/^/| /' conftest.$ac_ext >&5
11699
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011700eval "$as_ac_var=no"
11701fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011702rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011703fi
11704echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11705echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11706if test `eval echo '${'$as_ac_var'}'` = yes; then
11707 cat >>confdefs.h <<_ACEOF
11708#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11709_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011710 case $ac_sys_system in
11711 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011712
Jason Tishlerfac083d2003-07-22 15:20:49 +000011713cat >>confdefs.h <<\_ACEOF
11714#define HAVE_BROKEN_PTHREAD_SIGMASK 1
11715_ACEOF
11716
11717 ;;
11718 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011719fi
11720done
11721
11722fi
11723
11724
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011725# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011726
11727
11728echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11729echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011730# Check whether --enable-ipv6 or --disable-ipv6 was given.
11731if test "${enable_ipv6+set}" = set; then
11732 enableval="$enable_ipv6"
11733 case "$enableval" in
11734 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011735 echo "$as_me:$LINENO: result: no" >&5
11736echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011737 ipv6=no
11738 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011739 *) echo "$as_me:$LINENO: result: yes" >&5
11740echo "${ECHO_T}yes" >&6
11741 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011742#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011743_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011744
11745 ipv6=yes
11746 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011747 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011748else
Martin v. Löwis11437992002-04-12 09:54:03 +000011749
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011750 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011751 echo "$as_me:$LINENO: result: no" >&5
11752echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011753 ipv6=no
11754
11755else
Martin v. Löwis11437992002-04-12 09:54:03 +000011756 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011757#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011758/* confdefs.h. */
11759_ACEOF
11760cat confdefs.h >>conftest.$ac_ext
11761cat >>conftest.$ac_ext <<_ACEOF
11762/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011763 /* AF_INET6 available check */
11764#include <sys/types.h>
11765#include <sys/socket.h>
11766main()
11767{
11768 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11769 exit(1);
11770 else
11771 exit(0);
11772}
11773
Martin v. Löwis11437992002-04-12 09:54:03 +000011774_ACEOF
11775rm -f conftest$ac_exeext
11776if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11777 (eval $ac_link) 2>&5
11778 ac_status=$?
11779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11780 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11782 (eval $ac_try) 2>&5
11783 ac_status=$?
11784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11785 (exit $ac_status); }; }; then
11786 echo "$as_me:$LINENO: result: yes" >&5
11787echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011788 ipv6=yes
11789else
Martin v. Löwis11437992002-04-12 09:54:03 +000011790 echo "$as_me: program exited with status $ac_status" >&5
11791echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011792sed 's/^/| /' conftest.$ac_ext >&5
11793
Martin v. Löwis11437992002-04-12 09:54:03 +000011794( exit $ac_status )
11795echo "$as_me:$LINENO: result: no" >&5
11796echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011797 ipv6=no
11798fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011799rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011800fi
11801
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011802if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011803 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11804echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11805 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011806#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011807/* confdefs.h. */
11808_ACEOF
11809cat confdefs.h >>conftest.$ac_ext
11810cat >>conftest.$ac_ext <<_ACEOF
11811/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011812#include <sys/types.h>
11813#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011814int
11815main ()
11816{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011817struct sockaddr_in6 x;
11818x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011819 ;
11820 return 0;
11821}
11822_ACEOF
11823rm -f conftest.$ac_objext
11824if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011825 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011826 ac_status=$?
11827 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11828 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011829 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011830 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11831 (eval $ac_try) 2>&5
11832 ac_status=$?
11833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11834 (exit $ac_status); }; }; then
11835 echo "$as_me:$LINENO: result: yes" >&5
11836echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011837 ipv6=yes
11838else
Martin v. Löwis11437992002-04-12 09:54:03 +000011839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011840sed 's/^/| /' conftest.$ac_ext >&5
11841
Martin v. Löwis11437992002-04-12 09:54:03 +000011842echo "$as_me:$LINENO: result: no" >&5
11843echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011844 ipv6=no
11845fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011846rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011847fi
11848
11849if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011850 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011851#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011852_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011853
11854fi
11855
Martin v. Löwis11437992002-04-12 09:54:03 +000011856fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011857
11858ipv6type=unknown
11859ipv6lib=none
11860ipv6trylibc=no
11861
11862if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011863 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11864echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011865 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11866 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011867 case $i in
11868 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011869 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011870#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011871/* confdefs.h. */
11872_ACEOF
11873cat confdefs.h >>conftest.$ac_ext
11874cat >>conftest.$ac_ext <<_ACEOF
11875/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011876
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011877#include <netinet/in.h>
11878#ifdef IPV6_INRIA_VERSION
11879yes
11880#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011881_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011882if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011883 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011884 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011885fi
11886rm -f conftest*
11887
11888 ;;
11889 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011890 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011891#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011892/* confdefs.h. */
11893_ACEOF
11894cat confdefs.h >>conftest.$ac_ext
11895cat >>conftest.$ac_ext <<_ACEOF
11896/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011897
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011898#include <netinet/in.h>
11899#ifdef __KAME__
11900yes
11901#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011902_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011903if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011904 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011905 ipv6type=$i;
11906 ipv6lib=inet6
11907 ipv6libdir=/usr/local/v6/lib
11908 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011909fi
11910rm -f conftest*
11911
11912 ;;
11913 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011914 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011915#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011916/* confdefs.h. */
11917_ACEOF
11918cat confdefs.h >>conftest.$ac_ext
11919cat >>conftest.$ac_ext <<_ACEOF
11920/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011921
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011922#include <features.h>
11923#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11924yes
11925#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011926_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011927if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011928 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011929 ipv6type=$i;
11930 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011931fi
11932rm -f conftest*
11933
11934 ;;
11935 linux-inet6)
11936 if test -d /usr/inet6; then
11937 ipv6type=$i
11938 ipv6lib=inet6
11939 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011940 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011941 fi
11942 ;;
11943 solaris)
11944 if test -f /etc/netconfig; then
11945 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11946 ipv6type=$i
11947 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011948 fi
11949 fi
11950 ;;
11951 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011952 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011953#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011954/* confdefs.h. */
11955_ACEOF
11956cat confdefs.h >>conftest.$ac_ext
11957cat >>conftest.$ac_ext <<_ACEOF
11958/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011959
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011960#include <sys/param.h>
11961#ifdef _TOSHIBA_INET6
11962yes
11963#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011964_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011965if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011966 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011967 ipv6type=$i;
11968 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011969 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011970fi
11971rm -f conftest*
11972
11973 ;;
11974 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011975 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011976#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011977/* confdefs.h. */
11978_ACEOF
11979cat confdefs.h >>conftest.$ac_ext
11980cat >>conftest.$ac_ext <<_ACEOF
11981/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011982
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011983#include </usr/local/v6/include/sys/v6config.h>
11984#ifdef __V6D__
11985yes
11986#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011987_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011988if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011989 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011990 ipv6type=$i;
11991 ipv6lib=v6;
11992 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011993 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011994fi
11995rm -f conftest*
11996
11997 ;;
11998 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011999 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012000#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012001/* confdefs.h. */
12002_ACEOF
12003cat confdefs.h >>conftest.$ac_ext
12004cat >>conftest.$ac_ext <<_ACEOF
12005/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000012006
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012007#include <sys/param.h>
12008#ifdef _ZETA_MINAMI_INET6
12009yes
12010#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012011_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012012if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012013 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012014 ipv6type=$i;
12015 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012016 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012017fi
12018rm -f conftest*
12019
12020 ;;
12021 esac
12022 if test "$ipv6type" != "unknown"; then
12023 break
12024 fi
12025 done
Martin v. Löwis11437992002-04-12 09:54:03 +000012026 echo "$as_me:$LINENO: result: $ipv6type" >&5
12027echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012028fi
12029
12030if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
12031 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
12032 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
12033 echo "using lib$ipv6lib"
12034 else
12035 if test $ipv6trylibc = "yes"; then
12036 echo "using libc"
12037 else
12038 echo 'Fatal: no $ipv6lib library found. cannot continue.'
12039 echo "You need to fetch lib$ipv6lib.a from appropriate"
12040 echo 'ipv6 kit and compile beforehand.'
12041 exit 1
12042 fi
12043 fi
12044fi
12045
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012046# Check for --with-doc-strings
12047echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
12048echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
12049
12050# Check whether --with-doc-strings or --without-doc-strings was given.
12051if test "${with_doc_strings+set}" = set; then
12052 withval="$with_doc_strings"
12053
12054fi;
12055
12056if test -z "$with_doc_strings"
12057then with_doc_strings="yes"
12058fi
12059if test "$with_doc_strings" != "no"
12060then
12061
12062cat >>confdefs.h <<\_ACEOF
12063#define WITH_DOC_STRINGS 1
12064_ACEOF
12065
12066fi
12067echo "$as_me:$LINENO: result: $with_doc_strings" >&5
12068echo "${ECHO_T}$with_doc_strings" >&6
12069
Neil Schemenauera35c6882001-02-27 04:45:05 +000012070# Check for Python-specific malloc support
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000012071echo "$as_me:$LINENO: checking for --with-tsc" >&5
12072echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6
12073
12074# Check whether --with-tsc or --without-tsc was given.
12075if test "${with_tsc+set}" = set; then
12076 withval="$with_tsc"
12077
12078if test "$withval" != no
12079then
12080
12081cat >>confdefs.h <<\_ACEOF
12082#define WITH_TSC 1
12083_ACEOF
12084
12085 echo "$as_me:$LINENO: result: yes" >&5
12086echo "${ECHO_T}yes" >&6
12087else echo "$as_me:$LINENO: result: no" >&5
12088echo "${ECHO_T}no" >&6
12089fi
12090else
12091 echo "$as_me:$LINENO: result: no" >&5
12092echo "${ECHO_T}no" >&6
12093fi;
12094
12095# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000012096echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
12097echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
12098
Neil Schemenauera35c6882001-02-27 04:45:05 +000012099# Check whether --with-pymalloc or --without-pymalloc was given.
12100if test "${with_pymalloc+set}" = set; then
12101 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000012102
Martin v. Löwis11437992002-04-12 09:54:03 +000012103fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000012104
Neil Schemenauer16c22972002-03-22 15:34:49 +000012105if test -z "$with_pymalloc"
12106then with_pymalloc="yes"
12107fi
12108if test "$with_pymalloc" != "no"
12109then
Martin v. Löwis11437992002-04-12 09:54:03 +000012110
12111cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012112#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012113_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012114
12115fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012116echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12117echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012118
Barry Warsawef82cd72000-06-30 16:21:01 +000012119# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012120echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12121echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12122
Barry Warsawef82cd72000-06-30 16:21:01 +000012123# Check whether --with-wctype-functions or --without-wctype-functions was given.
12124if test "${with_wctype_functions+set}" = set; then
12125 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012126
Barry Warsawef82cd72000-06-30 16:21:01 +000012127if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012128then
12129
12130cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012131#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012132_ACEOF
12133
12134 echo "$as_me:$LINENO: result: yes" >&5
12135echo "${ECHO_T}yes" >&6
12136else echo "$as_me:$LINENO: result: no" >&5
12137echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012138fi
12139else
Martin v. Löwis11437992002-04-12 09:54:03 +000012140 echo "$as_me:$LINENO: result: no" >&5
12141echo "${ECHO_T}no" >&6
12142fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012143
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012144# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012145
Guido van Rossum98935bf2001-09-05 19:13:16 +000012146DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012147
Guido van Rossume97ee181999-12-20 21:27:22 +000012148# the dlopen() function means we might want to use dynload_shlib.o. some
12149# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012150
Thomas Wouters3a584202000-08-05 23:28:51 +000012151for ac_func in dlopen
12152do
Martin v. Löwis11437992002-04-12 09:54:03 +000012153as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12154echo "$as_me:$LINENO: checking for $ac_func" >&5
12155echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12156if eval "test \"\${$as_ac_var+set}\" = set"; then
12157 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012158else
Martin v. Löwis11437992002-04-12 09:54:03 +000012159 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012160#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012161/* confdefs.h. */
12162_ACEOF
12163cat confdefs.h >>conftest.$ac_ext
12164cat >>conftest.$ac_ext <<_ACEOF
12165/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012166/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012167 which can conflict with char $ac_func (); below.
12168 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012169 <limits.h> exists even on freestanding compilers. Under hpux,
12170 including <limits.h> includes <sys/time.h> and causes problems
12171 checking for functions defined therein. */
12172#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012173# include <limits.h>
12174#else
12175# include <assert.h>
12176#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012177/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012178#ifdef __cplusplus
12179extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012180{
Martin v. Löwis11437992002-04-12 09:54:03 +000012181#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012182/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012183 builtin and then its argument prototype would still apply. */
12184char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012185/* The GNU C library defines this for functions which it implements
12186 to always fail with ENOSYS. Some functions are actually named
12187 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012188#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012189choke me
12190#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012191char (*f) () = $ac_func;
12192#endif
12193#ifdef __cplusplus
12194}
Guido van Rossume97ee181999-12-20 21:27:22 +000012195#endif
12196
Skip Montanaro6dead952003-09-25 14:50:04 +000012197int
12198main ()
12199{
12200return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012201 ;
12202 return 0;
12203}
12204_ACEOF
12205rm -f conftest.$ac_objext conftest$ac_exeext
12206if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012207 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012208 ac_status=$?
12209 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12210 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012211 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012212 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12213 (eval $ac_try) 2>&5
12214 ac_status=$?
12215 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12216 (exit $ac_status); }; }; then
12217 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012218else
Martin v. Löwis11437992002-04-12 09:54:03 +000012219 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012220sed 's/^/| /' conftest.$ac_ext >&5
12221
Martin v. Löwis11437992002-04-12 09:54:03 +000012222eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012223fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012224rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012225fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012226echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12227echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12228if test `eval echo '${'$as_ac_var'}'` = yes; then
12229 cat >>confdefs.h <<_ACEOF
12230#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12231_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012232
Guido van Rossume97ee181999-12-20 21:27:22 +000012233fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012234done
Guido van Rossume97ee181999-12-20 21:27:22 +000012235
Michael W. Hudson54241132001-12-07 15:38:26 +000012236
Guido van Rossume97ee181999-12-20 21:27:22 +000012237# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12238# loading of modules.
12239
Martin v. Löwis11437992002-04-12 09:54:03 +000012240echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12241echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012242if test -z "$DYNLOADFILE"
12243then
12244 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000012245 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
12246 if test "$ac_cv_func_dlopen" = yes
12247 then DYNLOADFILE="dynload_shlib.o"
12248 else DYNLOADFILE="dynload_aix.o"
12249 fi
12250 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000012251 BeOS*) DYNLOADFILE="dynload_beos.o";;
12252 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012253 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012254 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012255 *)
12256 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12257 # out any dynamic loading
12258 if test "$ac_cv_func_dlopen" = yes
12259 then DYNLOADFILE="dynload_shlib.o"
12260 else DYNLOADFILE="dynload_stub.o"
12261 fi
12262 ;;
12263 esac
12264fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012265echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12266echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012267if test "$DYNLOADFILE" != "dynload_stub.o"
12268then
Martin v. Löwis11437992002-04-12 09:54:03 +000012269
12270cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012271#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012272_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012273
12274fi
12275
Neil Schemenauer4e425612001-06-19 15:44:15 +000012276# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12277
Michael W. Hudson54241132001-12-07 15:38:26 +000012278
Martin v. Löwis11437992002-04-12 09:54:03 +000012279echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12280echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012281if test -z "$MACHDEP_OBJS"
12282then
Jack Jansene578a632001-08-15 01:27:14 +000012283 MACHDEP_OBJS=$extra_machdep_objs
12284else
12285 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012286fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012287echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12288echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012289
Guido van Rossum627b2d71993-12-24 10:39:16 +000012290# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012291
12292
12293
12294
12295
12296
12297
12298
12299
12300
12301
12302
12303
12304
12305
12306
12307
12308
12309
12310
12311
12312
12313
12314
12315
12316
12317
12318
12319
12320
12321
12322
12323
12324
12325
12326
12327
12328
12329
12330
12331
12332
12333
12334
12335
12336
12337
12338
12339
12340
12341
12342
12343
12344
12345
12346
12347
12348
12349
12350
12351
12352
12353
12354
12355
12356
12357
12358
12359
12360
12361
Martin v. Löwisd6320502004-08-12 13:45:08 +000012362
12363for ac_func in alarm bind_textdomain_codeset chown clock confstr ctermid \
12364 execv fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012365 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000012366 getpriority getpwent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012367 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012368 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012369 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012370 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012371 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000012372 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012373 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012374 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012375do
Martin v. Löwis11437992002-04-12 09:54:03 +000012376as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12377echo "$as_me:$LINENO: checking for $ac_func" >&5
12378echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12379if eval "test \"\${$as_ac_var+set}\" = set"; then
12380 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012381else
Martin v. Löwis11437992002-04-12 09:54:03 +000012382 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012383#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012384/* confdefs.h. */
12385_ACEOF
12386cat confdefs.h >>conftest.$ac_ext
12387cat >>conftest.$ac_ext <<_ACEOF
12388/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012389/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012390 which can conflict with char $ac_func (); below.
12391 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012392 <limits.h> exists even on freestanding compilers. Under hpux,
12393 including <limits.h> includes <sys/time.h> and causes problems
12394 checking for functions defined therein. */
12395#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012396# include <limits.h>
12397#else
12398# include <assert.h>
12399#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012400/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012401#ifdef __cplusplus
12402extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012403{
Martin v. Löwis11437992002-04-12 09:54:03 +000012404#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012405/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012406 builtin and then its argument prototype would still apply. */
12407char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000012408/* The GNU C library defines this for functions which it implements
12409 to always fail with ENOSYS. Some functions are actually named
12410 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012411#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012412choke me
12413#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012414char (*f) () = $ac_func;
12415#endif
12416#ifdef __cplusplus
12417}
Guido van Rossum627b2d71993-12-24 10:39:16 +000012418#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012419
Skip Montanaro6dead952003-09-25 14:50:04 +000012420int
12421main ()
12422{
12423return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012424 ;
12425 return 0;
12426}
12427_ACEOF
12428rm -f conftest.$ac_objext conftest$ac_exeext
12429if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012430 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012431 ac_status=$?
12432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12433 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012434 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012435 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12436 (eval $ac_try) 2>&5
12437 ac_status=$?
12438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12439 (exit $ac_status); }; }; then
12440 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012441else
Martin v. Löwis11437992002-04-12 09:54:03 +000012442 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012443sed 's/^/| /' conftest.$ac_ext >&5
12444
Martin v. Löwis11437992002-04-12 09:54:03 +000012445eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012446fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012447rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012448fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012449echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12450echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12451if test `eval echo '${'$as_ac_var'}'` = yes; then
12452 cat >>confdefs.h <<_ACEOF
12453#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12454_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012455
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012456fi
12457done
12458
Michael W. Hudson54241132001-12-07 15:38:26 +000012459
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012460# For some functions, having a definition is not sufficient, since
12461# we want to take their address.
12462echo "$as_me:$LINENO: checking for chroot" >&5
12463echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12464cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012465#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012466/* confdefs.h. */
12467_ACEOF
12468cat confdefs.h >>conftest.$ac_ext
12469cat >>conftest.$ac_ext <<_ACEOF
12470/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012471#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012472int
12473main ()
12474{
12475void *x=chroot
12476 ;
12477 return 0;
12478}
12479_ACEOF
12480rm -f conftest.$ac_objext
12481if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012482 (eval $ac_compile) 2>&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012483 ac_status=$?
12484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12485 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012486 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012487 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12488 (eval $ac_try) 2>&5
12489 ac_status=$?
12490 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12491 (exit $ac_status); }; }; then
12492
12493cat >>confdefs.h <<\_ACEOF
12494#define HAVE_CHROOT 1
12495_ACEOF
12496
12497 echo "$as_me:$LINENO: result: yes" >&5
12498echo "${ECHO_T}yes" >&6
12499else
12500 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012501sed 's/^/| /' conftest.$ac_ext >&5
12502
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012503echo "$as_me:$LINENO: result: no" >&5
12504echo "${ECHO_T}no" >&6
12505
12506fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012507rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012508echo "$as_me:$LINENO: checking for link" >&5
12509echo $ECHO_N "checking for link... $ECHO_C" >&6
12510cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012511#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012512/* confdefs.h. */
12513_ACEOF
12514cat confdefs.h >>conftest.$ac_ext
12515cat >>conftest.$ac_ext <<_ACEOF
12516/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012517#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012518int
12519main ()
12520{
12521void *x=link
12522 ;
12523 return 0;
12524}
12525_ACEOF
12526rm -f conftest.$ac_objext
12527if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012528 (eval $ac_compile) 2>&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012529 ac_status=$?
12530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12531 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012532 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12534 (eval $ac_try) 2>&5
12535 ac_status=$?
12536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12537 (exit $ac_status); }; }; then
12538
12539cat >>confdefs.h <<\_ACEOF
12540#define HAVE_LINK 1
12541_ACEOF
12542
12543 echo "$as_me:$LINENO: result: yes" >&5
12544echo "${ECHO_T}yes" >&6
12545else
12546 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012547sed 's/^/| /' conftest.$ac_ext >&5
12548
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012549echo "$as_me:$LINENO: result: no" >&5
12550echo "${ECHO_T}no" >&6
12551
12552fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012553rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012554echo "$as_me:$LINENO: checking for symlink" >&5
12555echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12556cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012557#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012558/* confdefs.h. */
12559_ACEOF
12560cat confdefs.h >>conftest.$ac_ext
12561cat >>conftest.$ac_ext <<_ACEOF
12562/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012563#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012564int
12565main ()
12566{
12567void *x=symlink
12568 ;
12569 return 0;
12570}
12571_ACEOF
12572rm -f conftest.$ac_objext
12573if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012574 (eval $ac_compile) 2>&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012575 ac_status=$?
12576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12577 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012578 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012579 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12580 (eval $ac_try) 2>&5
12581 ac_status=$?
12582 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12583 (exit $ac_status); }; }; then
12584
12585cat >>confdefs.h <<\_ACEOF
12586#define HAVE_SYMLINK 1
12587_ACEOF
12588
12589 echo "$as_me:$LINENO: result: yes" >&5
12590echo "${ECHO_T}yes" >&6
12591else
12592 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012593sed 's/^/| /' conftest.$ac_ext >&5
12594
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012595echo "$as_me:$LINENO: result: no" >&5
12596echo "${ECHO_T}no" >&6
12597
12598fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012599rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012600echo "$as_me:$LINENO: checking for fchdir" >&5
12601echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
12602cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012603#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012604/* confdefs.h. */
12605_ACEOF
12606cat confdefs.h >>conftest.$ac_ext
12607cat >>conftest.$ac_ext <<_ACEOF
12608/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012609#include <unistd.h>
12610int
12611main ()
12612{
12613void *x=fchdir
12614 ;
12615 return 0;
12616}
12617_ACEOF
12618rm -f conftest.$ac_objext
12619if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012620 (eval $ac_compile) 2>&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012621 ac_status=$?
12622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12623 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012624 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012625 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12626 (eval $ac_try) 2>&5
12627 ac_status=$?
12628 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12629 (exit $ac_status); }; }; then
12630
12631cat >>confdefs.h <<\_ACEOF
12632#define HAVE_FCHDIR 1
12633_ACEOF
12634
12635 echo "$as_me:$LINENO: result: yes" >&5
12636echo "${ECHO_T}yes" >&6
12637else
12638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012639sed 's/^/| /' conftest.$ac_ext >&5
12640
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012641echo "$as_me:$LINENO: result: no" >&5
12642echo "${ECHO_T}no" >&6
12643
12644fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012645rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012646echo "$as_me:$LINENO: checking for fsync" >&5
12647echo $ECHO_N "checking for fsync... $ECHO_C" >&6
12648cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012649#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012650/* confdefs.h. */
12651_ACEOF
12652cat confdefs.h >>conftest.$ac_ext
12653cat >>conftest.$ac_ext <<_ACEOF
12654/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012655#include <unistd.h>
12656int
12657main ()
12658{
12659void *x=fsync
12660 ;
12661 return 0;
12662}
12663_ACEOF
12664rm -f conftest.$ac_objext
12665if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012666 (eval $ac_compile) 2>&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012667 ac_status=$?
12668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12669 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012670 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012671 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12672 (eval $ac_try) 2>&5
12673 ac_status=$?
12674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12675 (exit $ac_status); }; }; then
12676
12677cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012678#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012679_ACEOF
12680
12681 echo "$as_me:$LINENO: result: yes" >&5
12682echo "${ECHO_T}yes" >&6
12683else
12684 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012685sed 's/^/| /' conftest.$ac_ext >&5
12686
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012687echo "$as_me:$LINENO: result: no" >&5
12688echo "${ECHO_T}no" >&6
12689
12690fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012691rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012692echo "$as_me:$LINENO: checking for fdatasync" >&5
12693echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
12694cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012695#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012696/* confdefs.h. */
12697_ACEOF
12698cat confdefs.h >>conftest.$ac_ext
12699cat >>conftest.$ac_ext <<_ACEOF
12700/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012701#include <unistd.h>
12702int
12703main ()
12704{
12705void *x=fdatasync
12706 ;
12707 return 0;
12708}
12709_ACEOF
12710rm -f conftest.$ac_objext
12711if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012712 (eval $ac_compile) 2>&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012713 ac_status=$?
12714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12715 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012716 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12718 (eval $ac_try) 2>&5
12719 ac_status=$?
12720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12721 (exit $ac_status); }; }; then
12722
12723cat >>confdefs.h <<\_ACEOF
12724#define HAVE_FDATASYNC 1
12725_ACEOF
12726
12727 echo "$as_me:$LINENO: result: yes" >&5
12728echo "${ECHO_T}yes" >&6
12729else
12730 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012731sed 's/^/| /' conftest.$ac_ext >&5
12732
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012733echo "$as_me:$LINENO: result: no" >&5
12734echo "${ECHO_T}no" >&6
12735
12736fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012737rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012738
Martin v. Löwisd5843682002-11-21 20:41:28 +000012739# On some systems (eg. FreeBSD 5), we would find a definition of the
12740# functions ctermid_r, setgroups in the library, but no prototype
12741# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12742# address to avoid compiler warnings and potential miscompilations
12743# because of the missing prototypes.
12744
12745echo "$as_me:$LINENO: checking for ctermid_r" >&5
12746echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12747cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012748#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012749/* confdefs.h. */
12750_ACEOF
12751cat confdefs.h >>conftest.$ac_ext
12752cat >>conftest.$ac_ext <<_ACEOF
12753/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012754
12755#include "confdefs.h"
12756#include <stdio.h>
12757
Martin v. Löwisd5843682002-11-21 20:41:28 +000012758int
12759main ()
12760{
12761void* p = ctermid_r
12762 ;
12763 return 0;
12764}
12765_ACEOF
12766rm -f conftest.$ac_objext
12767if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012768 (eval $ac_compile) 2>&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000012769 ac_status=$?
12770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12771 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012772 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000012773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12774 (eval $ac_try) 2>&5
12775 ac_status=$?
12776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12777 (exit $ac_status); }; }; then
12778
12779cat >>confdefs.h <<\_ACEOF
12780#define HAVE_CTERMID_R 1
12781_ACEOF
12782
12783 echo "$as_me:$LINENO: result: yes" >&5
12784echo "${ECHO_T}yes" >&6
12785else
12786 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012787sed 's/^/| /' conftest.$ac_ext >&5
12788
Martin v. Löwisd5843682002-11-21 20:41:28 +000012789echo "$as_me:$LINENO: result: no" >&5
12790echo "${ECHO_T}no" >&6
12791
12792fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012793rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012794
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012795echo "$as_me:$LINENO: checking for flock" >&5
12796echo $ECHO_N "checking for flock... $ECHO_C" >&6
12797cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012798#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012799/* confdefs.h. */
12800_ACEOF
12801cat confdefs.h >>conftest.$ac_ext
12802cat >>conftest.$ac_ext <<_ACEOF
12803/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012804
12805#include "confdefs.h"
12806#include <sys/file.h>
12807
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012808int
12809main ()
12810{
12811void* p = flock
12812 ;
12813 return 0;
12814}
12815_ACEOF
12816rm -f conftest.$ac_objext
12817if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012818 (eval $ac_compile) 2>&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012819 ac_status=$?
12820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12821 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012822 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012823 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12824 (eval $ac_try) 2>&5
12825 ac_status=$?
12826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12827 (exit $ac_status); }; }; then
12828
12829cat >>confdefs.h <<\_ACEOF
12830#define HAVE_FLOCK 1
12831_ACEOF
12832
12833 echo "$as_me:$LINENO: result: yes" >&5
12834echo "${ECHO_T}yes" >&6
12835else
12836 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012837sed 's/^/| /' conftest.$ac_ext >&5
12838
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012839echo "$as_me:$LINENO: result: no" >&5
12840echo "${ECHO_T}no" >&6
12841
12842fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012843rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012844
12845echo "$as_me:$LINENO: checking for getpagesize" >&5
12846echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12847cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012848#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012849/* confdefs.h. */
12850_ACEOF
12851cat confdefs.h >>conftest.$ac_ext
12852cat >>conftest.$ac_ext <<_ACEOF
12853/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012854
12855#include "confdefs.h"
12856#include <unistd.h>
12857
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012858int
12859main ()
12860{
12861void* p = getpagesize
12862 ;
12863 return 0;
12864}
12865_ACEOF
12866rm -f conftest.$ac_objext
12867if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012868 (eval $ac_compile) 2>&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012869 ac_status=$?
12870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12871 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012872 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12874 (eval $ac_try) 2>&5
12875 ac_status=$?
12876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12877 (exit $ac_status); }; }; then
12878
12879cat >>confdefs.h <<\_ACEOF
12880#define HAVE_GETPAGESIZE 1
12881_ACEOF
12882
12883 echo "$as_me:$LINENO: result: yes" >&5
12884echo "${ECHO_T}yes" >&6
12885else
12886 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012887sed 's/^/| /' conftest.$ac_ext >&5
12888
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012889echo "$as_me:$LINENO: result: no" >&5
12890echo "${ECHO_T}no" >&6
12891
12892fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012893rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012894
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012895for ac_prog in true
12896do
12897 # Extract the first word of "$ac_prog", so it can be a program name with args.
12898set dummy $ac_prog; ac_word=$2
12899echo "$as_me:$LINENO: checking for $ac_word" >&5
12900echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12901if test "${ac_cv_prog_TRUE+set}" = set; then
12902 echo $ECHO_N "(cached) $ECHO_C" >&6
12903else
12904 if test -n "$TRUE"; then
12905 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12906else
12907as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12908for as_dir in $PATH
12909do
12910 IFS=$as_save_IFS
12911 test -z "$as_dir" && as_dir=.
12912 for ac_exec_ext in '' $ac_executable_extensions; do
12913 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12914 ac_cv_prog_TRUE="$ac_prog"
12915 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12916 break 2
12917 fi
12918done
12919done
12920
12921fi
12922fi
12923TRUE=$ac_cv_prog_TRUE
12924if test -n "$TRUE"; then
12925 echo "$as_me:$LINENO: result: $TRUE" >&5
12926echo "${ECHO_T}$TRUE" >&6
12927else
12928 echo "$as_me:$LINENO: result: no" >&5
12929echo "${ECHO_T}no" >&6
12930fi
12931
12932 test -n "$TRUE" && break
12933done
12934test -n "$TRUE" || TRUE="/bin/true"
12935
12936
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012937echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12938echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12939if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12940 echo $ECHO_N "(cached) $ECHO_C" >&6
12941else
12942 ac_check_lib_save_LIBS=$LIBS
12943LIBS="-lc $LIBS"
12944cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012945#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012946/* confdefs.h. */
12947_ACEOF
12948cat confdefs.h >>conftest.$ac_ext
12949cat >>conftest.$ac_ext <<_ACEOF
12950/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012951
12952/* Override any gcc2 internal prototype to avoid an error. */
12953#ifdef __cplusplus
12954extern "C"
12955#endif
12956/* We use char because int might match the return type of a gcc2
12957 builtin and then its argument prototype would still apply. */
12958char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012959int
12960main ()
12961{
12962inet_aton ();
12963 ;
12964 return 0;
12965}
12966_ACEOF
12967rm -f conftest.$ac_objext conftest$ac_exeext
12968if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012969 (eval $ac_link) 2>&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012970 ac_status=$?
12971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12972 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012973 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012974 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12975 (eval $ac_try) 2>&5
12976 ac_status=$?
12977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12978 (exit $ac_status); }; }; then
12979 ac_cv_lib_c_inet_aton=yes
12980else
12981 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012982sed 's/^/| /' conftest.$ac_ext >&5
12983
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012984ac_cv_lib_c_inet_aton=no
12985fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012986rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012987LIBS=$ac_check_lib_save_LIBS
12988fi
12989echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12990echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12991if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012992 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012993else
12994
12995echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12996echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12997if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12998 echo $ECHO_N "(cached) $ECHO_C" >&6
12999else
13000 ac_check_lib_save_LIBS=$LIBS
13001LIBS="-lresolv $LIBS"
13002cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013003#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013004/* confdefs.h. */
13005_ACEOF
13006cat confdefs.h >>conftest.$ac_ext
13007cat >>conftest.$ac_ext <<_ACEOF
13008/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013009
13010/* Override any gcc2 internal prototype to avoid an error. */
13011#ifdef __cplusplus
13012extern "C"
13013#endif
13014/* We use char because int might match the return type of a gcc2
13015 builtin and then its argument prototype would still apply. */
13016char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013017int
13018main ()
13019{
13020inet_aton ();
13021 ;
13022 return 0;
13023}
13024_ACEOF
13025rm -f conftest.$ac_objext conftest$ac_exeext
13026if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013027 (eval $ac_link) 2>&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013028 ac_status=$?
13029 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13030 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013031 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13033 (eval $ac_try) 2>&5
13034 ac_status=$?
13035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13036 (exit $ac_status); }; }; then
13037 ac_cv_lib_resolv_inet_aton=yes
13038else
13039 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013040sed 's/^/| /' conftest.$ac_ext >&5
13041
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013042ac_cv_lib_resolv_inet_aton=no
13043fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013044rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013045LIBS=$ac_check_lib_save_LIBS
13046fi
13047echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
13048echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
13049if test $ac_cv_lib_resolv_inet_aton = yes; then
13050 cat >>confdefs.h <<_ACEOF
13051#define HAVE_LIBRESOLV 1
13052_ACEOF
13053
13054 LIBS="-lresolv $LIBS"
13055
13056fi
13057
13058
13059fi
13060
13061
Martin v. Löwise9416172003-05-03 10:12:45 +000013062echo "$as_me:$LINENO: checking for hstrerror" >&5
13063echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
13064cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013065#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013066/* confdefs.h. */
13067_ACEOF
13068cat confdefs.h >>conftest.$ac_ext
13069cat >>conftest.$ac_ext <<_ACEOF
13070/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013071
13072#include "confdefs.h"
13073#include <netdb.h>
13074
Martin v. Löwise9416172003-05-03 10:12:45 +000013075int
13076main ()
13077{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013078void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013079 ;
13080 return 0;
13081}
13082_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013083rm -f conftest.$ac_objext conftest$ac_exeext
13084if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013085 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013086 ac_status=$?
13087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13088 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013089 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013090 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13091 (eval $ac_try) 2>&5
13092 ac_status=$?
13093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13094 (exit $ac_status); }; }; then
13095
13096cat >>confdefs.h <<\_ACEOF
13097#define HAVE_HSTRERROR 1
13098_ACEOF
13099
13100 echo "$as_me:$LINENO: result: yes" >&5
13101echo "${ECHO_T}yes" >&6
13102else
13103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013104sed 's/^/| /' conftest.$ac_ext >&5
13105
Martin v. Löwise9416172003-05-03 10:12:45 +000013106echo "$as_me:$LINENO: result: no" >&5
13107echo "${ECHO_T}no" >&6
13108
13109fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013110rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013111
13112echo "$as_me:$LINENO: checking for inet_aton" >&5
13113echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13114cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013115#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013116/* confdefs.h. */
13117_ACEOF
13118cat confdefs.h >>conftest.$ac_ext
13119cat >>conftest.$ac_ext <<_ACEOF
13120/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013121
13122#include "confdefs.h"
13123#include <sys/socket.h>
13124#include <netinet/in.h>
13125#include <arpa/inet.h>
13126
Martin v. Löwise9416172003-05-03 10:12:45 +000013127int
13128main ()
13129{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013130void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013131 ;
13132 return 0;
13133}
13134_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013135rm -f conftest.$ac_objext conftest$ac_exeext
13136if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013137 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013138 ac_status=$?
13139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13140 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013141 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013142 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13143 (eval $ac_try) 2>&5
13144 ac_status=$?
13145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13146 (exit $ac_status); }; }; then
13147
13148cat >>confdefs.h <<\_ACEOF
13149#define HAVE_INET_ATON 1
13150_ACEOF
13151
13152 echo "$as_me:$LINENO: result: yes" >&5
13153echo "${ECHO_T}yes" >&6
13154else
13155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013156sed 's/^/| /' conftest.$ac_ext >&5
13157
Martin v. Löwise9416172003-05-03 10:12:45 +000013158echo "$as_me:$LINENO: result: no" >&5
13159echo "${ECHO_T}no" >&6
13160
13161fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013162rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013163
13164echo "$as_me:$LINENO: checking for inet_pton" >&5
13165echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13166cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013167#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013168/* confdefs.h. */
13169_ACEOF
13170cat confdefs.h >>conftest.$ac_ext
13171cat >>conftest.$ac_ext <<_ACEOF
13172/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013173
13174#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013175#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013176#include <sys/socket.h>
13177#include <netinet/in.h>
13178#include <arpa/inet.h>
13179
Martin v. Löwise9416172003-05-03 10:12:45 +000013180int
13181main ()
13182{
13183void* p = inet_pton
13184 ;
13185 return 0;
13186}
13187_ACEOF
13188rm -f conftest.$ac_objext
13189if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013190 (eval $ac_compile) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013191 ac_status=$?
13192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13193 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013194 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013195 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13196 (eval $ac_try) 2>&5
13197 ac_status=$?
13198 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13199 (exit $ac_status); }; }; then
13200
13201cat >>confdefs.h <<\_ACEOF
13202#define HAVE_INET_PTON 1
13203_ACEOF
13204
13205 echo "$as_me:$LINENO: result: yes" >&5
13206echo "${ECHO_T}yes" >&6
13207else
13208 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013209sed 's/^/| /' conftest.$ac_ext >&5
13210
Martin v. Löwise9416172003-05-03 10:12:45 +000013211echo "$as_me:$LINENO: result: no" >&5
13212echo "${ECHO_T}no" >&6
13213
13214fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013215rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013216
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013217# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013218echo "$as_me:$LINENO: checking for setgroups" >&5
13219echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13220cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013221#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013222/* confdefs.h. */
13223_ACEOF
13224cat confdefs.h >>conftest.$ac_ext
13225cat >>conftest.$ac_ext <<_ACEOF
13226/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013227
13228#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013229#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013230#ifdef HAVE_GRP_H
13231#include <grp.h>
13232#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013233
Martin v. Löwisd5843682002-11-21 20:41:28 +000013234int
13235main ()
13236{
13237void* p = setgroups
13238 ;
13239 return 0;
13240}
13241_ACEOF
13242rm -f conftest.$ac_objext
13243if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013244 (eval $ac_compile) 2>&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000013245 ac_status=$?
13246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13247 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013248 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000013249 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13250 (eval $ac_try) 2>&5
13251 ac_status=$?
13252 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13253 (exit $ac_status); }; }; then
13254
13255cat >>confdefs.h <<\_ACEOF
13256#define HAVE_SETGROUPS 1
13257_ACEOF
13258
13259 echo "$as_me:$LINENO: result: yes" >&5
13260echo "${ECHO_T}yes" >&6
13261else
13262 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013263sed 's/^/| /' conftest.$ac_ext >&5
13264
Martin v. Löwisd5843682002-11-21 20:41:28 +000013265echo "$as_me:$LINENO: result: no" >&5
13266echo "${ECHO_T}no" >&6
13267
13268fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013269rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000013270
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013271# check for openpty and forkpty
13272
Martin v. Löwis11437992002-04-12 09:54:03 +000013273
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013274for ac_func in openpty
13275do
Martin v. Löwis11437992002-04-12 09:54:03 +000013276as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13277echo "$as_me:$LINENO: checking for $ac_func" >&5
13278echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13279if eval "test \"\${$as_ac_var+set}\" = set"; then
13280 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013281else
Martin v. Löwis11437992002-04-12 09:54:03 +000013282 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013283#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013284/* confdefs.h. */
13285_ACEOF
13286cat confdefs.h >>conftest.$ac_ext
13287cat >>conftest.$ac_ext <<_ACEOF
13288/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013289/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013290 which can conflict with char $ac_func (); below.
13291 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013292 <limits.h> exists even on freestanding compilers. Under hpux,
13293 including <limits.h> includes <sys/time.h> and causes problems
13294 checking for functions defined therein. */
13295#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013296# include <limits.h>
13297#else
13298# include <assert.h>
13299#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013300/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013301#ifdef __cplusplus
13302extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013303{
Martin v. Löwis11437992002-04-12 09:54:03 +000013304#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013305/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013306 builtin and then its argument prototype would still apply. */
13307char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013308/* The GNU C library defines this for functions which it implements
13309 to always fail with ENOSYS. Some functions are actually named
13310 something starting with __ and the normal name is an alias. */
13311#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13312choke me
13313#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013314char (*f) () = $ac_func;
13315#endif
13316#ifdef __cplusplus
13317}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013318#endif
13319
Skip Montanaro6dead952003-09-25 14:50:04 +000013320int
13321main ()
13322{
13323return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013324 ;
13325 return 0;
13326}
13327_ACEOF
13328rm -f conftest.$ac_objext conftest$ac_exeext
13329if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013330 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013331 ac_status=$?
13332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13333 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013334 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013335 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13336 (eval $ac_try) 2>&5
13337 ac_status=$?
13338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13339 (exit $ac_status); }; }; then
13340 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013341else
Martin v. Löwis11437992002-04-12 09:54:03 +000013342 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013343sed 's/^/| /' conftest.$ac_ext >&5
13344
Martin v. Löwis11437992002-04-12 09:54:03 +000013345eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013346fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013347rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013348fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013349echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13350echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13351if test `eval echo '${'$as_ac_var'}'` = yes; then
13352 cat >>confdefs.h <<_ACEOF
13353#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13354_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013355
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013356else
Martin v. Löwis11437992002-04-12 09:54:03 +000013357 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13358echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13359if test "${ac_cv_lib_util_openpty+set}" = set; then
13360 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013361else
Martin v. Löwis11437992002-04-12 09:54:03 +000013362 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013363LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013364cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013365#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013366/* confdefs.h. */
13367_ACEOF
13368cat confdefs.h >>conftest.$ac_ext
13369cat >>conftest.$ac_ext <<_ACEOF
13370/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013371
Fred Drake8cef4cf2000-06-28 16:40:38 +000013372/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013373#ifdef __cplusplus
13374extern "C"
13375#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013376/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013377 builtin and then its argument prototype would still apply. */
13378char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013379int
13380main ()
13381{
13382openpty ();
13383 ;
13384 return 0;
13385}
13386_ACEOF
13387rm -f conftest.$ac_objext conftest$ac_exeext
13388if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013389 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013390 ac_status=$?
13391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13392 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013393 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013394 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13395 (eval $ac_try) 2>&5
13396 ac_status=$?
13397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13398 (exit $ac_status); }; }; then
13399 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013400else
Martin v. Löwis11437992002-04-12 09:54:03 +000013401 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013402sed 's/^/| /' conftest.$ac_ext >&5
13403
Martin v. Löwis11437992002-04-12 09:54:03 +000013404ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013405fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013406rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013407LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013408fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013409echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13410echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13411if test $ac_cv_lib_util_openpty = yes; then
13412 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013413#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013414_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013415 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013416fi
13417
13418fi
13419done
13420
Martin v. Löwis11437992002-04-12 09:54:03 +000013421
Fred Drake8cef4cf2000-06-28 16:40:38 +000013422for ac_func in forkpty
13423do
Martin v. Löwis11437992002-04-12 09:54:03 +000013424as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13425echo "$as_me:$LINENO: checking for $ac_func" >&5
13426echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13427if eval "test \"\${$as_ac_var+set}\" = set"; then
13428 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013429else
Martin v. Löwis11437992002-04-12 09:54:03 +000013430 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013431#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013432/* confdefs.h. */
13433_ACEOF
13434cat confdefs.h >>conftest.$ac_ext
13435cat >>conftest.$ac_ext <<_ACEOF
13436/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013437/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013438 which can conflict with char $ac_func (); below.
13439 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013440 <limits.h> exists even on freestanding compilers. Under hpux,
13441 including <limits.h> includes <sys/time.h> and causes problems
13442 checking for functions defined therein. */
13443#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013444# include <limits.h>
13445#else
13446# include <assert.h>
13447#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013448/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013449#ifdef __cplusplus
13450extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013451{
Martin v. Löwis11437992002-04-12 09:54:03 +000013452#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013453/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013454 builtin and then its argument prototype would still apply. */
13455char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013456/* The GNU C library defines this for functions which it implements
13457 to always fail with ENOSYS. Some functions are actually named
13458 something starting with __ and the normal name is an alias. */
13459#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13460choke me
13461#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013462char (*f) () = $ac_func;
13463#endif
13464#ifdef __cplusplus
13465}
Fred Drake8cef4cf2000-06-28 16:40:38 +000013466#endif
13467
Skip Montanaro6dead952003-09-25 14:50:04 +000013468int
13469main ()
13470{
13471return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013472 ;
13473 return 0;
13474}
13475_ACEOF
13476rm -f conftest.$ac_objext conftest$ac_exeext
13477if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013478 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013479 ac_status=$?
13480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13481 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013482 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13484 (eval $ac_try) 2>&5
13485 ac_status=$?
13486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13487 (exit $ac_status); }; }; then
13488 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013489else
Martin v. Löwis11437992002-04-12 09:54:03 +000013490 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013491sed 's/^/| /' conftest.$ac_ext >&5
13492
Martin v. Löwis11437992002-04-12 09:54:03 +000013493eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013494fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013495rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013496fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013497echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13498echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13499if test `eval echo '${'$as_ac_var'}'` = yes; then
13500 cat >>confdefs.h <<_ACEOF
13501#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13502_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013503
Fred Drake8cef4cf2000-06-28 16:40:38 +000013504else
Martin v. Löwis11437992002-04-12 09:54:03 +000013505 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13506echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13507if test "${ac_cv_lib_util_forkpty+set}" = set; then
13508 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013509else
Martin v. Löwis11437992002-04-12 09:54:03 +000013510 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013511LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013512cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013513#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013514/* confdefs.h. */
13515_ACEOF
13516cat confdefs.h >>conftest.$ac_ext
13517cat >>conftest.$ac_ext <<_ACEOF
13518/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013519
Fred Drake8cef4cf2000-06-28 16:40:38 +000013520/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013521#ifdef __cplusplus
13522extern "C"
13523#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013524/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013525 builtin and then its argument prototype would still apply. */
13526char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013527int
13528main ()
13529{
13530forkpty ();
13531 ;
13532 return 0;
13533}
13534_ACEOF
13535rm -f conftest.$ac_objext conftest$ac_exeext
13536if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013537 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013538 ac_status=$?
13539 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13540 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013541 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013542 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13543 (eval $ac_try) 2>&5
13544 ac_status=$?
13545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13546 (exit $ac_status); }; }; then
13547 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013548else
Martin v. Löwis11437992002-04-12 09:54:03 +000013549 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013550sed 's/^/| /' conftest.$ac_ext >&5
13551
Martin v. Löwis11437992002-04-12 09:54:03 +000013552ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013553fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013554rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013555LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013556fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013557echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13558echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13559if test $ac_cv_lib_util_forkpty = yes; then
13560 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013561#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013562_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013563 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013564fi
13565
13566fi
13567done
13568
Jack Jansendd19cf82001-12-06 22:36:17 +000013569
Michael W. Hudson54241132001-12-07 15:38:26 +000013570# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013571
13572
13573
13574
13575
13576
Fred Drake8cef4cf2000-06-28 16:40:38 +000013577for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13578do
Martin v. Löwis11437992002-04-12 09:54:03 +000013579as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13580echo "$as_me:$LINENO: checking for $ac_func" >&5
13581echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13582if eval "test \"\${$as_ac_var+set}\" = set"; then
13583 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013584else
Martin v. Löwis11437992002-04-12 09:54:03 +000013585 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013586#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013587/* confdefs.h. */
13588_ACEOF
13589cat confdefs.h >>conftest.$ac_ext
13590cat >>conftest.$ac_ext <<_ACEOF
13591/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013592/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013593 which can conflict with char $ac_func (); below.
13594 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013595 <limits.h> exists even on freestanding compilers. Under hpux,
13596 including <limits.h> includes <sys/time.h> and causes problems
13597 checking for functions defined therein. */
13598#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013599# include <limits.h>
13600#else
13601# include <assert.h>
13602#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013603/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013604#ifdef __cplusplus
13605extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013606{
Martin v. Löwis11437992002-04-12 09:54:03 +000013607#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013608/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013609 builtin and then its argument prototype would still apply. */
13610char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013611/* The GNU C library defines this for functions which it implements
13612 to always fail with ENOSYS. Some functions are actually named
13613 something starting with __ and the normal name is an alias. */
13614#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13615choke me
13616#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013617char (*f) () = $ac_func;
13618#endif
13619#ifdef __cplusplus
13620}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013621#endif
13622
Skip Montanaro6dead952003-09-25 14:50:04 +000013623int
13624main ()
13625{
13626return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013627 ;
13628 return 0;
13629}
13630_ACEOF
13631rm -f conftest.$ac_objext conftest$ac_exeext
13632if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013633 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013634 ac_status=$?
13635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13636 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013637 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013638 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13639 (eval $ac_try) 2>&5
13640 ac_status=$?
13641 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13642 (exit $ac_status); }; }; then
13643 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013644else
Martin v. Löwis11437992002-04-12 09:54:03 +000013645 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013646sed 's/^/| /' conftest.$ac_ext >&5
13647
Martin v. Löwis11437992002-04-12 09:54:03 +000013648eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013649fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013650rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013651fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013652echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13653echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13654if test `eval echo '${'$as_ac_var'}'` = yes; then
13655 cat >>confdefs.h <<_ACEOF
13656#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13657_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013658
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013659fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013660done
13661
Michael W. Hudson54241132001-12-07 15:38:26 +000013662
Martin v. Löwis11437992002-04-12 09:54:03 +000013663
13664
13665
13666
13667
Martin v. Löwis1142de32002-03-29 16:28:31 +000013668for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013669do
Martin v. Löwis11437992002-04-12 09:54:03 +000013670as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13671echo "$as_me:$LINENO: checking for $ac_func" >&5
13672echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13673if eval "test \"\${$as_ac_var+set}\" = set"; then
13674 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013675else
Martin v. Löwis11437992002-04-12 09:54:03 +000013676 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013677#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013678/* confdefs.h. */
13679_ACEOF
13680cat confdefs.h >>conftest.$ac_ext
13681cat >>conftest.$ac_ext <<_ACEOF
13682/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013683/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013684 which can conflict with char $ac_func (); below.
13685 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013686 <limits.h> exists even on freestanding compilers. Under hpux,
13687 including <limits.h> includes <sys/time.h> and causes problems
13688 checking for functions defined therein. */
13689#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013690# include <limits.h>
13691#else
13692# include <assert.h>
13693#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013694/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013695#ifdef __cplusplus
13696extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013697{
Martin v. Löwis11437992002-04-12 09:54:03 +000013698#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013699/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013700 builtin and then its argument prototype would still apply. */
13701char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013702/* The GNU C library defines this for functions which it implements
13703 to always fail with ENOSYS. Some functions are actually named
13704 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013705#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013706choke me
13707#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013708char (*f) () = $ac_func;
13709#endif
13710#ifdef __cplusplus
13711}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013712#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013713
Skip Montanaro6dead952003-09-25 14:50:04 +000013714int
13715main ()
13716{
13717return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013718 ;
13719 return 0;
13720}
13721_ACEOF
13722rm -f conftest.$ac_objext conftest$ac_exeext
13723if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013724 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013725 ac_status=$?
13726 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13727 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013728 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013729 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13730 (eval $ac_try) 2>&5
13731 ac_status=$?
13732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13733 (exit $ac_status); }; }; then
13734 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013735else
Martin v. Löwis11437992002-04-12 09:54:03 +000013736 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013737sed 's/^/| /' conftest.$ac_ext >&5
13738
Martin v. Löwis11437992002-04-12 09:54:03 +000013739eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013740fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013741rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013742fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013743echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13744echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13745if test `eval echo '${'$as_ac_var'}'` = yes; then
13746 cat >>confdefs.h <<_ACEOF
13747#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13748_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013749
Martin v. Löwis1142de32002-03-29 16:28:31 +000013750else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013751 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013752fi
13753done
13754
13755
Martin v. Löwis11437992002-04-12 09:54:03 +000013756
Martin v. Löwis1142de32002-03-29 16:28:31 +000013757for ac_func in getpgrp
13758do
Martin v. Löwis11437992002-04-12 09:54:03 +000013759as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13760echo "$as_me:$LINENO: checking for $ac_func" >&5
13761echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13762if eval "test \"\${$as_ac_var+set}\" = set"; then
13763 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013764else
Martin v. Löwis11437992002-04-12 09:54:03 +000013765 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013766#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013767/* confdefs.h. */
13768_ACEOF
13769cat confdefs.h >>conftest.$ac_ext
13770cat >>conftest.$ac_ext <<_ACEOF
13771/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013772/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013773 which can conflict with char $ac_func (); below.
13774 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013775 <limits.h> exists even on freestanding compilers. Under hpux,
13776 including <limits.h> includes <sys/time.h> and causes problems
13777 checking for functions defined therein. */
13778#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013779# include <limits.h>
13780#else
13781# include <assert.h>
13782#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013783/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013784#ifdef __cplusplus
13785extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013786{
Martin v. Löwis11437992002-04-12 09:54:03 +000013787#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013788/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013789 builtin and then its argument prototype would still apply. */
13790char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013791/* The GNU C library defines this for functions which it implements
13792 to always fail with ENOSYS. Some functions are actually named
13793 something starting with __ and the normal name is an alias. */
13794#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13795choke me
13796#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013797char (*f) () = $ac_func;
13798#endif
13799#ifdef __cplusplus
13800}
Martin v. Löwis1142de32002-03-29 16:28:31 +000013801#endif
13802
Skip Montanaro6dead952003-09-25 14:50:04 +000013803int
13804main ()
13805{
13806return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013807 ;
13808 return 0;
13809}
13810_ACEOF
13811rm -f conftest.$ac_objext conftest$ac_exeext
13812if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013813 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013814 ac_status=$?
13815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13816 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013817 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13819 (eval $ac_try) 2>&5
13820 ac_status=$?
13821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13822 (exit $ac_status); }; }; then
13823 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013824else
Martin v. Löwis11437992002-04-12 09:54:03 +000013825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013826sed 's/^/| /' conftest.$ac_ext >&5
13827
Martin v. Löwis11437992002-04-12 09:54:03 +000013828eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013829fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013830rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013831fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013832echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13833echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13834if test `eval echo '${'$as_ac_var'}'` = yes; then
13835 cat >>confdefs.h <<_ACEOF
13836#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13837_ACEOF
13838 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013839#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013840/* confdefs.h. */
13841_ACEOF
13842cat confdefs.h >>conftest.$ac_ext
13843cat >>conftest.$ac_ext <<_ACEOF
13844/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013845#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013846int
13847main ()
13848{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013849getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013850 ;
13851 return 0;
13852}
13853_ACEOF
13854rm -f conftest.$ac_objext
13855if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013856 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013857 ac_status=$?
13858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13859 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013860 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013861 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13862 (eval $ac_try) 2>&5
13863 ac_status=$?
13864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13865 (exit $ac_status); }; }; then
13866
13867cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013868#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013869_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013870
Martin v. Löwis11437992002-04-12 09:54:03 +000013871
Guido van Rossumf78abae1997-01-21 22:02:36 +000013872else
Martin v. Löwis11437992002-04-12 09:54:03 +000013873 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013874sed 's/^/| /' conftest.$ac_ext >&5
13875
Guido van Rossum627b2d71993-12-24 10:39:16 +000013876fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013877rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013878
Guido van Rossum627b2d71993-12-24 10:39:16 +000013879fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013880done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013881
Jack Jansen150753c2003-03-29 22:07:47 +000013882
13883for ac_func in setpgrp
13884do
13885as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13886echo "$as_me:$LINENO: checking for $ac_func" >&5
13887echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13888if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013889 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013890else
Martin v. Löwis11437992002-04-12 09:54:03 +000013891 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013892#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013893/* confdefs.h. */
13894_ACEOF
13895cat confdefs.h >>conftest.$ac_ext
13896cat >>conftest.$ac_ext <<_ACEOF
13897/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013898/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013899 which can conflict with char $ac_func (); below.
13900 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013901 <limits.h> exists even on freestanding compilers. Under hpux,
13902 including <limits.h> includes <sys/time.h> and causes problems
13903 checking for functions defined therein. */
13904#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013905# include <limits.h>
13906#else
13907# include <assert.h>
13908#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013909/* Override any gcc2 internal prototype to avoid an error. */
13910#ifdef __cplusplus
13911extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013912{
Martin v. Löwis11437992002-04-12 09:54:03 +000013913#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013914/* We use char because int might match the return type of a gcc2
13915 builtin and then its argument prototype would still apply. */
13916char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000013917/* The GNU C library defines this for functions which it implements
13918 to always fail with ENOSYS. Some functions are actually named
13919 something starting with __ and the normal name is an alias. */
13920#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13921choke me
13922#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013923char (*f) () = $ac_func;
13924#endif
13925#ifdef __cplusplus
13926}
Jack Jansen150753c2003-03-29 22:07:47 +000013927#endif
13928
Skip Montanaro6dead952003-09-25 14:50:04 +000013929int
13930main ()
13931{
13932return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013933 ;
13934 return 0;
13935}
13936_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013937rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013938if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013939 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013940 ac_status=$?
13941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013942 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013943 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13945 (eval $ac_try) 2>&5
13946 ac_status=$?
13947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13948 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013949 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013950else
Jack Jansen150753c2003-03-29 22:07:47 +000013951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013952sed 's/^/| /' conftest.$ac_ext >&5
13953
Jack Jansen150753c2003-03-29 22:07:47 +000013954eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013955fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013956rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013957fi
Jack Jansen150753c2003-03-29 22:07:47 +000013958echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13959echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13960if test `eval echo '${'$as_ac_var'}'` = yes; then
13961 cat >>confdefs.h <<_ACEOF
13962#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13963_ACEOF
13964 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013965#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013966/* confdefs.h. */
13967_ACEOF
13968cat confdefs.h >>conftest.$ac_ext
13969cat >>conftest.$ac_ext <<_ACEOF
13970/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013971#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013972int
13973main ()
13974{
13975setpgrp(0,0);
13976 ;
13977 return 0;
13978}
13979_ACEOF
13980rm -f conftest.$ac_objext
13981if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013982 (eval $ac_compile) 2>&5
Jack Jansen150753c2003-03-29 22:07:47 +000013983 ac_status=$?
13984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13985 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013986 { ac_try='test -s conftest.$ac_objext'
Jack Jansen150753c2003-03-29 22:07:47 +000013987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13988 (eval $ac_try) 2>&5
13989 ac_status=$?
13990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13991 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013992
13993cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013994#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013995_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013996
Jack Jansen150753c2003-03-29 22:07:47 +000013997
13998else
13999 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014000sed 's/^/| /' conftest.$ac_ext >&5
14001
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014002fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014003rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000014004
14005fi
14006done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000014007
Martin v. Löwis11437992002-04-12 09:54:03 +000014008
Thomas Wouters3a584202000-08-05 23:28:51 +000014009for ac_func in gettimeofday
14010do
Martin v. Löwis11437992002-04-12 09:54:03 +000014011as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14012echo "$as_me:$LINENO: checking for $ac_func" >&5
14013echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14014if eval "test \"\${$as_ac_var+set}\" = set"; then
14015 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014016else
Martin v. Löwis11437992002-04-12 09:54:03 +000014017 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014018#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014019/* confdefs.h. */
14020_ACEOF
14021cat confdefs.h >>conftest.$ac_ext
14022cat >>conftest.$ac_ext <<_ACEOF
14023/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014024/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014025 which can conflict with char $ac_func (); below.
14026 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014027 <limits.h> exists even on freestanding compilers. Under hpux,
14028 including <limits.h> includes <sys/time.h> and causes problems
14029 checking for functions defined therein. */
14030#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014031# include <limits.h>
14032#else
14033# include <assert.h>
14034#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014035/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014036#ifdef __cplusplus
14037extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014038{
Martin v. Löwis11437992002-04-12 09:54:03 +000014039#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014040/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014041 builtin and then its argument prototype would still apply. */
14042char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014043/* The GNU C library defines this for functions which it implements
14044 to always fail with ENOSYS. Some functions are actually named
14045 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014046#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014047choke me
14048#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014049char (*f) () = $ac_func;
14050#endif
14051#ifdef __cplusplus
14052}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014053#endif
14054
Skip Montanaro6dead952003-09-25 14:50:04 +000014055int
14056main ()
14057{
14058return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014059 ;
14060 return 0;
14061}
14062_ACEOF
14063rm -f conftest.$ac_objext conftest$ac_exeext
14064if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014065 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014066 ac_status=$?
14067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14068 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014069 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014070 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14071 (eval $ac_try) 2>&5
14072 ac_status=$?
14073 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14074 (exit $ac_status); }; }; then
14075 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014076else
Martin v. Löwis11437992002-04-12 09:54:03 +000014077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014078sed 's/^/| /' conftest.$ac_ext >&5
14079
Martin v. Löwis11437992002-04-12 09:54:03 +000014080eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014081fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014082rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014083fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014084echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14085echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14086if test `eval echo '${'$as_ac_var'}'` = yes; then
14087 cat >>confdefs.h <<_ACEOF
14088#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14089_ACEOF
14090 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014091#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014092/* confdefs.h. */
14093_ACEOF
14094cat confdefs.h >>conftest.$ac_ext
14095cat >>conftest.$ac_ext <<_ACEOF
14096/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014097#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014098int
14099main ()
14100{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014101gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014102 ;
14103 return 0;
14104}
14105_ACEOF
14106rm -f conftest.$ac_objext
14107if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014108 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014109 ac_status=$?
14110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14111 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014112 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014113 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14114 (eval $ac_try) 2>&5
14115 ac_status=$?
14116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14117 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014118 :
14119else
Martin v. Löwis11437992002-04-12 09:54:03 +000014120 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014121sed 's/^/| /' conftest.$ac_ext >&5
14122
Martin v. Löwis11437992002-04-12 09:54:03 +000014123
14124cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014125#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014126_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014127
Martin v. Löwis11437992002-04-12 09:54:03 +000014128
Guido van Rossum627b2d71993-12-24 10:39:16 +000014129fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014130rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014131
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014132fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014133done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014134
Michael W. Hudson54241132001-12-07 15:38:26 +000014135
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014136echo "$as_me:$LINENO: checking for major" >&5
14137echo $ECHO_N "checking for major... $ECHO_C" >&6
14138cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014139#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014140/* confdefs.h. */
14141_ACEOF
14142cat confdefs.h >>conftest.$ac_ext
14143cat >>conftest.$ac_ext <<_ACEOF
14144/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014145
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014146#if defined(MAJOR_IN_MKDEV)
14147#include <sys/mkdev.h>
14148#elif defined(MAJOR_IN_SYSMACROS)
14149#include <sys/sysmacros.h>
14150#else
14151#include <sys/types.h>
14152#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014153
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014154int
14155main ()
14156{
14157
14158 makedev(major(0),minor(0));
14159
14160 ;
14161 return 0;
14162}
14163_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014164rm -f conftest.$ac_objext conftest$ac_exeext
14165if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014166 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014167 ac_status=$?
14168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14169 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014170 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014171 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14172 (eval $ac_try) 2>&5
14173 ac_status=$?
14174 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14175 (exit $ac_status); }; }; then
14176
14177
14178cat >>confdefs.h <<\_ACEOF
14179#define HAVE_DEVICE_MACROS 1
14180_ACEOF
14181
14182 echo "$as_me:$LINENO: result: yes" >&5
14183echo "${ECHO_T}yes" >&6
14184
14185else
14186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014187sed 's/^/| /' conftest.$ac_ext >&5
14188
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014189
14190 echo "$as_me:$LINENO: result: no" >&5
14191echo "${ECHO_T}no" >&6
14192
14193fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014194rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014195
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014196# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014197# for [no]getaddrinfo in netdb.h.
14198echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14199echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14200cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014201#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014202/* confdefs.h. */
14203_ACEOF
14204cat confdefs.h >>conftest.$ac_ext
14205cat >>conftest.$ac_ext <<_ACEOF
14206/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014207
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014208#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014209#include <sys/socket.h>
14210#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014211#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014212
Martin v. Löwis11437992002-04-12 09:54:03 +000014213int
14214main ()
14215{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014216
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014217getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014218
Martin v. Löwis11437992002-04-12 09:54:03 +000014219 ;
14220 return 0;
14221}
14222_ACEOF
14223rm -f conftest.$ac_objext conftest$ac_exeext
14224if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014225 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014226 ac_status=$?
14227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14228 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014229 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14231 (eval $ac_try) 2>&5
14232 ac_status=$?
14233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14234 (exit $ac_status); }; }; then
14235
14236echo "$as_me:$LINENO: result: yes" >&5
14237echo "${ECHO_T}yes" >&6
14238echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14239echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014240if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014241 echo "$as_me:$LINENO: result: buggy" >&5
14242echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014243buggygetaddrinfo=yes
14244else
Martin v. Löwis11437992002-04-12 09:54:03 +000014245 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014246#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014247/* confdefs.h. */
14248_ACEOF
14249cat confdefs.h >>conftest.$ac_ext
14250cat >>conftest.$ac_ext <<_ACEOF
14251/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014252
14253#include <sys/types.h>
14254#include <netdb.h>
14255#include <string.h>
14256#include <sys/socket.h>
14257#include <netinet/in.h>
14258
14259main()
14260{
14261 int passive, gaierr, inet4 = 0, inet6 = 0;
14262 struct addrinfo hints, *ai, *aitop;
14263 char straddr[INET6_ADDRSTRLEN], strport[16];
14264
14265 for (passive = 0; passive <= 1; passive++) {
14266 memset(&hints, 0, sizeof(hints));
14267 hints.ai_family = AF_UNSPEC;
14268 hints.ai_flags = passive ? AI_PASSIVE : 0;
14269 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000014270 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014271 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
14272 (void)gai_strerror(gaierr);
14273 goto bad;
14274 }
14275 for (ai = aitop; ai; ai = ai->ai_next) {
14276 if (ai->ai_addr == NULL ||
14277 ai->ai_addrlen == 0 ||
14278 getnameinfo(ai->ai_addr, ai->ai_addrlen,
14279 straddr, sizeof(straddr), strport, sizeof(strport),
14280 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
14281 goto bad;
14282 }
14283 switch (ai->ai_family) {
14284 case AF_INET:
14285 if (strcmp(strport, "54321") != 0) {
14286 goto bad;
14287 }
14288 if (passive) {
14289 if (strcmp(straddr, "0.0.0.0") != 0) {
14290 goto bad;
14291 }
14292 } else {
14293 if (strcmp(straddr, "127.0.0.1") != 0) {
14294 goto bad;
14295 }
14296 }
14297 inet4++;
14298 break;
14299 case AF_INET6:
14300 if (strcmp(strport, "54321") != 0) {
14301 goto bad;
14302 }
14303 if (passive) {
14304 if (strcmp(straddr, "::") != 0) {
14305 goto bad;
14306 }
14307 } else {
14308 if (strcmp(straddr, "::1") != 0) {
14309 goto bad;
14310 }
14311 }
14312 inet6++;
14313 break;
14314 case AF_UNSPEC:
14315 goto bad;
14316 break;
14317 default:
14318 /* another family support? */
14319 break;
14320 }
14321 }
14322 }
14323
14324 if (!(inet4 == 0 || inet4 == 2))
14325 goto bad;
14326 if (!(inet6 == 0 || inet6 == 2))
14327 goto bad;
14328
14329 if (aitop)
14330 freeaddrinfo(aitop);
14331 exit(0);
14332
14333 bad:
14334 if (aitop)
14335 freeaddrinfo(aitop);
14336 exit(1);
14337}
14338
Martin v. Löwis11437992002-04-12 09:54:03 +000014339_ACEOF
14340rm -f conftest$ac_exeext
14341if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14342 (eval $ac_link) 2>&5
14343 ac_status=$?
14344 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14345 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14346 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14347 (eval $ac_try) 2>&5
14348 ac_status=$?
14349 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14350 (exit $ac_status); }; }; then
14351 echo "$as_me:$LINENO: result: good" >&5
14352echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014353buggygetaddrinfo=no
14354else
Martin v. Löwis11437992002-04-12 09:54:03 +000014355 echo "$as_me: program exited with status $ac_status" >&5
14356echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014357sed 's/^/| /' conftest.$ac_ext >&5
14358
Martin v. Löwis11437992002-04-12 09:54:03 +000014359( exit $ac_status )
14360echo "$as_me:$LINENO: result: buggy" >&5
14361echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014362buggygetaddrinfo=yes
14363fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014364rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014365fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014366else
Martin v. Löwis11437992002-04-12 09:54:03 +000014367 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014368sed 's/^/| /' conftest.$ac_ext >&5
14369
Martin v. Löwis11437992002-04-12 09:54:03 +000014370
14371echo "$as_me:$LINENO: result: no" >&5
14372echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014373buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014374
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014375fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014376rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014377
14378if test "$buggygetaddrinfo" = "yes"; then
14379 if test "$ipv6" = "yes"; then
14380 echo 'Fatal: You must get working getaddrinfo() function.'
14381 echo ' or you can specify "--disable-ipv6"'.
14382 exit 1
14383 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014384else
Martin v. Löwis11437992002-04-12 09:54:03 +000014385
14386cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014387#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014388_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014389
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014390fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014391
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014392for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014393do
Martin v. Löwis11437992002-04-12 09:54:03 +000014394as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14395echo "$as_me:$LINENO: checking for $ac_func" >&5
14396echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14397if eval "test \"\${$as_ac_var+set}\" = set"; then
14398 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014399else
Martin v. Löwis11437992002-04-12 09:54:03 +000014400 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014401#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014402/* confdefs.h. */
14403_ACEOF
14404cat confdefs.h >>conftest.$ac_ext
14405cat >>conftest.$ac_ext <<_ACEOF
14406/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014407/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014408 which can conflict with char $ac_func (); below.
14409 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014410 <limits.h> exists even on freestanding compilers. Under hpux,
14411 including <limits.h> includes <sys/time.h> and causes problems
14412 checking for functions defined therein. */
14413#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014414# include <limits.h>
14415#else
14416# include <assert.h>
14417#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014418/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014419#ifdef __cplusplus
14420extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014421{
Martin v. Löwis11437992002-04-12 09:54:03 +000014422#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014423/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014424 builtin and then its argument prototype would still apply. */
14425char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014426/* The GNU C library defines this for functions which it implements
14427 to always fail with ENOSYS. Some functions are actually named
14428 something starting with __ and the normal name is an alias. */
14429#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14430choke me
14431#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014432char (*f) () = $ac_func;
14433#endif
14434#ifdef __cplusplus
14435}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014436#endif
14437
Skip Montanaro6dead952003-09-25 14:50:04 +000014438int
14439main ()
14440{
14441return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014442 ;
14443 return 0;
14444}
14445_ACEOF
14446rm -f conftest.$ac_objext conftest$ac_exeext
14447if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014448 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014449 ac_status=$?
14450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14451 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014452 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014453 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14454 (eval $ac_try) 2>&5
14455 ac_status=$?
14456 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14457 (exit $ac_status); }; }; then
14458 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014459else
Martin v. Löwis11437992002-04-12 09:54:03 +000014460 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014461sed 's/^/| /' conftest.$ac_ext >&5
14462
Martin v. Löwis11437992002-04-12 09:54:03 +000014463eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014464fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014465rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014466fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014467echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14468echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14469if test `eval echo '${'$as_ac_var'}'` = yes; then
14470 cat >>confdefs.h <<_ACEOF
14471#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14472_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014473
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014474fi
14475done
14476
Michael W. Hudson54241132001-12-07 15:38:26 +000014477
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014478# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014479echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14480echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14481if test "${ac_cv_header_time+set}" = set; then
14482 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014483else
Martin v. Löwis11437992002-04-12 09:54:03 +000014484 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014485#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014486/* confdefs.h. */
14487_ACEOF
14488cat confdefs.h >>conftest.$ac_ext
14489cat >>conftest.$ac_ext <<_ACEOF
14490/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014491#include <sys/types.h>
14492#include <sys/time.h>
14493#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014494
Martin v. Löwis11437992002-04-12 09:54:03 +000014495int
14496main ()
14497{
14498if ((struct tm *) 0)
14499return 0;
14500 ;
14501 return 0;
14502}
14503_ACEOF
14504rm -f conftest.$ac_objext
14505if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014506 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014507 ac_status=$?
14508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14509 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014510 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14512 (eval $ac_try) 2>&5
14513 ac_status=$?
14514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14515 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014516 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014517else
Martin v. Löwis11437992002-04-12 09:54:03 +000014518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014519sed 's/^/| /' conftest.$ac_ext >&5
14520
Martin v. Löwis11437992002-04-12 09:54:03 +000014521ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014522fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014523rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014524fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014525echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14526echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014527if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014528
14529cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014530#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014531_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014532
14533fi
14534
Martin v. Löwis11437992002-04-12 09:54:03 +000014535echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14536echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14537if test "${ac_cv_struct_tm+set}" = set; then
14538 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014539else
Martin v. Löwis11437992002-04-12 09:54:03 +000014540 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014541#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014542/* confdefs.h. */
14543_ACEOF
14544cat confdefs.h >>conftest.$ac_ext
14545cat >>conftest.$ac_ext <<_ACEOF
14546/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014547#include <sys/types.h>
14548#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014549
Martin v. Löwis11437992002-04-12 09:54:03 +000014550int
14551main ()
14552{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014553struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014554 ;
14555 return 0;
14556}
14557_ACEOF
14558rm -f conftest.$ac_objext
14559if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014560 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014561 ac_status=$?
14562 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14563 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014564 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014565 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14566 (eval $ac_try) 2>&5
14567 ac_status=$?
14568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14569 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014570 ac_cv_struct_tm=time.h
14571else
Martin v. Löwis11437992002-04-12 09:54:03 +000014572 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014573sed 's/^/| /' conftest.$ac_ext >&5
14574
Martin v. Löwis11437992002-04-12 09:54:03 +000014575ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014576fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014577rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014578fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014579echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14580echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014581if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014582
14583cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014584#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014585_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014586
14587fi
14588
Martin v. Löwis11437992002-04-12 09:54:03 +000014589echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14590echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14591if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14592 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014593else
Martin v. Löwis11437992002-04-12 09:54:03 +000014594 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014595#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014596/* confdefs.h. */
14597_ACEOF
14598cat confdefs.h >>conftest.$ac_ext
14599cat >>conftest.$ac_ext <<_ACEOF
14600/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014601#include <sys/types.h>
14602#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014603
14604
Martin v. Löwis11437992002-04-12 09:54:03 +000014605int
14606main ()
14607{
14608static struct tm ac_aggr;
14609if (ac_aggr.tm_zone)
14610return 0;
14611 ;
14612 return 0;
14613}
14614_ACEOF
14615rm -f conftest.$ac_objext
14616if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014617 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014618 ac_status=$?
14619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14620 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014621 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014622 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14623 (eval $ac_try) 2>&5
14624 ac_status=$?
14625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14626 (exit $ac_status); }; }; then
14627 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014628else
Martin v. Löwis11437992002-04-12 09:54:03 +000014629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014630sed 's/^/| /' conftest.$ac_ext >&5
14631
14632cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014633#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014634/* confdefs.h. */
14635_ACEOF
14636cat confdefs.h >>conftest.$ac_ext
14637cat >>conftest.$ac_ext <<_ACEOF
14638/* end confdefs.h. */
14639#include <sys/types.h>
14640#include <$ac_cv_struct_tm>
14641
14642
14643int
14644main ()
14645{
14646static struct tm ac_aggr;
14647if (sizeof ac_aggr.tm_zone)
14648return 0;
14649 ;
14650 return 0;
14651}
14652_ACEOF
14653rm -f conftest.$ac_objext
14654if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014655 (eval $ac_compile) 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014656 ac_status=$?
14657 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14658 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014659 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +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 ac_cv_member_struct_tm_tm_zone=yes
14666else
14667 echo "$as_me: failed program was:" >&5
14668sed 's/^/| /' conftest.$ac_ext >&5
14669
Martin v. Löwis11437992002-04-12 09:54:03 +000014670ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014671fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014672rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014673fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014674rm -f conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014675fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014676echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14677echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14678if test $ac_cv_member_struct_tm_tm_zone = yes; then
14679
14680cat >>confdefs.h <<_ACEOF
14681#define HAVE_STRUCT_TM_TM_ZONE 1
14682_ACEOF
14683
14684
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014685fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014686
Martin v. Löwis11437992002-04-12 09:54:03 +000014687if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14688
14689cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014690#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014691_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014692
14693else
Martin v. Löwis11437992002-04-12 09:54:03 +000014694 echo "$as_me:$LINENO: checking for tzname" >&5
14695echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14696if test "${ac_cv_var_tzname+set}" = set; then
14697 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014698else
Martin v. Löwis11437992002-04-12 09:54:03 +000014699 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014700#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014701/* confdefs.h. */
14702_ACEOF
14703cat confdefs.h >>conftest.$ac_ext
14704cat >>conftest.$ac_ext <<_ACEOF
14705/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014706#include <time.h>
14707#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014708extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014710
Martin v. Löwis11437992002-04-12 09:54:03 +000014711int
14712main ()
14713{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014714atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014715 ;
14716 return 0;
14717}
14718_ACEOF
14719rm -f conftest.$ac_objext conftest$ac_exeext
14720if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014721 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014722 ac_status=$?
14723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14724 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014725 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014726 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14727 (eval $ac_try) 2>&5
14728 ac_status=$?
14729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14730 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014731 ac_cv_var_tzname=yes
14732else
Martin v. Löwis11437992002-04-12 09:54:03 +000014733 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014734sed 's/^/| /' conftest.$ac_ext >&5
14735
Martin v. Löwis11437992002-04-12 09:54:03 +000014736ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014737fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014738rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014739fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014740echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14741echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014742 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014743
14744cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014745#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014746_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014747
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014748 fi
14749fi
14750
Martin v. Löwis11437992002-04-12 09:54:03 +000014751echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14752echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14753if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14754 echo $ECHO_N "(cached) $ECHO_C" >&6
14755else
14756 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014757#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014758/* confdefs.h. */
14759_ACEOF
14760cat confdefs.h >>conftest.$ac_ext
14761cat >>conftest.$ac_ext <<_ACEOF
14762/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014763$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014764int
14765main ()
14766{
14767static struct stat ac_aggr;
14768if (ac_aggr.st_rdev)
14769return 0;
14770 ;
14771 return 0;
14772}
14773_ACEOF
14774rm -f conftest.$ac_objext
14775if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014776 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014777 ac_status=$?
14778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14779 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014780 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014781 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14782 (eval $ac_try) 2>&5
14783 ac_status=$?
14784 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14785 (exit $ac_status); }; }; then
14786 ac_cv_member_struct_stat_st_rdev=yes
14787else
14788 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014789sed 's/^/| /' conftest.$ac_ext >&5
14790
14791cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014792#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014793/* confdefs.h. */
14794_ACEOF
14795cat confdefs.h >>conftest.$ac_ext
14796cat >>conftest.$ac_ext <<_ACEOF
14797/* end confdefs.h. */
14798$ac_includes_default
14799int
14800main ()
14801{
14802static struct stat ac_aggr;
14803if (sizeof ac_aggr.st_rdev)
14804return 0;
14805 ;
14806 return 0;
14807}
14808_ACEOF
14809rm -f conftest.$ac_objext
14810if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014811 (eval $ac_compile) 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014812 ac_status=$?
14813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14814 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014815 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000014816 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14817 (eval $ac_try) 2>&5
14818 ac_status=$?
14819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14820 (exit $ac_status); }; }; then
14821 ac_cv_member_struct_stat_st_rdev=yes
14822else
14823 echo "$as_me: failed program was:" >&5
14824sed 's/^/| /' conftest.$ac_ext >&5
14825
Martin v. Löwis11437992002-04-12 09:54:03 +000014826ac_cv_member_struct_stat_st_rdev=no
14827fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014828rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014829fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014830rm -f conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014831fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014832echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14833echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14834if test $ac_cv_member_struct_stat_st_rdev = yes; then
14835
14836cat >>confdefs.h <<_ACEOF
14837#define HAVE_STRUCT_STAT_ST_RDEV 1
14838_ACEOF
14839
14840
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014841fi
14842
Martin v. Löwis11437992002-04-12 09:54:03 +000014843echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14844echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14845if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14846 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014847else
Martin v. Löwis11437992002-04-12 09:54:03 +000014848 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014849#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014850/* confdefs.h. */
14851_ACEOF
14852cat confdefs.h >>conftest.$ac_ext
14853cat >>conftest.$ac_ext <<_ACEOF
14854/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014855$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014856int
14857main ()
14858{
14859static struct stat ac_aggr;
14860if (ac_aggr.st_blksize)
14861return 0;
14862 ;
14863 return 0;
14864}
14865_ACEOF
14866rm -f conftest.$ac_objext
14867if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014868 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014869 ac_status=$?
14870 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14871 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014872 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014873 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14874 (eval $ac_try) 2>&5
14875 ac_status=$?
14876 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14877 (exit $ac_status); }; }; then
14878 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014879else
Martin v. Löwis11437992002-04-12 09:54:03 +000014880 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014881sed 's/^/| /' conftest.$ac_ext >&5
14882
14883cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014884#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014885/* confdefs.h. */
14886_ACEOF
14887cat confdefs.h >>conftest.$ac_ext
14888cat >>conftest.$ac_ext <<_ACEOF
14889/* end confdefs.h. */
14890$ac_includes_default
14891int
14892main ()
14893{
14894static struct stat ac_aggr;
14895if (sizeof ac_aggr.st_blksize)
14896return 0;
14897 ;
14898 return 0;
14899}
14900_ACEOF
14901rm -f conftest.$ac_objext
14902if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014903 (eval $ac_compile) 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014904 ac_status=$?
14905 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14906 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014907 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000014908 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14909 (eval $ac_try) 2>&5
14910 ac_status=$?
14911 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14912 (exit $ac_status); }; }; then
14913 ac_cv_member_struct_stat_st_blksize=yes
14914else
14915 echo "$as_me: failed program was:" >&5
14916sed 's/^/| /' conftest.$ac_ext >&5
14917
Martin v. Löwis11437992002-04-12 09:54:03 +000014918ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014919fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014920rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014921fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014922rm -f conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014923fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014924echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14925echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14926if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014927
Martin v. Löwis11437992002-04-12 09:54:03 +000014928cat >>confdefs.h <<_ACEOF
14929#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14930_ACEOF
14931
14932
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014933fi
14934
Martin v. Löwis11437992002-04-12 09:54:03 +000014935echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14936echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14937if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14938 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014939else
Martin v. Löwis11437992002-04-12 09:54:03 +000014940 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014941#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014942/* confdefs.h. */
14943_ACEOF
14944cat confdefs.h >>conftest.$ac_ext
14945cat >>conftest.$ac_ext <<_ACEOF
14946/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014947$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014948int
14949main ()
14950{
14951static struct stat ac_aggr;
14952if (ac_aggr.st_blocks)
14953return 0;
14954 ;
14955 return 0;
14956}
14957_ACEOF
14958rm -f conftest.$ac_objext
14959if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014960 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014961 ac_status=$?
14962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14963 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014964 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14966 (eval $ac_try) 2>&5
14967 ac_status=$?
14968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14969 (exit $ac_status); }; }; then
14970 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014971else
Martin v. Löwis11437992002-04-12 09:54:03 +000014972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014973sed 's/^/| /' conftest.$ac_ext >&5
14974
14975cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014976#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014977/* confdefs.h. */
14978_ACEOF
14979cat confdefs.h >>conftest.$ac_ext
14980cat >>conftest.$ac_ext <<_ACEOF
14981/* end confdefs.h. */
14982$ac_includes_default
14983int
14984main ()
14985{
14986static struct stat ac_aggr;
14987if (sizeof ac_aggr.st_blocks)
14988return 0;
14989 ;
14990 return 0;
14991}
14992_ACEOF
14993rm -f conftest.$ac_objext
14994if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014995 (eval $ac_compile) 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014996 ac_status=$?
14997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14998 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014999 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000015000 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15001 (eval $ac_try) 2>&5
15002 ac_status=$?
15003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15004 (exit $ac_status); }; }; then
15005 ac_cv_member_struct_stat_st_blocks=yes
15006else
15007 echo "$as_me: failed program was:" >&5
15008sed 's/^/| /' conftest.$ac_ext >&5
15009
Martin v. Löwis11437992002-04-12 09:54:03 +000015010ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015011fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015012rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015013fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015014rm -f conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015015fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015016echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
15017echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
15018if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000015019
Martin v. Löwis11437992002-04-12 09:54:03 +000015020cat >>confdefs.h <<_ACEOF
15021#define HAVE_STRUCT_STAT_ST_BLOCKS 1
15022_ACEOF
15023
15024
15025cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015026#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015027_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015028
15029else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015030 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015031fi
15032
Michael W. Hudson54241132001-12-07 15:38:26 +000015033
Martin v. Löwis11437992002-04-12 09:54:03 +000015034
15035echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
15036echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
15037if test "${ac_cv_header_time_altzone+set}" = set; then
15038 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015039else
Martin v. Löwis11437992002-04-12 09:54:03 +000015040 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015041#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015042/* confdefs.h. */
15043_ACEOF
15044cat confdefs.h >>conftest.$ac_ext
15045cat >>conftest.$ac_ext <<_ACEOF
15046/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015047#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015048int
15049main ()
15050{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015051return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000015052 ;
15053 return 0;
15054}
15055_ACEOF
15056rm -f conftest.$ac_objext
15057if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015058 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015059 ac_status=$?
15060 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15061 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015062 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015063 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15064 (eval $ac_try) 2>&5
15065 ac_status=$?
15066 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15067 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015068 ac_cv_header_time_altzone=yes
15069else
Martin v. Löwis11437992002-04-12 09:54:03 +000015070 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015071sed 's/^/| /' conftest.$ac_ext >&5
15072
Martin v. Löwis11437992002-04-12 09:54:03 +000015073ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000015074fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015075rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015076fi
15077
Martin v. Löwis11437992002-04-12 09:54:03 +000015078echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
15079echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015080if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015081
15082cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015083#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015084_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015085
15086fi
15087
Guido van Rossumda88dad1995-01-26 00:46:29 +000015088was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015089echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
15090echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
15091cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015092#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015093/* confdefs.h. */
15094_ACEOF
15095cat confdefs.h >>conftest.$ac_ext
15096cat >>conftest.$ac_ext <<_ACEOF
15097/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015098
15099#include <sys/types.h>
15100#include <sys/select.h>
15101#include <sys/time.h>
15102
Martin v. Löwis11437992002-04-12 09:54:03 +000015103int
15104main ()
15105{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015106;
Martin v. Löwis11437992002-04-12 09:54:03 +000015107 ;
15108 return 0;
15109}
15110_ACEOF
15111rm -f conftest.$ac_objext
15112if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015113 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015114 ac_status=$?
15115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15116 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015117 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015118 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15119 (eval $ac_try) 2>&5
15120 ac_status=$?
15121 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15122 (exit $ac_status); }; }; then
15123
15124
15125cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015126#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015127_ACEOF
15128
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015129 was_it_defined=yes
15130
Guido van Rossumf78abae1997-01-21 22:02:36 +000015131else
Martin v. Löwis11437992002-04-12 09:54:03 +000015132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015133sed 's/^/| /' conftest.$ac_ext >&5
15134
Guido van Rossum7f43da71994-08-01 12:15:30 +000015135fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015136rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015137echo "$as_me:$LINENO: result: $was_it_defined" >&5
15138echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015139
Martin v. Löwis11437992002-04-12 09:54:03 +000015140echo "$as_me:$LINENO: checking for addrinfo" >&5
15141echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15142if test "${ac_cv_struct_addrinfo+set}" = set; then
15143 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015144else
Martin v. Löwis11437992002-04-12 09:54:03 +000015145 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015146#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015147/* confdefs.h. */
15148_ACEOF
15149cat confdefs.h >>conftest.$ac_ext
15150cat >>conftest.$ac_ext <<_ACEOF
15151/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015152
15153# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015154int
15155main ()
15156{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015157struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015158 ;
15159 return 0;
15160}
15161_ACEOF
15162rm -f conftest.$ac_objext
15163if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015164 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015165 ac_status=$?
15166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15167 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015168 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015169 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15170 (eval $ac_try) 2>&5
15171 ac_status=$?
15172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15173 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015174 ac_cv_struct_addrinfo=yes
15175else
Martin v. Löwis11437992002-04-12 09:54:03 +000015176 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015177sed 's/^/| /' conftest.$ac_ext >&5
15178
Martin v. Löwis11437992002-04-12 09:54:03 +000015179ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015180fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015181rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015182fi
15183
Martin v. Löwis11437992002-04-12 09:54:03 +000015184echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15185echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015186if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015187
15188cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015189#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015190_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015191
15192fi
15193
Martin v. Löwis11437992002-04-12 09:54:03 +000015194echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15195echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15196if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15197 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015198else
Martin v. Löwis11437992002-04-12 09:54:03 +000015199 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015200#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015201/* confdefs.h. */
15202_ACEOF
15203cat confdefs.h >>conftest.$ac_ext
15204cat >>conftest.$ac_ext <<_ACEOF
15205/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015206
15207# include <sys/types.h>
15208# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015209int
15210main ()
15211{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015212struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015213 ;
15214 return 0;
15215}
15216_ACEOF
15217rm -f conftest.$ac_objext
15218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015219 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015220 ac_status=$?
15221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15222 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015223 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15225 (eval $ac_try) 2>&5
15226 ac_status=$?
15227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15228 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015229 ac_cv_struct_sockaddr_storage=yes
15230else
Martin v. Löwis11437992002-04-12 09:54:03 +000015231 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015232sed 's/^/| /' conftest.$ac_ext >&5
15233
Martin v. Löwis11437992002-04-12 09:54:03 +000015234ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015235fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015236rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015237fi
15238
Martin v. Löwis11437992002-04-12 09:54:03 +000015239echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15240echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015241if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015242
15243cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015244#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015245_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015246
15247fi
15248
Guido van Rossum627b2d71993-12-24 10:39:16 +000015249# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015250
Michael W. Hudson54241132001-12-07 15:38:26 +000015251
Martin v. Löwis11437992002-04-12 09:54:03 +000015252echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15253echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
15254if test "${ac_cv_c_char_unsigned+set}" = set; then
15255 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000015256else
Martin v. Löwis11437992002-04-12 09:54:03 +000015257 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015258#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015259/* confdefs.h. */
15260_ACEOF
15261cat confdefs.h >>conftest.$ac_ext
15262cat >>conftest.$ac_ext <<_ACEOF
15263/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015264$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015265int
15266main ()
15267{
15268static int test_array [1 - 2 * !(((char) -1) < 0)];
15269test_array [0] = 0
15270
15271 ;
15272 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000015273}
Martin v. Löwis11437992002-04-12 09:54:03 +000015274_ACEOF
15275rm -f conftest.$ac_objext
15276if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015277 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015278 ac_status=$?
15279 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15280 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015281 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015282 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15283 (eval $ac_try) 2>&5
15284 ac_status=$?
15285 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15286 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015287 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015288else
15289 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015290sed 's/^/| /' conftest.$ac_ext >&5
15291
Martin v. Löwis11437992002-04-12 09:54:03 +000015292ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015293fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015294rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015295fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015296echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
15297echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015298if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015299 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015300#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015301_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015302
15303fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000015304
Martin v. Löwis11437992002-04-12 09:54:03 +000015305echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
15306echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15307if test "${ac_cv_c_const+set}" = set; then
15308 echo $ECHO_N "(cached) $ECHO_C" >&6
15309else
15310 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015311#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015312/* confdefs.h. */
15313_ACEOF
15314cat confdefs.h >>conftest.$ac_ext
15315cat >>conftest.$ac_ext <<_ACEOF
15316/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015317
Martin v. Löwis11437992002-04-12 09:54:03 +000015318int
15319main ()
15320{
15321/* FIXME: Include the comments suggested by Paul. */
15322#ifndef __cplusplus
15323 /* Ultrix mips cc rejects this. */
15324 typedef int charset[2];
15325 const charset x;
15326 /* SunOS 4.1.1 cc rejects this. */
15327 char const *const *ccp;
15328 char **p;
15329 /* NEC SVR4.0.2 mips cc rejects this. */
15330 struct point {int x, y;};
15331 static struct point const zero = {0,0};
15332 /* AIX XL C 1.02.0.0 rejects this.
15333 It does not let you subtract one const X* pointer from another in
15334 an arm of an if-expression whose if-part is not a constant
15335 expression */
15336 const char *g = "string";
15337 ccp = &g + (g ? g-g : 0);
15338 /* HPUX 7.0 cc rejects these. */
15339 ++ccp;
15340 p = (char**) ccp;
15341 ccp = (char const *const *) p;
15342 { /* SCO 3.2v4 cc rejects this. */
15343 char *t;
15344 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015345
Martin v. Löwis11437992002-04-12 09:54:03 +000015346 *t++ = 0;
15347 }
15348 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15349 int x[] = {25, 17};
15350 const int *foo = &x[0];
15351 ++foo;
15352 }
15353 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15354 typedef const int *iptr;
15355 iptr p = 0;
15356 ++p;
15357 }
15358 { /* AIX XL C 1.02.0.0 rejects this saying
15359 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15360 struct s { int j; const int *ap[3]; };
15361 struct s *b; b->j = 5;
15362 }
15363 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15364 const int foo = 10;
15365 }
15366#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015367
Martin v. Löwis11437992002-04-12 09:54:03 +000015368 ;
15369 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015370}
Martin v. Löwis11437992002-04-12 09:54:03 +000015371_ACEOF
15372rm -f conftest.$ac_objext
15373if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015374 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015375 ac_status=$?
15376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15377 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015378 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +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); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015384 ac_cv_c_const=yes
15385else
Martin v. Löwis11437992002-04-12 09:54:03 +000015386 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015387sed 's/^/| /' conftest.$ac_ext >&5
15388
Martin v. Löwis11437992002-04-12 09:54:03 +000015389ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015390fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015391rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015392fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015393echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15394echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015395if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015396
15397cat >>confdefs.h <<\_ACEOF
15398#define const
15399_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015400
15401fi
15402
Michael W. Hudson54241132001-12-07 15:38:26 +000015403
Guido van Rossumda88dad1995-01-26 00:46:29 +000015404works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015405echo "$as_me:$LINENO: checking for working volatile" >&5
15406echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15407cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015408#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015409/* confdefs.h. */
15410_ACEOF
15411cat confdefs.h >>conftest.$ac_ext
15412cat >>conftest.$ac_ext <<_ACEOF
15413/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015414
Martin v. Löwis11437992002-04-12 09:54:03 +000015415int
15416main ()
15417{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015418volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015419 ;
15420 return 0;
15421}
15422_ACEOF
15423rm -f conftest.$ac_objext
15424if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015425 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015426 ac_status=$?
15427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15428 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015429 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015430 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15431 (eval $ac_try) 2>&5
15432 ac_status=$?
15433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15434 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015435 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015436else
Martin v. Löwis11437992002-04-12 09:54:03 +000015437 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015438sed 's/^/| /' conftest.$ac_ext >&5
15439
Martin v. Löwis11437992002-04-12 09:54:03 +000015440
15441cat >>confdefs.h <<\_ACEOF
15442#define volatile
15443_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015444
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015445
Guido van Rossum627b2d71993-12-24 10:39:16 +000015446fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015447rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015448echo "$as_me:$LINENO: result: $works" >&5
15449echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015450
Guido van Rossumda88dad1995-01-26 00:46:29 +000015451works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015452echo "$as_me:$LINENO: checking for working signed char" >&5
15453echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15454cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015455#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015456/* confdefs.h. */
15457_ACEOF
15458cat confdefs.h >>conftest.$ac_ext
15459cat >>conftest.$ac_ext <<_ACEOF
15460/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015461
Martin v. Löwis11437992002-04-12 09:54:03 +000015462int
15463main ()
15464{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015465signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015466 ;
15467 return 0;
15468}
15469_ACEOF
15470rm -f conftest.$ac_objext
15471if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015472 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015473 ac_status=$?
15474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15475 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015476 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15478 (eval $ac_try) 2>&5
15479 ac_status=$?
15480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15481 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015482 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015483else
Martin v. Löwis11437992002-04-12 09:54:03 +000015484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015485sed 's/^/| /' conftest.$ac_ext >&5
15486
Martin v. Löwis11437992002-04-12 09:54:03 +000015487
15488cat >>confdefs.h <<\_ACEOF
15489#define signed
15490_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015491
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015492
Guido van Rossum7f43da71994-08-01 12:15:30 +000015493fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015494rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015495echo "$as_me:$LINENO: result: $works" >&5
15496echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015497
Guido van Rossumda88dad1995-01-26 00:46:29 +000015498have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015499echo "$as_me:$LINENO: checking for prototypes" >&5
15500echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15501cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015502#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015503/* confdefs.h. */
15504_ACEOF
15505cat confdefs.h >>conftest.$ac_ext
15506cat >>conftest.$ac_ext <<_ACEOF
15507/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015508int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015509int
15510main ()
15511{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015512return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015513 ;
15514 return 0;
15515}
15516_ACEOF
15517rm -f conftest.$ac_objext
15518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015519 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015520 ac_status=$?
15521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15522 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015523 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15525 (eval $ac_try) 2>&5
15526 ac_status=$?
15527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15528 (exit $ac_status); }; }; then
15529
15530
15531cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015532#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015533_ACEOF
15534
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015535 have_prototypes=yes
15536
Guido van Rossumf78abae1997-01-21 22:02:36 +000015537else
Martin v. Löwis11437992002-04-12 09:54:03 +000015538 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015539sed 's/^/| /' conftest.$ac_ext >&5
15540
Guido van Rossum7f43da71994-08-01 12:15:30 +000015541fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015542rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015543echo "$as_me:$LINENO: result: $have_prototypes" >&5
15544echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015545
Guido van Rossumda88dad1995-01-26 00:46:29 +000015546works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015547echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15548echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15549cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015550#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015551/* confdefs.h. */
15552_ACEOF
15553cat confdefs.h >>conftest.$ac_ext
15554cat >>conftest.$ac_ext <<_ACEOF
15555/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015556
15557#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015558int foo(int x, ...) {
15559 va_list va;
15560 va_start(va, x);
15561 va_arg(va, int);
15562 va_arg(va, char *);
15563 va_arg(va, double);
15564 return 0;
15565}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015566
Martin v. Löwis11437992002-04-12 09:54:03 +000015567int
15568main ()
15569{
Guido van Rossum90eea071996-08-30 20:58:57 +000015570return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015571 ;
15572 return 0;
15573}
15574_ACEOF
15575rm -f conftest.$ac_objext
15576if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015577 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015578 ac_status=$?
15579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15580 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015581 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015582 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15583 (eval $ac_try) 2>&5
15584 ac_status=$?
15585 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15586 (exit $ac_status); }; }; then
15587
15588
15589cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015590#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015591_ACEOF
15592
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015593 works=yes
15594
Guido van Rossumf78abae1997-01-21 22:02:36 +000015595else
Martin v. Löwis11437992002-04-12 09:54:03 +000015596 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015597sed 's/^/| /' conftest.$ac_ext >&5
15598
Guido van Rossum627b2d71993-12-24 10:39:16 +000015599fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015600rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015601echo "$as_me:$LINENO: result: $works" >&5
15602echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015603
Martin v. Löwisd6320502004-08-12 13:45:08 +000015604# check for socketpair
15605echo "$as_me:$LINENO: checking for socketpair" >&5
15606echo $ECHO_N "checking for socketpair... $ECHO_C" >&6
15607cat >conftest.$ac_ext <<_ACEOF
15608#line $LINENO "configure"
15609/* confdefs.h. */
15610_ACEOF
15611cat confdefs.h >>conftest.$ac_ext
15612cat >>conftest.$ac_ext <<_ACEOF
15613/* end confdefs.h. */
15614
15615#include <sys/types.h>
15616#include <sys/socket.h>
15617
15618int
15619main ()
15620{
15621void *x=socketpair
15622 ;
15623 return 0;
15624}
15625_ACEOF
15626rm -f conftest.$ac_objext
15627if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
15628 (eval $ac_compile) 2>&5
15629 ac_status=$?
15630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15631 (exit $ac_status); } &&
15632 { ac_try='test -s conftest.$ac_objext'
15633 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15634 (eval $ac_try) 2>&5
15635 ac_status=$?
15636 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15637 (exit $ac_status); }; }; then
15638
15639cat >>confdefs.h <<\_ACEOF
15640#define HAVE_SOCKETPAIR 1
15641_ACEOF
15642
15643 echo "$as_me:$LINENO: result: yes" >&5
15644echo "${ECHO_T}yes" >&6
15645else
15646 echo "$as_me: failed program was:" >&5
15647sed 's/^/| /' conftest.$ac_ext >&5
15648
15649echo "$as_me:$LINENO: result: no" >&5
15650echo "${ECHO_T}no" >&6
15651
15652fi
15653rm -f conftest.$ac_objext conftest.$ac_ext
15654
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015655# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015656echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15657echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15658cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015659#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015660/* confdefs.h. */
15661_ACEOF
15662cat confdefs.h >>conftest.$ac_ext
15663cat >>conftest.$ac_ext <<_ACEOF
15664/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015665#include <sys/types.h>
15666#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015667int
15668main ()
15669{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015670struct sockaddr x;
15671x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015672 ;
15673 return 0;
15674}
15675_ACEOF
15676rm -f conftest.$ac_objext
15677if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015678 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015679 ac_status=$?
15680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15681 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015682 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015683 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15684 (eval $ac_try) 2>&5
15685 ac_status=$?
15686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15687 (exit $ac_status); }; }; then
15688 echo "$as_me:$LINENO: result: yes" >&5
15689echo "${ECHO_T}yes" >&6
15690
15691cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015692#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015693_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015694
15695else
Martin v. Löwis11437992002-04-12 09:54:03 +000015696 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015697sed 's/^/| /' conftest.$ac_ext >&5
15698
Martin v. Löwis11437992002-04-12 09:54:03 +000015699echo "$as_me:$LINENO: result: no" >&5
15700echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015701fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015702rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015703
Guido van Rossumda88dad1995-01-26 00:46:29 +000015704va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015705echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15706echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15707cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015708#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015709/* confdefs.h. */
15710_ACEOF
15711cat confdefs.h >>conftest.$ac_ext
15712cat >>conftest.$ac_ext <<_ACEOF
15713/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015714
15715#ifdef HAVE_STDARG_PROTOTYPES
15716#include <stdarg.h>
15717#else
15718#include <varargs.h>
15719#endif
15720
Martin v. Löwis11437992002-04-12 09:54:03 +000015721int
15722main ()
15723{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015724va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015725 ;
15726 return 0;
15727}
15728_ACEOF
15729rm -f conftest.$ac_objext
15730if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015731 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015732 ac_status=$?
15733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15734 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015735 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015736 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15737 (eval $ac_try) 2>&5
15738 ac_status=$?
15739 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15740 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015741 :
15742else
Martin v. Löwis11437992002-04-12 09:54:03 +000015743 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015744sed 's/^/| /' conftest.$ac_ext >&5
15745
Martin v. Löwis11437992002-04-12 09:54:03 +000015746
15747
15748cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015749#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015750_ACEOF
15751
Guido van Rossumda88dad1995-01-26 00:46:29 +000015752 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015753
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015754fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015755rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015756echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15757echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015758
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015759# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015760
15761
15762
15763echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15764echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15765if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15766 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015767else
Martin v. Löwis11437992002-04-12 09:54:03 +000015768 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015769#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015770/* confdefs.h. */
15771_ACEOF
15772cat confdefs.h >>conftest.$ac_ext
15773cat >>conftest.$ac_ext <<_ACEOF
15774/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015775/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015776 which can conflict with char gethostbyname_r (); below.
15777 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015778 <limits.h> exists even on freestanding compilers. Under hpux,
15779 including <limits.h> includes <sys/time.h> and causes problems
15780 checking for functions defined therein. */
15781#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015782# include <limits.h>
15783#else
15784# include <assert.h>
15785#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015786/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015787#ifdef __cplusplus
15788extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015789{
Martin v. Löwis11437992002-04-12 09:54:03 +000015790#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015791/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015792 builtin and then its argument prototype would still apply. */
15793char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015794/* The GNU C library defines this for functions which it implements
15795 to always fail with ENOSYS. Some functions are actually named
15796 something starting with __ and the normal name is an alias. */
15797#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15798choke me
15799#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015800char (*f) () = gethostbyname_r;
15801#endif
15802#ifdef __cplusplus
15803}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015804#endif
15805
Skip Montanaro6dead952003-09-25 14:50:04 +000015806int
15807main ()
15808{
15809return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000015810 ;
15811 return 0;
15812}
15813_ACEOF
15814rm -f conftest.$ac_objext conftest$ac_exeext
15815if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015816 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015817 ac_status=$?
15818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15819 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015820 { ac_try='test -s conftest$ac_exeext'
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
15826 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +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_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015832fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015833rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015834fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015835echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15836echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15837if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015838
Martin v. Löwis11437992002-04-12 09:54:03 +000015839 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015840#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015841_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015842
Martin v. Löwis11437992002-04-12 09:54:03 +000015843 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15844echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015845 OLD_CFLAGS=$CFLAGS
15846 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015847 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015848#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015849/* confdefs.h. */
15850_ACEOF
15851cat confdefs.h >>conftest.$ac_ext
15852cat >>conftest.$ac_ext <<_ACEOF
15853/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015854
15855# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015856
Martin v. Löwis11437992002-04-12 09:54:03 +000015857int
15858main ()
15859{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015860
15861 char *name;
15862 struct hostent *he, *res;
15863 char buffer[2048];
15864 int buflen = 2048;
15865 int h_errnop;
15866
15867 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015868
15869 ;
15870 return 0;
15871}
15872_ACEOF
15873rm -f conftest.$ac_objext
15874if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015875 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015876 ac_status=$?
15877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15878 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015879 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15881 (eval $ac_try) 2>&5
15882 ac_status=$?
15883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15884 (exit $ac_status); }; }; then
15885
15886 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015887#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015888_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015889
Martin v. Löwis11437992002-04-12 09:54:03 +000015890
15891cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015892#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015893_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015894
Martin v. Löwis11437992002-04-12 09:54:03 +000015895 echo "$as_me:$LINENO: result: yes" >&5
15896echo "${ECHO_T}yes" >&6
15897
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015898else
Martin v. Löwis11437992002-04-12 09:54:03 +000015899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015900sed 's/^/| /' conftest.$ac_ext >&5
15901
Martin v. Löwis11437992002-04-12 09:54:03 +000015902
15903 echo "$as_me:$LINENO: result: no" >&5
15904echo "${ECHO_T}no" >&6
15905 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15906echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15907 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015908#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015909/* confdefs.h. */
15910_ACEOF
15911cat confdefs.h >>conftest.$ac_ext
15912cat >>conftest.$ac_ext <<_ACEOF
15913/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015914
15915# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015916
Martin v. Löwis11437992002-04-12 09:54:03 +000015917int
15918main ()
15919{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015920
15921 char *name;
15922 struct hostent *he;
15923 char buffer[2048];
15924 int buflen = 2048;
15925 int h_errnop;
15926
15927 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015928
15929 ;
15930 return 0;
15931}
15932_ACEOF
15933rm -f conftest.$ac_objext
15934if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015935 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015936 ac_status=$?
15937 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15938 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015939 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15941 (eval $ac_try) 2>&5
15942 ac_status=$?
15943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15944 (exit $ac_status); }; }; then
15945
15946 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015947#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015948_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015949
Martin v. Löwis11437992002-04-12 09:54:03 +000015950
15951cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015952#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015953_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015954
Martin v. Löwis11437992002-04-12 09:54:03 +000015955 echo "$as_me:$LINENO: result: yes" >&5
15956echo "${ECHO_T}yes" >&6
15957
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015958else
Martin v. Löwis11437992002-04-12 09:54:03 +000015959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015960sed 's/^/| /' conftest.$ac_ext >&5
15961
Martin v. Löwis11437992002-04-12 09:54:03 +000015962
15963 echo "$as_me:$LINENO: result: no" >&5
15964echo "${ECHO_T}no" >&6
15965 echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
15966echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6
15967 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015968#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015969/* confdefs.h. */
15970_ACEOF
15971cat confdefs.h >>conftest.$ac_ext
15972cat >>conftest.$ac_ext <<_ACEOF
15973/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015974
15975# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015976
Martin v. Löwis11437992002-04-12 09:54:03 +000015977int
15978main ()
15979{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015980
15981 char *name;
15982 struct hostent *he;
15983 struct hostent_data data;
15984
15985 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015986
15987 ;
15988 return 0;
15989}
15990_ACEOF
15991rm -f conftest.$ac_objext
15992if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015993 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015994 ac_status=$?
15995 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15996 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015997 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015998 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15999 (eval $ac_try) 2>&5
16000 ac_status=$?
16001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16002 (exit $ac_status); }; }; then
16003
16004 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016005#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016006_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000016007
Martin v. Löwis11437992002-04-12 09:54:03 +000016008
16009cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016010#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016011_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016012
Martin v. Löwis11437992002-04-12 09:54:03 +000016013 echo "$as_me:$LINENO: result: yes" >&5
16014echo "${ECHO_T}yes" >&6
16015
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016016else
Martin v. Löwis11437992002-04-12 09:54:03 +000016017 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016018sed 's/^/| /' conftest.$ac_ext >&5
16019
Martin v. Löwis11437992002-04-12 09:54:03 +000016020
16021 echo "$as_me:$LINENO: result: no" >&5
16022echo "${ECHO_T}no" >&6
16023
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016024fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016025rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016026
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016027fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016028rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016029
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016030fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016031rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016032 CFLAGS=$OLD_CFLAGS
16033
16034else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016035
Martin v. Löwis11437992002-04-12 09:54:03 +000016036
16037for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000016038do
Martin v. Löwis11437992002-04-12 09:54:03 +000016039as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16040echo "$as_me:$LINENO: checking for $ac_func" >&5
16041echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16042if eval "test \"\${$as_ac_var+set}\" = set"; then
16043 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016044else
Martin v. Löwis11437992002-04-12 09:54:03 +000016045 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016046#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016047/* confdefs.h. */
16048_ACEOF
16049cat confdefs.h >>conftest.$ac_ext
16050cat >>conftest.$ac_ext <<_ACEOF
16051/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016052/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016053 which can conflict with char $ac_func (); below.
16054 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016055 <limits.h> exists even on freestanding compilers. Under hpux,
16056 including <limits.h> includes <sys/time.h> and causes problems
16057 checking for functions defined therein. */
16058#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016059# include <limits.h>
16060#else
16061# include <assert.h>
16062#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016063/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016064#ifdef __cplusplus
16065extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016066{
Martin v. Löwis11437992002-04-12 09:54:03 +000016067#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016068/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016069 builtin and then its argument prototype would still apply. */
16070char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016071/* The GNU C library defines this for functions which it implements
16072 to always fail with ENOSYS. Some functions are actually named
16073 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000016074#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016075choke me
16076#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016077char (*f) () = $ac_func;
16078#endif
16079#ifdef __cplusplus
16080}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016081#endif
16082
Skip Montanaro6dead952003-09-25 14:50:04 +000016083int
16084main ()
16085{
16086return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016087 ;
16088 return 0;
16089}
16090_ACEOF
16091rm -f conftest.$ac_objext conftest$ac_exeext
16092if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016093 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016094 ac_status=$?
16095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16096 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016097 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016098 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16099 (eval $ac_try) 2>&5
16100 ac_status=$?
16101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16102 (exit $ac_status); }; }; then
16103 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016104else
Martin v. Löwis11437992002-04-12 09:54:03 +000016105 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016106sed 's/^/| /' conftest.$ac_ext >&5
16107
Martin v. Löwis11437992002-04-12 09:54:03 +000016108eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016109fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016110rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016111fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016112echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16113echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16114if test `eval echo '${'$as_ac_var'}'` = yes; then
16115 cat >>confdefs.h <<_ACEOF
16116#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16117_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016118
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016119fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016120done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016121
Michael W. Hudson54241132001-12-07 15:38:26 +000016122
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016123fi
16124
Michael W. Hudson54241132001-12-07 15:38:26 +000016125
16126
16127
16128
16129
16130
Guido van Rossum627b2d71993-12-24 10:39:16 +000016131# checks for system services
16132# (none yet)
16133
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016134# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000016135echo "$as_me:$LINENO: checking for __fpu_control" >&5
16136echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
16137if test "${ac_cv_func___fpu_control+set}" = set; then
16138 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016139else
Martin v. Löwis11437992002-04-12 09:54:03 +000016140 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016141#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016142/* confdefs.h. */
16143_ACEOF
16144cat confdefs.h >>conftest.$ac_ext
16145cat >>conftest.$ac_ext <<_ACEOF
16146/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016147/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016148 which can conflict with char __fpu_control (); below.
16149 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016150 <limits.h> exists even on freestanding compilers. Under hpux,
16151 including <limits.h> includes <sys/time.h> and causes problems
16152 checking for functions defined therein. */
16153#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016154# include <limits.h>
16155#else
16156# include <assert.h>
16157#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016158/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016159#ifdef __cplusplus
16160extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016161{
Martin v. Löwis11437992002-04-12 09:54:03 +000016162#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016163/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016164 builtin and then its argument prototype would still apply. */
16165char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016166/* The GNU C library defines this for functions which it implements
16167 to always fail with ENOSYS. Some functions are actually named
16168 something starting with __ and the normal name is an alias. */
16169#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16170choke me
16171#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016172char (*f) () = __fpu_control;
16173#endif
16174#ifdef __cplusplus
16175}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016176#endif
16177
Skip Montanaro6dead952003-09-25 14:50:04 +000016178int
16179main ()
16180{
16181return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000016182 ;
16183 return 0;
16184}
16185_ACEOF
16186rm -f conftest.$ac_objext conftest$ac_exeext
16187if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016188 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016189 ac_status=$?
16190 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16191 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016192 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016193 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16194 (eval $ac_try) 2>&5
16195 ac_status=$?
16196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16197 (exit $ac_status); }; }; then
16198 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016199else
Martin v. Löwis11437992002-04-12 09:54:03 +000016200 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016201sed 's/^/| /' conftest.$ac_ext >&5
16202
Martin v. Löwis11437992002-04-12 09:54:03 +000016203ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016204fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016205rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016206fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016207echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16208echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16209if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016210 :
16211else
Martin v. Löwis11437992002-04-12 09:54:03 +000016212
16213echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16214echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16215if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16216 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016217else
Martin v. Löwis11437992002-04-12 09:54:03 +000016218 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016219LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016220cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016221#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016222/* confdefs.h. */
16223_ACEOF
16224cat confdefs.h >>conftest.$ac_ext
16225cat >>conftest.$ac_ext <<_ACEOF
16226/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016227
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016228/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016229#ifdef __cplusplus
16230extern "C"
16231#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016232/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016233 builtin and then its argument prototype would still apply. */
16234char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016235int
16236main ()
16237{
16238__fpu_control ();
16239 ;
16240 return 0;
16241}
16242_ACEOF
16243rm -f conftest.$ac_objext conftest$ac_exeext
16244if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016245 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016246 ac_status=$?
16247 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16248 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016249 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016250 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16251 (eval $ac_try) 2>&5
16252 ac_status=$?
16253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16254 (exit $ac_status); }; }; then
16255 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016256else
Martin v. Löwis11437992002-04-12 09:54:03 +000016257 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016258sed 's/^/| /' conftest.$ac_ext >&5
16259
Martin v. Löwis11437992002-04-12 09:54:03 +000016260ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016261fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016262rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016263LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016264fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016265echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
16266echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
16267if test $ac_cv_lib_ieee___fpu_control = yes; then
16268 cat >>confdefs.h <<_ACEOF
16269#define HAVE_LIBIEEE 1
16270_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016271
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016272 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016273
Guido van Rossum627b2d71993-12-24 10:39:16 +000016274fi
16275
Michael W. Hudson54241132001-12-07 15:38:26 +000016276
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016277fi
16278
Michael W. Hudson54241132001-12-07 15:38:26 +000016279
Guido van Rossum7f253911997-05-09 02:42:48 +000016280# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000016281echo "$as_me:$LINENO: checking for --with-fpectl" >&5
16282echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
16283
Guido van Rossum7f253911997-05-09 02:42:48 +000016284# Check whether --with-fpectl or --without-fpectl was given.
16285if test "${with_fpectl+set}" = set; then
16286 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000016287
Guido van Rossum7f253911997-05-09 02:42:48 +000016288if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016289then
16290
16291cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000016292#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016293_ACEOF
16294
16295 echo "$as_me:$LINENO: result: yes" >&5
16296echo "${ECHO_T}yes" >&6
16297else echo "$as_me:$LINENO: result: no" >&5
16298echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016299fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016300else
Martin v. Löwis11437992002-04-12 09:54:03 +000016301 echo "$as_me:$LINENO: result: no" >&5
16302echo "${ECHO_T}no" >&6
16303fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000016304
Guido van Rossum7f43da71994-08-01 12:15:30 +000016305# check for --with-libm=...
16306
Guido van Rossum563e7081996-09-10 18:20:48 +000016307case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016308Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016309BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016310*) LIBM=-lm
16311esac
Martin v. Löwis11437992002-04-12 09:54:03 +000016312echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
16313echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
16314
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016315# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016316if test "${with_libm+set}" = set; then
16317 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000016318
Guido van Rossum7f253911997-05-09 02:42:48 +000016319if test "$withval" = no
16320then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000016321 echo "$as_me:$LINENO: result: force LIBM empty" >&5
16322echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016323elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016324then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016325 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
16326echo "${ECHO_T}set LIBM=\"$withval\"" >&6
16327else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
16328echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
16329 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016330fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016331else
Martin v. Löwis11437992002-04-12 09:54:03 +000016332 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
16333echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
16334fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016335
16336# check for --with-libc=...
16337
Martin v. Löwis11437992002-04-12 09:54:03 +000016338echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
16339echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
16340
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016341# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016342if test "${with_libc+set}" = set; then
16343 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000016344
Guido van Rossum7f253911997-05-09 02:42:48 +000016345if test "$withval" = no
16346then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000016347 echo "$as_me:$LINENO: result: force LIBC empty" >&5
16348echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016349elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016350then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016351 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
16352echo "${ECHO_T}set LIBC=\"$withval\"" >&6
16353else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
16354echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
16355 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016356fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016357else
Martin v. Löwis11437992002-04-12 09:54:03 +000016358 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
16359echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
16360fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016361
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016362# check for hypot() in math library
16363LIBS_SAVE=$LIBS
16364LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016365
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016366for ac_func in hypot
16367do
Martin v. Löwis11437992002-04-12 09:54:03 +000016368as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16369echo "$as_me:$LINENO: checking for $ac_func" >&5
16370echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16371if eval "test \"\${$as_ac_var+set}\" = set"; then
16372 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016373else
Martin v. Löwis11437992002-04-12 09:54:03 +000016374 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016375#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016376/* confdefs.h. */
16377_ACEOF
16378cat confdefs.h >>conftest.$ac_ext
16379cat >>conftest.$ac_ext <<_ACEOF
16380/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016381/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016382 which can conflict with char $ac_func (); below.
16383 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016384 <limits.h> exists even on freestanding compilers. Under hpux,
16385 including <limits.h> includes <sys/time.h> and causes problems
16386 checking for functions defined therein. */
16387#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016388# include <limits.h>
16389#else
16390# include <assert.h>
16391#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016392/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016393#ifdef __cplusplus
16394extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016395{
Martin v. Löwis11437992002-04-12 09:54:03 +000016396#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016397/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016398 builtin and then its argument prototype would still apply. */
16399char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016400/* The GNU C library defines this for functions which it implements
16401 to always fail with ENOSYS. Some functions are actually named
16402 something starting with __ and the normal name is an alias. */
16403#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16404choke me
16405#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016406char (*f) () = $ac_func;
16407#endif
16408#ifdef __cplusplus
16409}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016410#endif
16411
Skip Montanaro6dead952003-09-25 14:50:04 +000016412int
16413main ()
16414{
16415return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016416 ;
16417 return 0;
16418}
16419_ACEOF
16420rm -f conftest.$ac_objext conftest$ac_exeext
16421if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016422 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016423 ac_status=$?
16424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16425 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016426 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016427 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16428 (eval $ac_try) 2>&5
16429 ac_status=$?
16430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16431 (exit $ac_status); }; }; then
16432 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016433else
Martin v. Löwis11437992002-04-12 09:54:03 +000016434 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016435sed 's/^/| /' conftest.$ac_ext >&5
16436
Martin v. Löwis11437992002-04-12 09:54:03 +000016437eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016438fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016439rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016440fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016441echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16442echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16443if test `eval echo '${'$as_ac_var'}'` = yes; then
16444 cat >>confdefs.h <<_ACEOF
16445#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16446_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016447
Michael W. Hudson54241132001-12-07 15:38:26 +000016448else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016449 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016450fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016451done
16452
Michael W. Hudson54241132001-12-07 15:38:26 +000016453
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016454LIBS=$LIBS_SAVE
16455
Guido van Rossumef2255b2000-03-10 22:30:29 +000016456# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016457if test "${ac_cv_header_wchar_h+set}" = set; then
16458 echo "$as_me:$LINENO: checking for wchar.h" >&5
16459echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16460if test "${ac_cv_header_wchar_h+set}" = set; then
16461 echo $ECHO_N "(cached) $ECHO_C" >&6
16462fi
16463echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16464echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016465else
Martin v. Löwis11437992002-04-12 09:54:03 +000016466 # Is the header compilable?
16467echo "$as_me:$LINENO: checking wchar.h usability" >&5
16468echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16469cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016470#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016471/* confdefs.h. */
16472_ACEOF
16473cat confdefs.h >>conftest.$ac_ext
16474cat >>conftest.$ac_ext <<_ACEOF
16475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016476$ac_includes_default
16477#include <wchar.h>
16478_ACEOF
16479rm -f conftest.$ac_objext
16480if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016481 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016482 ac_status=$?
16483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16484 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016485 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016486 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16487 (eval $ac_try) 2>&5
16488 ac_status=$?
16489 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16490 (exit $ac_status); }; }; then
16491 ac_header_compiler=yes
16492else
16493 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016494sed 's/^/| /' conftest.$ac_ext >&5
16495
Martin v. Löwis11437992002-04-12 09:54:03 +000016496ac_header_compiler=no
16497fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016498rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016499echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16500echo "${ECHO_T}$ac_header_compiler" >&6
16501
16502# Is the header present?
16503echo "$as_me:$LINENO: checking wchar.h presence" >&5
16504echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16505cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016506#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016507/* confdefs.h. */
16508_ACEOF
16509cat confdefs.h >>conftest.$ac_ext
16510cat >>conftest.$ac_ext <<_ACEOF
16511/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000016512#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016513_ACEOF
16514if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16515 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16516 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016517 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016518 rm -f conftest.er1
16519 cat conftest.err >&5
16520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16521 (exit $ac_status); } >/dev/null; then
16522 if test -s conftest.err; then
16523 ac_cpp_err=$ac_c_preproc_warn_flag
16524 else
16525 ac_cpp_err=
16526 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016527else
Martin v. Löwis11437992002-04-12 09:54:03 +000016528 ac_cpp_err=yes
16529fi
16530if test -z "$ac_cpp_err"; then
16531 ac_header_preproc=yes
16532else
16533 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016534sed 's/^/| /' conftest.$ac_ext >&5
16535
Martin v. Löwis11437992002-04-12 09:54:03 +000016536 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016537fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016538rm -f conftest.err conftest.$ac_ext
16539echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16540echo "${ECHO_T}$ac_header_preproc" >&6
16541
16542# So? What about this header?
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016543case $ac_header_compiler:$ac_header_preproc in
16544 yes:no )
Martin v. Löwis11437992002-04-12 09:54:03 +000016545 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16546echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016547 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016548echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16549 (
16550 cat <<\_ASBOX
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016551## ------------------------------------ ##
16552## Report this to bug-autoconf@gnu.org. ##
16553## ------------------------------------ ##
16554_ASBOX
16555 ) |
16556 sed "s/^/$as_me: WARNING: /" >&2
16557 ;;
16558 no:yes )
16559 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16560echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16561 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16562echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16563 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16564echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16565 (
16566 cat <<\_ASBOX
16567## ------------------------------------ ##
16568## Report this to bug-autoconf@gnu.org. ##
16569## ------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016570_ASBOX
16571 ) |
16572 sed "s/^/$as_me: WARNING: /" >&2
16573 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016574esac
16575echo "$as_me:$LINENO: checking for wchar.h" >&5
16576echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16577if test "${ac_cv_header_wchar_h+set}" = set; then
16578 echo $ECHO_N "(cached) $ECHO_C" >&6
16579else
16580 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016581fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016582echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16583echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16584
16585fi
16586if test $ac_cv_header_wchar_h = yes; then
16587
16588
16589cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016590#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016591_ACEOF
16592
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016593 wchar_h="yes"
16594
Guido van Rossumef2255b2000-03-10 22:30:29 +000016595else
Martin v. Löwis11437992002-04-12 09:54:03 +000016596 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016597
16598fi
16599
Michael W. Hudson54241132001-12-07 15:38:26 +000016600
Martin v. Löwis11437992002-04-12 09:54:03 +000016601
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016602# determine wchar_t size
16603if test "$wchar_h" = yes
16604then
Martin v. Löwis11437992002-04-12 09:54:03 +000016605 echo "$as_me:$LINENO: checking for wchar_t" >&5
16606echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16607if test "${ac_cv_type_wchar_t+set}" = set; then
16608 echo $ECHO_N "(cached) $ECHO_C" >&6
16609else
16610 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016611#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016612/* confdefs.h. */
16613_ACEOF
16614cat confdefs.h >>conftest.$ac_ext
16615cat >>conftest.$ac_ext <<_ACEOF
16616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016617#include <wchar.h>
16618
Martin v. Löwis11437992002-04-12 09:54:03 +000016619int
16620main ()
16621{
16622if ((wchar_t *) 0)
16623 return 0;
16624if (sizeof (wchar_t))
16625 return 0;
16626 ;
16627 return 0;
16628}
16629_ACEOF
16630rm -f conftest.$ac_objext
16631if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016632 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016633 ac_status=$?
16634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16635 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016636 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016637 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16638 (eval $ac_try) 2>&5
16639 ac_status=$?
16640 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16641 (exit $ac_status); }; }; then
16642 ac_cv_type_wchar_t=yes
16643else
16644 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016645sed 's/^/| /' conftest.$ac_ext >&5
16646
Martin v. Löwis11437992002-04-12 09:54:03 +000016647ac_cv_type_wchar_t=no
16648fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016649rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016650fi
16651echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16652echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16653
16654echo "$as_me:$LINENO: checking size of wchar_t" >&5
16655echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16656if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16657 echo $ECHO_N "(cached) $ECHO_C" >&6
16658else
16659 if test "$ac_cv_type_wchar_t" = yes; then
16660 # The cast to unsigned long works around a bug in the HP C Compiler
16661 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16662 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16663 # This bug is HP SR number 8606223364.
16664 if test "$cross_compiling" = yes; then
16665 # Depending upon the size, compute the lo and hi bounds.
16666cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016667#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016668/* confdefs.h. */
16669_ACEOF
16670cat confdefs.h >>conftest.$ac_ext
16671cat >>conftest.$ac_ext <<_ACEOF
16672/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016673#include <wchar.h>
16674
Martin v. Löwis11437992002-04-12 09:54:03 +000016675int
16676main ()
16677{
16678static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16679test_array [0] = 0
16680
16681 ;
16682 return 0;
16683}
16684_ACEOF
16685rm -f conftest.$ac_objext
16686if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016687 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016688 ac_status=$?
16689 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16690 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016691 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016692 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16693 (eval $ac_try) 2>&5
16694 ac_status=$?
16695 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16696 (exit $ac_status); }; }; then
16697 ac_lo=0 ac_mid=0
16698 while :; do
16699 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016700#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016701/* confdefs.h. */
16702_ACEOF
16703cat confdefs.h >>conftest.$ac_ext
16704cat >>conftest.$ac_ext <<_ACEOF
16705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016706#include <wchar.h>
16707
Martin v. Löwis11437992002-04-12 09:54:03 +000016708int
16709main ()
16710{
16711static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16712test_array [0] = 0
16713
16714 ;
16715 return 0;
16716}
16717_ACEOF
16718rm -f conftest.$ac_objext
16719if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016720 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016721 ac_status=$?
16722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16723 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016724 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16726 (eval $ac_try) 2>&5
16727 ac_status=$?
16728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16729 (exit $ac_status); }; }; then
16730 ac_hi=$ac_mid; break
16731else
16732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016733sed 's/^/| /' conftest.$ac_ext >&5
16734
Martin v. Löwis11437992002-04-12 09:54:03 +000016735ac_lo=`expr $ac_mid + 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016736 if test $ac_lo -le $ac_mid; then
16737 ac_lo= ac_hi=
16738 break
16739 fi
16740 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000016741fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016742rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016743 done
16744else
16745 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016746sed 's/^/| /' conftest.$ac_ext >&5
16747
Martin v. Löwis11437992002-04-12 09:54:03 +000016748cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016749#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016750/* confdefs.h. */
16751_ACEOF
16752cat confdefs.h >>conftest.$ac_ext
16753cat >>conftest.$ac_ext <<_ACEOF
16754/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016755#include <wchar.h>
16756
Martin v. Löwis11437992002-04-12 09:54:03 +000016757int
16758main ()
16759{
16760static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16761test_array [0] = 0
16762
16763 ;
16764 return 0;
16765}
16766_ACEOF
16767rm -f conftest.$ac_objext
16768if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016769 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016770 ac_status=$?
16771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16772 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016773 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16775 (eval $ac_try) 2>&5
16776 ac_status=$?
16777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16778 (exit $ac_status); }; }; then
16779 ac_hi=-1 ac_mid=-1
16780 while :; do
16781 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016782#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016783/* confdefs.h. */
16784_ACEOF
16785cat confdefs.h >>conftest.$ac_ext
16786cat >>conftest.$ac_ext <<_ACEOF
16787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016788#include <wchar.h>
16789
Martin v. Löwis11437992002-04-12 09:54:03 +000016790int
16791main ()
16792{
16793static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16794test_array [0] = 0
16795
16796 ;
16797 return 0;
16798}
16799_ACEOF
16800rm -f conftest.$ac_objext
16801if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016802 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016803 ac_status=$?
16804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16805 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016806 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16808 (eval $ac_try) 2>&5
16809 ac_status=$?
16810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16811 (exit $ac_status); }; }; then
16812 ac_lo=$ac_mid; break
16813else
16814 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016815sed 's/^/| /' conftest.$ac_ext >&5
16816
Martin v. Löwis11437992002-04-12 09:54:03 +000016817ac_hi=`expr '(' $ac_mid ')' - 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016818 if test $ac_mid -le $ac_hi; then
16819 ac_lo= ac_hi=
16820 break
16821 fi
16822 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000016823fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016824rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016825 done
16826else
16827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016828sed 's/^/| /' conftest.$ac_ext >&5
16829
Martin v. Löwis11437992002-04-12 09:54:03 +000016830ac_lo= ac_hi=
16831fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016832rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016833fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016834rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016835# Binary search between lo and hi bounds.
16836while test "x$ac_lo" != "x$ac_hi"; do
16837 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16838 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016839#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016840/* confdefs.h. */
16841_ACEOF
16842cat confdefs.h >>conftest.$ac_ext
16843cat >>conftest.$ac_ext <<_ACEOF
16844/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016845#include <wchar.h>
16846
Martin v. Löwis11437992002-04-12 09:54:03 +000016847int
16848main ()
16849{
16850static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16851test_array [0] = 0
16852
16853 ;
16854 return 0;
16855}
16856_ACEOF
16857rm -f conftest.$ac_objext
16858if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016859 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016860 ac_status=$?
16861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16862 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016863 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16865 (eval $ac_try) 2>&5
16866 ac_status=$?
16867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16868 (exit $ac_status); }; }; then
16869 ac_hi=$ac_mid
16870else
16871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016872sed 's/^/| /' conftest.$ac_ext >&5
16873
Martin v. Löwis11437992002-04-12 09:54:03 +000016874ac_lo=`expr '(' $ac_mid ')' + 1`
16875fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016876rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016877done
16878case $ac_lo in
16879?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016880'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16881See \`config.log' for more details." >&5
16882echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16883See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016884 { (exit 1); exit 1; }; } ;;
16885esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016886else
16887 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000016888 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16889See \`config.log' for more details." >&5
16890echo "$as_me: error: cannot run test program while cross compiling
16891See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016892 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016893else
Martin v. Löwis11437992002-04-12 09:54:03 +000016894 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016895#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016896/* confdefs.h. */
16897_ACEOF
16898cat confdefs.h >>conftest.$ac_ext
16899cat >>conftest.$ac_ext <<_ACEOF
16900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016901#include <wchar.h>
16902
16903long longval () { return (long) (sizeof (wchar_t)); }
16904unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016905#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016906#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016907int
16908main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016909{
Martin v. Löwis11437992002-04-12 09:54:03 +000016910
16911 FILE *f = fopen ("conftest.val", "w");
16912 if (! f)
16913 exit (1);
16914 if (((long) (sizeof (wchar_t))) < 0)
16915 {
16916 long i = longval ();
16917 if (i != ((long) (sizeof (wchar_t))))
16918 exit (1);
16919 fprintf (f, "%ld\n", i);
16920 }
16921 else
16922 {
16923 unsigned long i = ulongval ();
16924 if (i != ((long) (sizeof (wchar_t))))
16925 exit (1);
16926 fprintf (f, "%lu\n", i);
16927 }
16928 exit (ferror (f) || fclose (f) != 0);
16929
16930 ;
16931 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016932}
Martin v. Löwis11437992002-04-12 09:54:03 +000016933_ACEOF
16934rm -f conftest$ac_exeext
16935if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16936 (eval $ac_link) 2>&5
16937 ac_status=$?
16938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16939 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16940 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16941 (eval $ac_try) 2>&5
16942 ac_status=$?
16943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16944 (exit $ac_status); }; }; then
16945 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016946else
Martin v. Löwis11437992002-04-12 09:54:03 +000016947 echo "$as_me: program exited with status $ac_status" >&5
16948echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016949sed 's/^/| /' conftest.$ac_ext >&5
16950
Martin v. Löwis11437992002-04-12 09:54:03 +000016951( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000016952{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16953See \`config.log' for more details." >&5
16954echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16955See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016956 { (exit 1); exit 1; }; }
16957fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016958rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016959fi
16960fi
16961rm -f conftest.val
16962else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016963 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016964fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016965fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016966echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16967echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16968cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016969#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016970_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016971
Michael W. Hudson54241132001-12-07 15:38:26 +000016972
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016973fi
16974
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016975echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
16976echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
16977have_ucs4_tcl=no
16978cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016979#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016980/* confdefs.h. */
16981_ACEOF
16982cat confdefs.h >>conftest.$ac_ext
16983cat >>conftest.$ac_ext <<_ACEOF
16984/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016985
16986#include <tcl.h>
16987#if TCL_UTF_MAX != 6
16988# error "NOT UCS4_TCL"
16989#endif
16990int
16991main ()
16992{
16993
16994 ;
16995 return 0;
16996}
16997_ACEOF
16998rm -f conftest.$ac_objext
16999if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017000 (eval $ac_compile) 2>&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017001 ac_status=$?
17002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17003 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017004 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017005 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17006 (eval $ac_try) 2>&5
17007 ac_status=$?
17008 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17009 (exit $ac_status); }; }; then
17010
17011
17012cat >>confdefs.h <<\_ACEOF
17013#define HAVE_UCS4_TCL 1
17014_ACEOF
17015
17016 have_ucs4_tcl=yes
17017
17018else
17019 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017020sed 's/^/| /' conftest.$ac_ext >&5
17021
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017022fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017023rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017024echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
17025echo "${ECHO_T}$have_ucs4_tcl" >&6
17026
Skip Montanaro6dead952003-09-25 14:50:04 +000017027# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017028if test "$wchar_h" = yes
17029then
17030 # check whether wchar_t is signed or not
17031 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
17032echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
17033 if test "${ac_cv_wchar_t_signed+set}" = set; then
17034 echo $ECHO_N "(cached) $ECHO_C" >&6
17035else
17036
17037 if test "$cross_compiling" = yes; then
17038 ac_cv_wchar_t_signed=yes
17039else
17040 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017041#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017042/* confdefs.h. */
17043_ACEOF
17044cat confdefs.h >>conftest.$ac_ext
17045cat >>conftest.$ac_ext <<_ACEOF
17046/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017047
17048 #include <wchar.h>
17049 int main()
17050 {
17051 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
17052 }
17053
17054_ACEOF
17055rm -f conftest$ac_exeext
17056if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17057 (eval $ac_link) 2>&5
17058 ac_status=$?
17059 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17060 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17062 (eval $ac_try) 2>&5
17063 ac_status=$?
17064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17065 (exit $ac_status); }; }; then
17066 ac_cv_wchar_t_signed=yes
17067else
17068 echo "$as_me: program exited with status $ac_status" >&5
17069echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017070sed 's/^/| /' conftest.$ac_ext >&5
17071
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017072( exit $ac_status )
17073ac_cv_wchar_t_signed=no
17074fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017075rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017076fi
17077fi
17078
17079 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
17080echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
17081fi
17082
Martin v. Löwis11437992002-04-12 09:54:03 +000017083echo "$as_me:$LINENO: checking what type to use for unicode" >&5
17084echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017085# Check whether --enable-unicode or --disable-unicode was given.
17086if test "${enable_unicode+set}" = set; then
17087 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000017088
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017089else
17090 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000017091fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017092
17093if test $enable_unicode = yes
17094then
Martin v. Löwisfd917792001-06-27 20:22:04 +000017095 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017096 case "$have_ucs4_tcl" in
17097 yes) enable_unicode="ucs4"
17098 ;;
17099 *) enable_unicode="ucs2"
17100 ;;
17101 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017102fi
17103
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017104
17105
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017106case "$enable_unicode" in
17107ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000017108 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017109#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000017110_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017111
17112 ;;
17113ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000017114 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017115#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000017116_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017117
17118 ;;
17119esac
17120
Michael W. Hudson54241132001-12-07 15:38:26 +000017121
Martin v. Löwis11437992002-04-12 09:54:03 +000017122
17123
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017124
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017125if test "$enable_unicode" = "no"
17126then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017127 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000017128 echo "$as_me:$LINENO: result: not used" >&5
17129echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017130else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017131 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000017132
17133cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017134#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017135_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017136
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017137
17138 # wchar_t is only usable if it maps to an unsigned type
17139 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
17140 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017141 then
17142 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017143
Martin v. Löwis11437992002-04-12 09:54:03 +000017144cat >>confdefs.h <<\_ACEOF
17145#define HAVE_USABLE_WCHAR_T 1
17146_ACEOF
17147
17148 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017149#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017150_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017151
17152 elif test "$ac_cv_sizeof_short" = "$unicode_size"
17153 then
17154 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000017155 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017156#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000017157_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017158
17159 elif test "$ac_cv_sizeof_long" = "$unicode_size"
17160 then
17161 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000017162 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017163#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000017164_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017165
17166 else
17167 PY_UNICODE_TYPE="no type found"
17168 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017169 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17170echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017171fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017172
17173# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017174echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17175echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17176if test "${ac_cv_c_bigendian+set}" = set; then
17177 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017178else
Martin v. Löwis11437992002-04-12 09:54:03 +000017179 # See if sys/param.h defines the BYTE_ORDER macro.
17180cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017181#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017182/* confdefs.h. */
17183_ACEOF
17184cat confdefs.h >>conftest.$ac_ext
17185cat >>conftest.$ac_ext <<_ACEOF
17186/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017187#include <sys/types.h>
17188#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017189
Martin v. Löwis11437992002-04-12 09:54:03 +000017190int
17191main ()
17192{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017193#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17194 bogus endian macros
17195#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017196
17197 ;
17198 return 0;
17199}
17200_ACEOF
17201rm -f conftest.$ac_objext
17202if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017203 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017204 ac_status=$?
17205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17206 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017207 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17209 (eval $ac_try) 2>&5
17210 ac_status=$?
17211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17212 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017213 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017214cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017215#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017216/* confdefs.h. */
17217_ACEOF
17218cat confdefs.h >>conftest.$ac_ext
17219cat >>conftest.$ac_ext <<_ACEOF
17220/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017221#include <sys/types.h>
17222#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017223
Martin v. Löwis11437992002-04-12 09:54:03 +000017224int
17225main ()
17226{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017227#if BYTE_ORDER != BIG_ENDIAN
17228 not big endian
17229#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017230
17231 ;
17232 return 0;
17233}
17234_ACEOF
17235rm -f conftest.$ac_objext
17236if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017237 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017238 ac_status=$?
17239 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17240 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017241 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017242 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17243 (eval $ac_try) 2>&5
17244 ac_status=$?
17245 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17246 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017247 ac_cv_c_bigendian=yes
17248else
Martin v. Löwis11437992002-04-12 09:54:03 +000017249 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017250sed 's/^/| /' conftest.$ac_ext >&5
17251
Martin v. Löwis11437992002-04-12 09:54:03 +000017252ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017253fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017254rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017255else
Martin v. Löwis11437992002-04-12 09:54:03 +000017256 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017257sed 's/^/| /' conftest.$ac_ext >&5
17258
Martin v. Löwis11437992002-04-12 09:54:03 +000017259# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000017260if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017261 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000017262 ac_cv_c_bigendian=unknown
17263 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017264#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017265/* confdefs.h. */
17266_ACEOF
17267cat confdefs.h >>conftest.$ac_ext
17268cat >>conftest.$ac_ext <<_ACEOF
17269/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017270short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17271short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17272void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
17273short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17274short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17275void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017276int
17277main ()
17278{
17279 _ascii (); _ebcdic ();
17280 ;
17281 return 0;
17282}
17283_ACEOF
17284rm -f conftest.$ac_objext
17285if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017286 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017287 ac_status=$?
17288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17289 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017290 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017291 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17292 (eval $ac_try) 2>&5
17293 ac_status=$?
17294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17295 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017296 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017297 ac_cv_c_bigendian=yes
17298fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017299if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017300 if test "$ac_cv_c_bigendian" = unknown; then
17301 ac_cv_c_bigendian=no
17302 else
17303 # finding both strings is unlikely to happen, but who knows?
17304 ac_cv_c_bigendian=unknown
17305 fi
17306fi
17307else
17308 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017309sed 's/^/| /' conftest.$ac_ext >&5
17310
Martin v. Löwis11437992002-04-12 09:54:03 +000017311fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017312rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017313else
17314 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017315#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017316/* confdefs.h. */
17317_ACEOF
17318cat confdefs.h >>conftest.$ac_ext
17319cat >>conftest.$ac_ext <<_ACEOF
17320/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017321int
17322main ()
17323{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017324 /* Are we little or big endian? From Harbison&Steele. */
17325 union
17326 {
17327 long l;
17328 char c[sizeof (long)];
17329 } u;
17330 u.l = 1;
17331 exit (u.c[sizeof (long) - 1] == 1);
17332}
Martin v. Löwis11437992002-04-12 09:54:03 +000017333_ACEOF
17334rm -f conftest$ac_exeext
17335if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17336 (eval $ac_link) 2>&5
17337 ac_status=$?
17338 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17339 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17340 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17341 (eval $ac_try) 2>&5
17342 ac_status=$?
17343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17344 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017345 ac_cv_c_bigendian=no
17346else
Martin v. Löwis11437992002-04-12 09:54:03 +000017347 echo "$as_me: program exited with status $ac_status" >&5
17348echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017349sed 's/^/| /' conftest.$ac_ext >&5
17350
Martin v. Löwis11437992002-04-12 09:54:03 +000017351( exit $ac_status )
17352ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017353fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017354rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017355fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017356fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017357rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017358fi
17359echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
17360echo "${ECHO_T}$ac_cv_c_bigendian" >&6
17361case $ac_cv_c_bigendian in
17362 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000017363
Martin v. Löwis11437992002-04-12 09:54:03 +000017364cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017365#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017366_ACEOF
17367 ;;
17368 no)
17369 ;;
17370 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017371 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017372presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017373echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017374presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
17375 { (exit 1); exit 1; }; } ;;
17376esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017377
Michael W. Hudson54241132001-12-07 15:38:26 +000017378
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017379# Check whether right shifting a negative integer extends the sign bit
17380# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000017381echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
17382echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
17383if test "${ac_cv_rshift_extends_sign+set}" = set; then
17384 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017385else
Martin v. Löwis11437992002-04-12 09:54:03 +000017386
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017387if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017388 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017389else
Martin v. Löwis11437992002-04-12 09:54:03 +000017390 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017391#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017392/* confdefs.h. */
17393_ACEOF
17394cat confdefs.h >>conftest.$ac_ext
17395cat >>conftest.$ac_ext <<_ACEOF
17396/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017397
17398int main()
17399{
Vladimir Marangozova6180282000-07-12 05:05:06 +000017400 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017401}
17402
Martin v. Löwis11437992002-04-12 09:54:03 +000017403_ACEOF
17404rm -f conftest$ac_exeext
17405if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17406 (eval $ac_link) 2>&5
17407 ac_status=$?
17408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17409 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17410 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17411 (eval $ac_try) 2>&5
17412 ac_status=$?
17413 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17414 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000017415 ac_cv_rshift_extends_sign=yes
17416else
Martin v. Löwis11437992002-04-12 09:54:03 +000017417 echo "$as_me: program exited with status $ac_status" >&5
17418echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017419sed 's/^/| /' conftest.$ac_ext >&5
17420
Martin v. Löwis11437992002-04-12 09:54:03 +000017421( exit $ac_status )
17422ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017423fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017424rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017425fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000017426fi
17427
Martin v. Löwis11437992002-04-12 09:54:03 +000017428echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
17429echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017430if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017431then
Martin v. Löwis11437992002-04-12 09:54:03 +000017432
17433cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017434#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017435_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017436
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017437fi
17438
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017439# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017440echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
17441echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
17442if test "${ac_cv_have_getc_unlocked+set}" = set; then
17443 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017444else
Martin v. Löwis11437992002-04-12 09:54:03 +000017445
17446cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017447#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017448/* confdefs.h. */
17449_ACEOF
17450cat confdefs.h >>conftest.$ac_ext
17451cat >>conftest.$ac_ext <<_ACEOF
17452/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017453#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017454int
17455main ()
17456{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017457
17458 FILE *f = fopen("/dev/null", "r");
17459 flockfile(f);
17460 getc_unlocked(f);
17461 funlockfile(f);
17462
Martin v. Löwis11437992002-04-12 09:54:03 +000017463 ;
17464 return 0;
17465}
17466_ACEOF
17467rm -f conftest.$ac_objext conftest$ac_exeext
17468if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017469 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017470 ac_status=$?
17471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17472 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017473 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17475 (eval $ac_try) 2>&5
17476 ac_status=$?
17477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17478 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017479 ac_cv_have_getc_unlocked=yes
17480else
Martin v. Löwis11437992002-04-12 09:54:03 +000017481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017482sed 's/^/| /' conftest.$ac_ext >&5
17483
Martin v. Löwis11437992002-04-12 09:54:03 +000017484ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017485fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017486rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017487fi
17488
Martin v. Löwis11437992002-04-12 09:54:03 +000017489echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
17490echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017491if test "$ac_cv_have_getc_unlocked" = yes
17492then
Martin v. Löwis11437992002-04-12 09:54:03 +000017493
17494cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017495#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017496_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017497
17498fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017499
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017500# check for readline 2.1
17501echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
17502echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
17503if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
17504 echo $ECHO_N "(cached) $ECHO_C" >&6
17505else
17506 ac_check_lib_save_LIBS=$LIBS
17507LIBS="-lreadline -ltermcap $LIBS"
17508cat >conftest.$ac_ext <<_ACEOF
17509#line $LINENO "configure"
17510/* confdefs.h. */
17511_ACEOF
17512cat confdefs.h >>conftest.$ac_ext
17513cat >>conftest.$ac_ext <<_ACEOF
17514/* end confdefs.h. */
17515
17516/* Override any gcc2 internal prototype to avoid an error. */
17517#ifdef __cplusplus
17518extern "C"
17519#endif
17520/* We use char because int might match the return type of a gcc2
17521 builtin and then its argument prototype would still apply. */
17522char rl_callback_handler_install ();
17523int
17524main ()
17525{
17526rl_callback_handler_install ();
17527 ;
17528 return 0;
17529}
17530_ACEOF
17531rm -f conftest.$ac_objext conftest$ac_exeext
17532if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17533 (eval $ac_link) 2>&5
17534 ac_status=$?
17535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17536 (exit $ac_status); } &&
17537 { ac_try='test -s conftest$ac_exeext'
17538 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17539 (eval $ac_try) 2>&5
17540 ac_status=$?
17541 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17542 (exit $ac_status); }; }; then
17543 ac_cv_lib_readline_rl_callback_handler_install=yes
17544else
17545 echo "$as_me: failed program was:" >&5
17546sed 's/^/| /' conftest.$ac_ext >&5
17547
17548ac_cv_lib_readline_rl_callback_handler_install=no
17549fi
17550rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17551LIBS=$ac_check_lib_save_LIBS
17552fi
17553echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
17554echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
17555if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
17556
17557cat >>confdefs.h <<\_ACEOF
17558#define HAVE_RL_CALLBACK 1
17559_ACEOF
17560
17561fi
17562
17563
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017564# check for readline 2.2
17565cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017566#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017567/* confdefs.h. */
17568_ACEOF
17569cat confdefs.h >>conftest.$ac_ext
17570cat >>conftest.$ac_ext <<_ACEOF
17571/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017572#include <readline/readline.h>
17573_ACEOF
17574if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17575 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17576 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000017577 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017578 rm -f conftest.er1
17579 cat conftest.err >&5
17580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17581 (exit $ac_status); } >/dev/null; then
17582 if test -s conftest.err; then
17583 ac_cpp_err=$ac_c_preproc_warn_flag
17584 else
17585 ac_cpp_err=
17586 fi
17587else
17588 ac_cpp_err=yes
17589fi
17590if test -z "$ac_cpp_err"; then
17591 have_readline=yes
17592else
17593 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017594sed 's/^/| /' conftest.$ac_ext >&5
17595
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017596 have_readline=no
17597fi
17598rm -f conftest.err conftest.$ac_ext
17599if test $have_readline = yes
17600then
17601 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017602#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017603/* confdefs.h. */
17604_ACEOF
17605cat confdefs.h >>conftest.$ac_ext
17606cat >>conftest.$ac_ext <<_ACEOF
17607/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017608#include <readline/readline.h>
17609
17610_ACEOF
17611if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017612 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017613
17614cat >>confdefs.h <<\_ACEOF
17615#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17616_ACEOF
17617
17618fi
17619rm -f conftest*
17620
17621fi
17622
Martin v. Löwis0daad592001-09-30 21:09:59 +000017623# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017624echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17625echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17626if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17627 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017628else
Martin v. Löwis11437992002-04-12 09:54:03 +000017629 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017630LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017631cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017632#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017633/* confdefs.h. */
17634_ACEOF
17635cat confdefs.h >>conftest.$ac_ext
17636cat >>conftest.$ac_ext <<_ACEOF
17637/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017638
Guido van Rossum353ae582001-07-10 16:45:32 +000017639/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017640#ifdef __cplusplus
17641extern "C"
17642#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017643/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017644 builtin and then its argument prototype would still apply. */
17645char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017646int
17647main ()
17648{
17649rl_pre_input_hook ();
17650 ;
17651 return 0;
17652}
17653_ACEOF
17654rm -f conftest.$ac_objext conftest$ac_exeext
17655if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017656 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017657 ac_status=$?
17658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17659 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017660 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017661 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17662 (eval $ac_try) 2>&5
17663 ac_status=$?
17664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17665 (exit $ac_status); }; }; then
17666 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017667else
Martin v. Löwis11437992002-04-12 09:54:03 +000017668 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017669sed 's/^/| /' conftest.$ac_ext >&5
17670
Martin v. Löwis11437992002-04-12 09:54:03 +000017671ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017672fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017673rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017674LIBS=$ac_check_lib_save_LIBS
17675fi
17676echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17677echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17678if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017679
Martin v. Löwis11437992002-04-12 09:54:03 +000017680cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017681#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017682_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017683
Martin v. Löwis0daad592001-09-30 21:09:59 +000017684fi
17685
Michael W. Hudson54241132001-12-07 15:38:26 +000017686
Martin v. Löwis0daad592001-09-30 21:09:59 +000017687# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017688echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17689echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17690if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17691 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017692else
Martin v. Löwis11437992002-04-12 09:54:03 +000017693 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017694LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017695cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017696#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017697/* confdefs.h. */
17698_ACEOF
17699cat confdefs.h >>conftest.$ac_ext
17700cat >>conftest.$ac_ext <<_ACEOF
17701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017702
Martin v. Löwis0daad592001-09-30 21:09:59 +000017703/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017704#ifdef __cplusplus
17705extern "C"
17706#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017707/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017708 builtin and then its argument prototype would still apply. */
17709char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017710int
17711main ()
17712{
17713rl_completion_matches ();
17714 ;
17715 return 0;
17716}
17717_ACEOF
17718rm -f conftest.$ac_objext conftest$ac_exeext
17719if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017720 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017721 ac_status=$?
17722 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17723 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017724 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017725 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17726 (eval $ac_try) 2>&5
17727 ac_status=$?
17728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17729 (exit $ac_status); }; }; then
17730 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017731else
Martin v. Löwis11437992002-04-12 09:54:03 +000017732 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017733sed 's/^/| /' conftest.$ac_ext >&5
17734
Martin v. Löwis11437992002-04-12 09:54:03 +000017735ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017736fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017737rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017738LIBS=$ac_check_lib_save_LIBS
17739fi
17740echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17741echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17742if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017743
Martin v. Löwis11437992002-04-12 09:54:03 +000017744cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017745#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017746_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017747
Guido van Rossum353ae582001-07-10 16:45:32 +000017748fi
17749
Jack Jansendd19cf82001-12-06 22:36:17 +000017750
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017751# also in readline 4.2
17752cat >conftest.$ac_ext <<_ACEOF
17753#line $LINENO "configure"
17754/* confdefs.h. */
17755_ACEOF
17756cat confdefs.h >>conftest.$ac_ext
17757cat >>conftest.$ac_ext <<_ACEOF
17758/* end confdefs.h. */
17759#include <readline/readline.h>
17760_ACEOF
17761if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17762 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17763 ac_status=$?
17764 grep -v '^ *+' conftest.er1 >conftest.err
17765 rm -f conftest.er1
17766 cat conftest.err >&5
17767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17768 (exit $ac_status); } >/dev/null; then
17769 if test -s conftest.err; then
17770 ac_cpp_err=$ac_c_preproc_warn_flag
17771 else
17772 ac_cpp_err=
17773 fi
17774else
17775 ac_cpp_err=yes
17776fi
17777if test -z "$ac_cpp_err"; then
17778 have_readline=yes
17779else
17780 echo "$as_me: failed program was:" >&5
17781sed 's/^/| /' conftest.$ac_ext >&5
17782
17783 have_readline=no
17784fi
17785rm -f conftest.err conftest.$ac_ext
17786if test $have_readline = yes
17787then
17788 cat >conftest.$ac_ext <<_ACEOF
17789#line $LINENO "configure"
17790/* confdefs.h. */
17791_ACEOF
17792cat confdefs.h >>conftest.$ac_ext
17793cat >>conftest.$ac_ext <<_ACEOF
17794/* end confdefs.h. */
17795#include <readline/readline.h>
17796
17797_ACEOF
17798if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17799 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
17800
17801cat >>confdefs.h <<\_ACEOF
17802#define HAVE_RL_CATCH_SIGNAL 1
17803_ACEOF
17804
17805fi
17806rm -f conftest*
17807
17808fi
17809
Martin v. Löwis11437992002-04-12 09:54:03 +000017810echo "$as_me:$LINENO: checking for broken nice()" >&5
17811echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17812if test "${ac_cv_broken_nice+set}" = set; then
17813 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017814else
Martin v. Löwis11437992002-04-12 09:54:03 +000017815
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017816if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017817 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017818else
Martin v. Löwis11437992002-04-12 09:54:03 +000017819 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017820#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017821/* confdefs.h. */
17822_ACEOF
17823cat confdefs.h >>conftest.$ac_ext
17824cat >>conftest.$ac_ext <<_ACEOF
17825/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017826
17827int main()
17828{
17829 int val1 = nice(1);
17830 if (val1 != -1 && val1 == nice(2))
17831 exit(0);
17832 exit(1);
17833}
17834
Martin v. Löwis11437992002-04-12 09:54:03 +000017835_ACEOF
17836rm -f conftest$ac_exeext
17837if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17838 (eval $ac_link) 2>&5
17839 ac_status=$?
17840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17841 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17842 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17843 (eval $ac_try) 2>&5
17844 ac_status=$?
17845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17846 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017847 ac_cv_broken_nice=yes
17848else
Martin v. Löwis11437992002-04-12 09:54:03 +000017849 echo "$as_me: program exited with status $ac_status" >&5
17850echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017851sed 's/^/| /' conftest.$ac_ext >&5
17852
Martin v. Löwis11437992002-04-12 09:54:03 +000017853( exit $ac_status )
17854ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017855fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017856rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017857fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017858fi
17859
Martin v. Löwis11437992002-04-12 09:54:03 +000017860echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17861echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017862if test "$ac_cv_broken_nice" = yes
17863then
Martin v. Löwis11437992002-04-12 09:54:03 +000017864
17865cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017866#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017867_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017868
17869fi
17870
Nicholas Bastine62c5c82004-03-21 23:45:42 +000017871echo "$as_me:$LINENO: checking for broken poll()" >&5
17872echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
17873if test "$cross_compiling" = yes; then
17874 ac_cv_broken_poll=no
17875else
17876 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017877#line $LINENO "configure"
Nicholas Bastine62c5c82004-03-21 23:45:42 +000017878/* confdefs.h. */
17879_ACEOF
17880cat confdefs.h >>conftest.$ac_ext
17881cat >>conftest.$ac_ext <<_ACEOF
17882/* end confdefs.h. */
17883
17884#include <poll.h>
17885
17886int main (void)
17887 {
17888 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
17889
17890 close (42);
17891
17892 int poll_test = poll (&poll_struct, 1, 0);
17893
17894 if (poll_test < 0)
17895 {
17896 exit(0);
17897 }
17898 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
17899 {
17900 exit(0);
17901 }
17902 else
17903 {
17904 exit(1);
17905 }
17906 }
17907
17908_ACEOF
17909rm -f conftest$ac_exeext
17910if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17911 (eval $ac_link) 2>&5
17912 ac_status=$?
17913 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17914 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17915 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17916 (eval $ac_try) 2>&5
17917 ac_status=$?
17918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17919 (exit $ac_status); }; }; then
17920 ac_cv_broken_poll=yes
17921else
17922 echo "$as_me: program exited with status $ac_status" >&5
17923echo "$as_me: failed program was:" >&5
17924sed 's/^/| /' conftest.$ac_ext >&5
17925
17926( exit $ac_status )
17927ac_cv_broken_poll=no
17928fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017929rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000017930fi
17931echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
17932echo "${ECHO_T}$ac_cv_broken_poll" >&6
17933if test "$ac_cv_broken_poll" = yes
17934then
17935
17936cat >>confdefs.h <<\_ACEOF
17937#define HAVE_BROKEN_POLL 1
17938_ACEOF
17939
17940fi
17941
17942
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017943# tzset(3) exists and works like we expect it to
17944echo "$as_me:$LINENO: checking for working tzset()" >&5
17945echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17946if test "${ac_cv_working_tzset+set}" = set; then
17947 echo $ECHO_N "(cached) $ECHO_C" >&6
17948else
17949
17950if test "$cross_compiling" = yes; then
17951 ac_cv_working_tzset=no
17952else
17953 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017954#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017955/* confdefs.h. */
17956_ACEOF
17957cat confdefs.h >>conftest.$ac_ext
17958cat >>conftest.$ac_ext <<_ACEOF
17959/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017960
17961#include <stdlib.h>
17962#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000017963#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017964int main()
17965{
Brett Cannon18367812003-09-19 00:59:16 +000017966 /* Note that we need to ensure that not only does tzset(3)
17967 do 'something' with localtime, but it works as documented
17968 in the library reference and as expected by the test suite.
17969
17970 Red Hat 6.2 doesn't understand the southern hemisphere
17971 after New Year's Day; it thinks swaps on that day.
17972 */
17973
17974 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
17975 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
17976
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017977 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017978 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017979 if (localtime(&groundhogday)->tm_hour != 0)
17980 exit(1);
17981
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017982 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017983 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017984 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017985 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000017986
17987 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
17988 tzset();
17989 if (localtime(&groundhogday)->tm_hour != 11)
17990 exit(1);
17991 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
17992 exit(1);
17993 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
17994 exit(1);
17995
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017996 exit(0);
17997}
17998
17999_ACEOF
18000rm -f conftest$ac_exeext
18001if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
18002 (eval $ac_link) 2>&5
18003 ac_status=$?
18004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18005 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18006 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18007 (eval $ac_try) 2>&5
18008 ac_status=$?
18009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18010 (exit $ac_status); }; }; then
18011 ac_cv_working_tzset=yes
18012else
18013 echo "$as_me: program exited with status $ac_status" >&5
18014echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018015sed 's/^/| /' conftest.$ac_ext >&5
18016
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018017( exit $ac_status )
18018ac_cv_working_tzset=no
18019fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018020rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossumd11b62e2003-03-14 21:51:36 +000018021fi
18022fi
18023
18024echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
18025echo "${ECHO_T}$ac_cv_working_tzset" >&6
18026if test "$ac_cv_working_tzset" = yes
18027then
18028
18029cat >>confdefs.h <<\_ACEOF
18030#define HAVE_WORKING_TZSET 1
18031_ACEOF
18032
18033fi
18034
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018035# Look for subsecond timestamps in struct stat
18036echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
18037echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
18038if test "${ac_cv_stat_tv_nsec+set}" = set; then
18039 echo $ECHO_N "(cached) $ECHO_C" >&6
18040else
18041 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018042#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018043/* confdefs.h. */
18044_ACEOF
18045cat confdefs.h >>conftest.$ac_ext
18046cat >>conftest.$ac_ext <<_ACEOF
18047/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018048#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018049int
18050main ()
18051{
18052
18053struct stat st;
18054st.st_mtim.tv_nsec = 1;
18055
18056 ;
18057 return 0;
18058}
18059_ACEOF
18060rm -f conftest.$ac_objext
18061if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018062 (eval $ac_compile) 2>&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018063 ac_status=$?
18064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18065 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018066 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18068 (eval $ac_try) 2>&5
18069 ac_status=$?
18070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18071 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000018072 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018073else
18074 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018075sed 's/^/| /' conftest.$ac_ext >&5
18076
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018077ac_cv_stat_tv_nsec=no
18078fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018079rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018080fi
18081
18082echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
18083echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
18084if test "$ac_cv_stat_tv_nsec" = yes
18085then
18086
18087cat >>confdefs.h <<\_ACEOF
18088#define HAVE_STAT_TV_NSEC 1
18089_ACEOF
18090
18091fi
18092
Jack Jansen666b1e72001-10-31 12:11:48 +000018093# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000018094echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
18095echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
18096if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
18097 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018098else
Martin v. Löwis11437992002-04-12 09:54:03 +000018099 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018100#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018101/* confdefs.h. */
18102_ACEOF
18103cat confdefs.h >>conftest.$ac_ext
18104cat >>conftest.$ac_ext <<_ACEOF
18105/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018106#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018107int
18108main ()
18109{
Jack Jansen666b1e72001-10-31 12:11:48 +000018110
18111 int rtn;
18112 rtn = mvwdelch(0,0,0);
18113
Martin v. Löwis11437992002-04-12 09:54:03 +000018114 ;
18115 return 0;
18116}
18117_ACEOF
18118rm -f conftest.$ac_objext
18119if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018120 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018121 ac_status=$?
18122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18123 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018124 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018125 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18126 (eval $ac_try) 2>&5
18127 ac_status=$?
18128 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18129 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000018130 ac_cv_mvwdelch_is_expression=yes
18131else
Martin v. Löwis11437992002-04-12 09:54:03 +000018132 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018133sed 's/^/| /' conftest.$ac_ext >&5
18134
Martin v. Löwis11437992002-04-12 09:54:03 +000018135ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018136fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018137rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000018138fi
18139
Martin v. Löwis11437992002-04-12 09:54:03 +000018140echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
18141echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018142
18143if test "$ac_cv_mvwdelch_is_expression" = yes
18144then
Martin v. Löwis11437992002-04-12 09:54:03 +000018145
18146cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018147#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018148_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018149
18150fi
18151
Martin v. Löwis11437992002-04-12 09:54:03 +000018152echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
18153echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
18154if test "${ac_cv_window_has_flags+set}" = set; then
18155 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018156else
Martin v. Löwis11437992002-04-12 09:54:03 +000018157 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018158#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018159/* confdefs.h. */
18160_ACEOF
18161cat confdefs.h >>conftest.$ac_ext
18162cat >>conftest.$ac_ext <<_ACEOF
18163/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018164#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018165int
18166main ()
18167{
Jack Jansen666b1e72001-10-31 12:11:48 +000018168
18169 WINDOW *w;
18170 w->_flags = 0;
18171
Martin v. Löwis11437992002-04-12 09:54:03 +000018172 ;
18173 return 0;
18174}
18175_ACEOF
18176rm -f conftest.$ac_objext
18177if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018178 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018179 ac_status=$?
18180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18181 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018182 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018183 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18184 (eval $ac_try) 2>&5
18185 ac_status=$?
18186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18187 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000018188 ac_cv_window_has_flags=yes
18189else
Martin v. Löwis11437992002-04-12 09:54:03 +000018190 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018191sed 's/^/| /' conftest.$ac_ext >&5
18192
Martin v. Löwis11437992002-04-12 09:54:03 +000018193ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018194fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018195rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000018196fi
18197
Martin v. Löwis11437992002-04-12 09:54:03 +000018198echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
18199echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000018200
Jack Jansen666b1e72001-10-31 12:11:48 +000018201
18202if test "$ac_cv_window_has_flags" = yes
18203then
Martin v. Löwis11437992002-04-12 09:54:03 +000018204
18205cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018206#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018207_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018208
18209fi
18210
Martin v. Löwis24a880b2002-12-31 12:55:15 +000018211echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
18212echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
18213
18214if test -e /dev/ptmx
18215then
18216 echo "$as_me:$LINENO: result: yes" >&5
18217echo "${ECHO_T}yes" >&6
18218
18219cat >>confdefs.h <<\_ACEOF
18220#define HAVE_DEV_PTMX 1
18221_ACEOF
18222
18223else
18224 echo "$as_me:$LINENO: result: no" >&5
18225echo "${ECHO_T}no" >&6
18226fi
18227
Neal Norwitz865400f2003-03-21 01:42:58 +000018228echo "$as_me:$LINENO: checking for /dev/ptc" >&5
18229echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
18230
18231if test -e /dev/ptc
18232then
18233 echo "$as_me:$LINENO: result: yes" >&5
18234echo "${ECHO_T}yes" >&6
18235
18236cat >>confdefs.h <<\_ACEOF
18237#define HAVE_DEV_PTC 1
18238_ACEOF
18239
18240else
18241 echo "$as_me:$LINENO: result: no" >&5
18242echo "${ECHO_T}no" >&6
18243fi
18244
Martin v. Löwis11437992002-04-12 09:54:03 +000018245echo "$as_me:$LINENO: checking for socklen_t" >&5
18246echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
18247if test "${ac_cv_type_socklen_t+set}" = set; then
18248 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000018249else
Martin v. Löwis11437992002-04-12 09:54:03 +000018250 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018251#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018252/* confdefs.h. */
18253_ACEOF
18254cat confdefs.h >>conftest.$ac_ext
18255cat >>conftest.$ac_ext <<_ACEOF
18256/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000018257
18258#ifdef HAVE_SYS_TYPES_H
18259#include <sys/types.h>
18260#endif
18261#ifdef HAVE_SYS_SOCKET_H
18262#include <sys/socket.h>
18263#endif
18264
18265
Martin v. Löwis11437992002-04-12 09:54:03 +000018266int
18267main ()
18268{
18269if ((socklen_t *) 0)
18270 return 0;
18271if (sizeof (socklen_t))
18272 return 0;
18273 ;
18274 return 0;
18275}
18276_ACEOF
18277rm -f conftest.$ac_objext
18278if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018279 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018280 ac_status=$?
18281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18282 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018283 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018284 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18285 (eval $ac_try) 2>&5
18286 ac_status=$?
18287 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18288 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000018289 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000018290else
Martin v. Löwis11437992002-04-12 09:54:03 +000018291 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018292sed 's/^/| /' conftest.$ac_ext >&5
18293
Martin v. Löwis11437992002-04-12 09:54:03 +000018294ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000018295fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018296rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018297fi
18298echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
18299echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
18300if test $ac_cv_type_socklen_t = yes; then
18301 :
18302else
Guido van Rossum95713eb2000-05-18 20:53:31 +000018303
Martin v. Löwis01c04012002-11-11 14:58:44 +000018304cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018305#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000018306_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018307
18308fi
18309
Michael W. Hudson54241132001-12-07 15:38:26 +000018310
Michael W. Hudson54241132001-12-07 15:38:26 +000018311
18312
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000018313for h in `(cd $srcdir;echo Python/thread_*.h)`
18314do
18315 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
18316done
18317
Michael W. Hudson54241132001-12-07 15:38:26 +000018318
Jack Jansen0b06be72002-06-21 14:48:38 +000018319SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000018320echo "$as_me:$LINENO: checking for build directories" >&5
18321echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018322for dir in $SRCDIRS; do
18323 if test ! -d $dir; then
18324 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000018325 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018326done
Martin v. Löwis11437992002-04-12 09:54:03 +000018327echo "$as_me:$LINENO: result: done" >&5
18328echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000018329
Guido van Rossum627b2d71993-12-24 10:39:16 +000018330# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000018331 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000018332
Martin v. Löwis11437992002-04-12 09:54:03 +000018333cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018334# This file is a shell script that caches the results of configure
18335# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000018336# scripts and configure runs, see configure's option --config-cache.
18337# It is not useful on other systems. If it contains results you don't
18338# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018339#
Martin v. Löwis11437992002-04-12 09:54:03 +000018340# config.status only pays attention to the cache file if you give it
18341# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018342#
Skip Montanaro6dead952003-09-25 14:50:04 +000018343# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000018344# loading this file, other *unset* `ac_cv_foo' will be assigned the
18345# following values.
18346
18347_ACEOF
18348
Guido van Rossumf78abae1997-01-21 22:02:36 +000018349# The following way of writing the cache mishandles newlines in values,
18350# but we know of no workaround that is simple, portable, and efficient.
18351# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018352# Ultrix sh set writes to stderr and can't be redirected directly,
18353# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000018354{
18355 (set) 2>&1 |
18356 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18357 *ac_space=\ *)
18358 # `set' does not quote correctly, so add quotes (double-quote
18359 # substitution turns \\\\ into \\, and sed turns \\ into \).
18360 sed -n \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018361 "s/'/'\\\\''/g;
18362 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000018363 ;;
18364 *)
18365 # `set' quotes correctly as required by POSIX, so do not add quotes.
18366 sed -n \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018367 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000018368 ;;
18369 esac;
18370} |
18371 sed '
18372 t clear
18373 : clear
18374 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18375 t end
18376 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18377 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000018378if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018379 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018380 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18381 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018382 else
18383 echo "not updating unwritable cache $cache_file"
18384 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018385fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018386rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018387
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018388test "x$prefix" = xNONE && prefix=$ac_default_prefix
18389# Let make expand exec_prefix.
18390test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018391
Martin v. Löwis11437992002-04-12 09:54:03 +000018392# VPATH may cause trouble with some makes, so we remove $(srcdir),
18393# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18394# trailing colons and then remove the whole line if VPATH becomes empty
18395# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018396if test "x$srcdir" = x.; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018397 ac_vpsub='/^[ ]*VPATH[ ]*=/{
Martin v. Löwis11437992002-04-12 09:54:03 +000018398s/:*\$(srcdir):*/:/;
18399s/:*\${srcdir}:*/:/;
18400s/:*@srcdir@:*/:/;
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018401s/^\([^=]*=[ ]*\):*/\1/;
Martin v. Löwis11437992002-04-12 09:54:03 +000018402s/:*$//;
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018403s/^[^=]*=[ ]*$//;
Martin v. Löwis11437992002-04-12 09:54:03 +000018404}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018405fi
18406
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018407DEFS=-DHAVE_CONFIG_H
18408
Skip Montanaro6dead952003-09-25 14:50:04 +000018409ac_libobjs=
18410ac_ltlibobjs=
18411for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18412 # 1. Remove the extension, and $U if already installed.
18413 ac_i=`echo "$ac_i" |
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018414 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018415 # 2. Add them.
18416 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18417 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18418done
18419LIBOBJS=$ac_libobjs
18420
18421LTLIBOBJS=$ac_ltlibobjs
18422
18423
Martin v. Löwis11437992002-04-12 09:54:03 +000018424
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018425: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018426ac_clean_files_save=$ac_clean_files
18427ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18428{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18429echo "$as_me: creating $CONFIG_STATUS" >&6;}
18430cat >$CONFIG_STATUS <<_ACEOF
18431#! $SHELL
18432# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018433# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018434# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018435# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018436
Martin v. Löwis11437992002-04-12 09:54:03 +000018437debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018438ac_cs_recheck=false
18439ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018440SHELL=\${CONFIG_SHELL-$SHELL}
18441_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018442
Martin v. Löwis11437992002-04-12 09:54:03 +000018443cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018444## --------------------- ##
18445## M4sh Initialization. ##
18446## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018447
Martin v. Löwis11437992002-04-12 09:54:03 +000018448# Be Bourne compatible
18449if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18450 emulate sh
18451 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018452 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18453 # is contrary to our usage. Disable this feature.
18454 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000018455elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18456 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000018457fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018458
Martin v. Löwis11437992002-04-12 09:54:03 +000018459# Support unset when possible.
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018460if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018461 as_unset=unset
18462else
18463 as_unset=false
18464fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018465
Skip Montanaro6dead952003-09-25 14:50:04 +000018466
18467# Work around bugs in pre-3.0 UWIN ksh.
18468$as_unset ENV MAIL MAILPATH
18469PS1='$ '
18470PS2='> '
18471PS4='+ '
18472
18473# NLS nuisances.
18474for as_var in \
18475 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18476 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18477 LC_TELEPHONE LC_TIME
18478do
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018479 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000018480 eval $as_var=C; export $as_var
18481 else
18482 $as_unset $as_var
18483 fi
18484done
18485
18486# Required to use basename.
18487if expr a : '\(a\)' >/dev/null 2>&1; then
18488 as_expr=expr
18489else
18490 as_expr=false
18491fi
18492
18493if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18494 as_basename=basename
18495else
18496 as_basename=false
18497fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018498
18499
18500# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000018501as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018502$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18503 X"$0" : 'X\(//\)$' \| \
18504 X"$0" : 'X\(/\)$' \| \
18505 . : '\(.\)' 2>/dev/null ||
18506echo X/"$0" |
18507 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18508 /^X\/\(\/\/\)$/{ s//\1/; q; }
18509 /^X\/\(\/\).*/{ s//\1/; q; }
18510 s/.*/./; q'`
18511
Skip Montanaro6dead952003-09-25 14:50:04 +000018512
Martin v. Löwis11437992002-04-12 09:54:03 +000018513# PATH needs CR, and LINENO needs CR and PATH.
18514# Avoid depending upon Character Ranges.
18515as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18516as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18517as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18518as_cr_digits='0123456789'
18519as_cr_alnum=$as_cr_Letters$as_cr_digits
18520
18521# The user is always right.
18522if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018523 echo "#! /bin/sh" >conf$$.sh
18524 echo "exit 0" >>conf$$.sh
18525 chmod +x conf$$.sh
18526 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018527 PATH_SEPARATOR=';'
18528 else
18529 PATH_SEPARATOR=:
18530 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018531 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018532fi
18533
18534
18535 as_lineno_1=$LINENO
18536 as_lineno_2=$LINENO
18537 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18538 test "x$as_lineno_1" != "x$as_lineno_2" &&
18539 test "x$as_lineno_3" = "x$as_lineno_2" || {
18540 # Find who we are. Look in the path if we contain no path at all
18541 # relative or not.
18542 case $0 in
18543 *[\\/]* ) as_myself=$0 ;;
18544 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18545for as_dir in $PATH
18546do
18547 IFS=$as_save_IFS
18548 test -z "$as_dir" && as_dir=.
18549 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18550done
18551
18552 ;;
18553 esac
18554 # We did not find ourselves, most probably we were run as `sh COMMAND'
18555 # in which case we are not to be found in the path.
18556 if test "x$as_myself" = x; then
18557 as_myself=$0
18558 fi
18559 if test ! -f "$as_myself"; then
18560 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18561echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18562 { (exit 1); exit 1; }; }
18563 fi
18564 case $CONFIG_SHELL in
18565 '')
18566 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18567for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18568do
18569 IFS=$as_save_IFS
18570 test -z "$as_dir" && as_dir=.
18571 for as_base in sh bash ksh sh5; do
18572 case $as_dir in
18573 /*)
18574 if ("$as_dir/$as_base" -c '
18575 as_lineno_1=$LINENO
18576 as_lineno_2=$LINENO
18577 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18578 test "x$as_lineno_1" != "x$as_lineno_2" &&
18579 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018580 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18581 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018582 CONFIG_SHELL=$as_dir/$as_base
18583 export CONFIG_SHELL
18584 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18585 fi;;
18586 esac
18587 done
18588done
18589;;
Jack Jansendd19cf82001-12-06 22:36:17 +000018590 esac
18591
Martin v. Löwis11437992002-04-12 09:54:03 +000018592 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18593 # uniformly replaced by the line number. The first 'sed' inserts a
18594 # line-number line before each line; the second 'sed' does the real
18595 # work. The second script uses 'N' to pair each line-number line
18596 # with the numbered line, and appends trailing '-' during
18597 # substitution so that $LINENO is not a special case at line end.
18598 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18599 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18600 sed '=' <$as_myself |
18601 sed '
18602 N
18603 s,$,-,
18604 : loop
18605 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18606 t loop
18607 s,-$,,
18608 s,^['$as_cr_digits']*\n,,
18609 ' >$as_me.lineno &&
18610 chmod +x $as_me.lineno ||
18611 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18612echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18613 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018614
Martin v. Löwis11437992002-04-12 09:54:03 +000018615 # Don't try to exec as it changes $[0], causing all sort of problems
18616 # (the dirname of $[0] is not the place where we might find the
18617 # original and so on. Autoconf is especially sensible to this).
18618 . ./$as_me.lineno
18619 # Exit status is that of the last command.
18620 exit
18621}
18622
18623
18624case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18625 *c*,-n*) ECHO_N= ECHO_C='
18626' ECHO_T=' ' ;;
18627 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18628 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18629esac
18630
18631if expr a : '\(a\)' >/dev/null 2>&1; then
18632 as_expr=expr
18633else
18634 as_expr=false
18635fi
18636
18637rm -f conf$$ conf$$.exe conf$$.file
18638echo >conf$$.file
18639if ln -s conf$$.file conf$$ 2>/dev/null; then
18640 # We could just check for DJGPP; but this test a) works b) is more generic
18641 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18642 if test -f conf$$.exe; then
18643 # Don't use ln at all; we don't have any links
18644 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018645 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018646 as_ln_s='ln -s'
18647 fi
18648elif ln conf$$.file conf$$ 2>/dev/null; then
18649 as_ln_s=ln
18650else
18651 as_ln_s='cp -p'
18652fi
18653rm -f conf$$ conf$$.exe conf$$.file
18654
Skip Montanaro6dead952003-09-25 14:50:04 +000018655if mkdir -p . 2>/dev/null; then
18656 as_mkdir_p=:
18657else
18658 as_mkdir_p=false
18659fi
18660
Martin v. Löwis11437992002-04-12 09:54:03 +000018661as_executable_p="test -f"
18662
18663# Sed expression to map a string onto a valid CPP name.
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018664as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
Martin v. Löwis11437992002-04-12 09:54:03 +000018665
18666# Sed expression to map a string onto a valid variable name.
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018667as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
Martin v. Löwis11437992002-04-12 09:54:03 +000018668
18669
18670# IFS
18671# We need space, tab and new line, in precisely that order.
18672as_nl='
18673'
18674IFS=" $as_nl"
18675
18676# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000018677$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000018678
18679exec 6>&1
18680
18681# Open the log real soon, to keep \$[0] and so on meaningful, and to
18682# report actual input values of CONFIG_FILES etc. instead of their
18683# values after options handling. Logging --version etc. is OK.
18684exec 5>>config.log
18685{
18686 echo
18687 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18688## Running $as_me. ##
18689_ASBOX
18690} >&5
18691cat >&5 <<_CSEOF
18692
Fred Drake9bd44622003-07-30 17:39:48 +000018693This file was extended by python $as_me 2.4, which was
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018694generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018695
18696 CONFIG_FILES = $CONFIG_FILES
18697 CONFIG_HEADERS = $CONFIG_HEADERS
18698 CONFIG_LINKS = $CONFIG_LINKS
18699 CONFIG_COMMANDS = $CONFIG_COMMANDS
18700 $ $0 $@
18701
18702_CSEOF
18703echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18704echo >&5
18705_ACEOF
18706
18707# Files that config.status was made for.
18708if test -n "$ac_config_files"; then
18709 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18710fi
18711
18712if test -n "$ac_config_headers"; then
18713 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18714fi
18715
18716if test -n "$ac_config_links"; then
18717 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18718fi
18719
18720if test -n "$ac_config_commands"; then
18721 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18722fi
18723
18724cat >>$CONFIG_STATUS <<\_ACEOF
18725
18726ac_cs_usage="\
18727\`$as_me' instantiates files from templates according to the
18728current configuration.
18729
18730Usage: $0 [OPTIONS] [FILE]...
18731
18732 -h, --help print this help, then exit
18733 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000018734 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018735 -d, --debug don't remove temporary files
18736 --recheck update $as_me by reconfiguring in the same conditions
18737 --file=FILE[:TEMPLATE]
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018738 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018739 --header=FILE[:TEMPLATE]
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018740 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018741
18742Configuration files:
18743$config_files
18744
18745Configuration headers:
18746$config_headers
18747
18748Report bugs to <bug-autoconf@gnu.org>."
18749_ACEOF
18750
18751cat >>$CONFIG_STATUS <<_ACEOF
18752ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000018753python config.status 2.4
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018754configured by $0, generated by GNU Autoconf 2.57,
Martin v. Löwis11437992002-04-12 09:54:03 +000018755 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18756
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018757Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18758Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018759This config.status script is free software; the Free Software Foundation
18760gives unlimited permission to copy, distribute and modify it."
18761srcdir=$srcdir
18762INSTALL="$INSTALL"
18763_ACEOF
18764
18765cat >>$CONFIG_STATUS <<\_ACEOF
18766# If no file are specified by the user, then we need to provide default
18767# value. By we need to know if files were specified by the user.
18768ac_need_defaults=:
18769while test $# != 0
18770do
18771 case $1 in
18772 --*=*)
18773 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18774 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018775 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018776 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018777 -*)
18778 ac_option=$1
18779 ac_optarg=$2
18780 ac_shift=shift
18781 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018782 *) # This is not an option, so the user has probably given explicit
18783 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000018784 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000018785 ac_need_defaults=false;;
18786 esac
18787
Skip Montanaro6dead952003-09-25 14:50:04 +000018788 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018789 # Handling of the options.
18790_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018791cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018792 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18793 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018794 --version | --vers* | -V )
18795 echo "$ac_cs_version"; exit 0 ;;
18796 --he | --h)
18797 # Conflict between --help and --header
18798 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18799Try \`$0 --help' for more information." >&5
18800echo "$as_me: error: ambiguous option: $1
18801Try \`$0 --help' for more information." >&2;}
18802 { (exit 1); exit 1; }; };;
18803 --help | --hel | -h )
18804 echo "$ac_cs_usage"; exit 0 ;;
18805 --debug | --d* | -d )
18806 debug=: ;;
18807 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018808 $ac_shift
18809 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018810 ac_need_defaults=false;;
18811 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018812 $ac_shift
18813 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018814 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018815 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18816 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18817 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018818
18819 # This is an error.
18820 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18821Try \`$0 --help' for more information." >&5
18822echo "$as_me: error: unrecognized option: $1
18823Try \`$0 --help' for more information." >&2;}
18824 { (exit 1); exit 1; }; } ;;
18825
18826 *) ac_config_targets="$ac_config_targets $1" ;;
18827
18828 esac
18829 shift
18830done
18831
Skip Montanaro6dead952003-09-25 14:50:04 +000018832ac_configure_extra_args=
18833
18834if $ac_cs_silent; then
18835 exec 6>/dev/null
18836 ac_configure_extra_args="$ac_configure_extra_args --silent"
18837fi
18838
18839_ACEOF
18840cat >>$CONFIG_STATUS <<_ACEOF
18841if \$ac_cs_recheck; then
18842 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18843 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18844fi
18845
Martin v. Löwis11437992002-04-12 09:54:03 +000018846_ACEOF
18847
18848
18849
18850
18851
18852cat >>$CONFIG_STATUS <<\_ACEOF
18853for ac_config_target in $ac_config_targets
18854do
18855 case "$ac_config_target" in
18856 # Handling of arguments.
18857 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18858 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18859 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18860 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18861echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18862 { (exit 1); exit 1; }; };;
18863 esac
18864done
18865
18866# If the user did not use the arguments to specify the items to instantiate,
18867# then the envvar interface is used. Set only those that are not.
18868# We use the long form for the default assignment because of an extremely
18869# bizarre bug on SunOS 4.1.3.
18870if $ac_need_defaults; then
18871 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18872 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18873fi
18874
Skip Montanaro6dead952003-09-25 14:50:04 +000018875# Have a temporary directory for convenience. Make it in the build tree
18876# simply because there is no reason to put it here, and in addition,
18877# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000018878# Create a temporary directory, and hook for its removal unless debugging.
18879$debug ||
18880{
18881 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18882 trap '{ (exit 1); exit 1; }' 1 2 13 15
18883}
18884
18885# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018886
Martin v. Löwis11437992002-04-12 09:54:03 +000018887{
Skip Montanaro6dead952003-09-25 14:50:04 +000018888 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018889 test -n "$tmp" && test -d "$tmp"
18890} ||
18891{
Skip Montanaro6dead952003-09-25 14:50:04 +000018892 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000018893 (umask 077 && mkdir $tmp)
18894} ||
18895{
Skip Montanaro6dead952003-09-25 14:50:04 +000018896 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000018897 { (exit 1); exit 1; }
18898}
18899
18900_ACEOF
18901
18902cat >>$CONFIG_STATUS <<_ACEOF
18903
18904#
18905# CONFIG_FILES section.
18906#
18907
18908# No need to generate the scripts if there are no CONFIG_FILES.
18909# This happens for instance when ./config.status config.h
18910if test -n "\$CONFIG_FILES"; then
18911 # Protect against being on the right side of a sed subst in config.status.
18912 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18913 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18914s,@SHELL@,$SHELL,;t t
18915s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18916s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18917s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18918s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18919s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18920s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18921s,@exec_prefix@,$exec_prefix,;t t
18922s,@prefix@,$prefix,;t t
18923s,@program_transform_name@,$program_transform_name,;t t
18924s,@bindir@,$bindir,;t t
18925s,@sbindir@,$sbindir,;t t
18926s,@libexecdir@,$libexecdir,;t t
18927s,@datadir@,$datadir,;t t
18928s,@sysconfdir@,$sysconfdir,;t t
18929s,@sharedstatedir@,$sharedstatedir,;t t
18930s,@localstatedir@,$localstatedir,;t t
18931s,@libdir@,$libdir,;t t
18932s,@includedir@,$includedir,;t t
18933s,@oldincludedir@,$oldincludedir,;t t
18934s,@infodir@,$infodir,;t t
18935s,@mandir@,$mandir,;t t
18936s,@build_alias@,$build_alias,;t t
18937s,@host_alias@,$host_alias,;t t
18938s,@target_alias@,$target_alias,;t t
18939s,@DEFS@,$DEFS,;t t
18940s,@ECHO_C@,$ECHO_C,;t t
18941s,@ECHO_N@,$ECHO_N,;t t
18942s,@ECHO_T@,$ECHO_T,;t t
18943s,@LIBS@,$LIBS,;t t
18944s,@VERSION@,$VERSION,;t t
18945s,@SOVERSION@,$SOVERSION,;t t
18946s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18947s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18948s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18949s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18950s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18951s,@MACHDEP@,$MACHDEP,;t t
18952s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018953s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018954s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Jack Jansen6b08a402004-06-03 12:41:45 +000018955s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018956s,@CXX@,$CXX,;t t
18957s,@MAINOBJ@,$MAINOBJ,;t t
18958s,@EXEEXT@,$EXEEXT,;t t
18959s,@CC@,$CC,;t t
18960s,@CFLAGS@,$CFLAGS,;t t
18961s,@LDFLAGS@,$LDFLAGS,;t t
18962s,@CPPFLAGS@,$CPPFLAGS,;t t
18963s,@ac_ct_CC@,$ac_ct_CC,;t t
18964s,@OBJEXT@,$OBJEXT,;t t
18965s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018966s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018967s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18968s,@LIBRARY@,$LIBRARY,;t t
18969s,@LDLIBRARY@,$LDLIBRARY,;t t
18970s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18971s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18972s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18973s,@INSTSONAME@,$INSTSONAME,;t t
18974s,@RUNSHARED@,$RUNSHARED,;t t
18975s,@LINKCC@,$LINKCC,;t t
18976s,@RANLIB@,$RANLIB,;t t
18977s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18978s,@AR@,$AR,;t t
18979s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18980s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18981s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18982s,@LN@,$LN,;t t
18983s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018984s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018985s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18986s,@SO@,$SO,;t t
18987s,@LDSHARED@,$LDSHARED,;t t
18988s,@BLDSHARED@,$BLDSHARED,;t t
18989s,@CCSHARED@,$CCSHARED,;t t
18990s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18991s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018992s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018993s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18994s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18995s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18996s,@LDLAST@,$LDLAST,;t t
18997s,@THREADOBJ@,$THREADOBJ,;t t
18998s,@DLINCLDIR@,$DLINCLDIR,;t t
18999s,@DYNLOADFILE@,$DYNLOADFILE,;t t
19000s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019001s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019002s,@LIBOBJS@,$LIBOBJS,;t t
19003s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
19004s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
19005s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
19006s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
19007s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
19008s,@LIBM@,$LIBM,;t t
19009s,@LIBC@,$LIBC,;t t
19010s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
19011s,@THREADHEADERS@,$THREADHEADERS,;t t
19012s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000019013s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000019014CEOF
19015
19016_ACEOF
19017
19018 cat >>$CONFIG_STATUS <<\_ACEOF
19019 # Split the substitutions into bite-sized pieces for seds with
19020 # small command number limits, like on Digital OSF/1 and HP-UX.
19021 ac_max_sed_lines=48
19022 ac_sed_frag=1 # Number of current file.
19023 ac_beg=1 # First line for current file.
19024 ac_end=$ac_max_sed_lines # Line after last line for current file.
19025 ac_more_lines=:
19026 ac_sed_cmds=
19027 while $ac_more_lines; do
19028 if test $ac_beg -gt 1; then
19029 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19030 else
19031 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19032 fi
19033 if test ! -s $tmp/subs.frag; then
19034 ac_more_lines=false
19035 else
19036 # The purpose of the label and of the branching condition is to
19037 # speed up the sed processing (if there are no `@' at all, there
19038 # is no need to browse any of the substitutions).
19039 # These are the two extra sed commands mentioned above.
19040 (echo ':t
19041 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19042 if test -z "$ac_sed_cmds"; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019043 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000019044 else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019045 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000019046 fi
19047 ac_sed_frag=`expr $ac_sed_frag + 1`
19048 ac_beg=$ac_end
19049 ac_end=`expr $ac_end + $ac_max_sed_lines`
19050 fi
19051 done
19052 if test -z "$ac_sed_cmds"; then
19053 ac_sed_cmds=cat
19054 fi
19055fi # test -n "$CONFIG_FILES"
19056
19057_ACEOF
19058cat >>$CONFIG_STATUS <<\_ACEOF
19059for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19060 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19061 case $ac_file in
19062 - | *:- | *:-:* ) # input from stdin
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019063 cat >$tmp/stdin
19064 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19065 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019066 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019067 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019068 * ) ac_file_in=$ac_file.in ;;
19069 esac
19070
19071 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19072 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19073$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019074 X"$ac_file" : 'X\(//\)[^/]' \| \
19075 X"$ac_file" : 'X\(//\)$' \| \
19076 X"$ac_file" : 'X\(/\)' \| \
19077 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000019078echo X"$ac_file" |
19079 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19080 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19081 /^X\(\/\/\)$/{ s//\1/; q; }
19082 /^X\(\/\).*/{ s//\1/; q; }
19083 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019084 { if $as_mkdir_p; then
19085 mkdir -p "$ac_dir"
19086 else
19087 as_dir="$ac_dir"
19088 as_dirs=
19089 while test ! -d "$as_dir"; do
19090 as_dirs="$as_dir $as_dirs"
19091 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19092$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019093 X"$as_dir" : 'X\(//\)[^/]' \| \
19094 X"$as_dir" : 'X\(//\)$' \| \
19095 X"$as_dir" : 'X\(/\)' \| \
19096 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000019097echo X"$as_dir" |
19098 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19099 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19100 /^X\(\/\/\)$/{ s//\1/; q; }
19101 /^X\(\/\).*/{ s//\1/; q; }
19102 s/.*/./; q'`
19103 done
19104 test ! -n "$as_dirs" || mkdir $as_dirs
19105 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19106echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19107 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019108
19109 ac_builddir=.
19110
19111if test "$ac_dir" != .; then
19112 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19113 # A "../" for each directory in $ac_dir_suffix.
19114 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19115else
19116 ac_dir_suffix= ac_top_builddir=
19117fi
19118
19119case $srcdir in
19120 .) # No --srcdir option. We are building in place.
19121 ac_srcdir=.
19122 if test -z "$ac_top_builddir"; then
19123 ac_top_srcdir=.
19124 else
19125 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19126 fi ;;
19127 [\\/]* | ?:[\\/]* ) # Absolute path.
19128 ac_srcdir=$srcdir$ac_dir_suffix;
19129 ac_top_srcdir=$srcdir ;;
19130 *) # Relative path.
19131 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19132 ac_top_srcdir=$ac_top_builddir$srcdir ;;
19133esac
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019134# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19135# absolute.
19136ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
19137ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
19138ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19139ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000019140
19141
19142 case $INSTALL in
19143 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19144 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
19145 esac
19146
19147 if test x"$ac_file" != x-; then
19148 { echo "$as_me:$LINENO: creating $ac_file" >&5
19149echo "$as_me: creating $ac_file" >&6;}
19150 rm -f "$ac_file"
19151 fi
19152 # Let's still pretend it is `configure' which instantiates (i.e., don't
19153 # use $as_me), people would be surprised to read:
19154 # /* config.h. Generated by config.status. */
19155 if test x"$ac_file" = x-; then
19156 configure_input=
19157 else
19158 configure_input="$ac_file. "
19159 fi
19160 configure_input=$configure_input"Generated from `echo $ac_file_in |
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019161 sed 's,.*/,,'` by configure."
Martin v. Löwis11437992002-04-12 09:54:03 +000019162
19163 # First look for the input files in the build tree, otherwise in the
19164 # src tree.
19165 ac_file_inputs=`IFS=:
19166 for f in $ac_file_in; do
19167 case $f in
19168 -) echo $tmp/stdin ;;
19169 [\\/$]*)
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019170 # Absolute (can't be DOS-style, as IFS=:)
19171 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019172echo "$as_me: error: cannot find input file: $f" >&2;}
19173 { (exit 1); exit 1; }; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019174 echo $f;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019175 *) # Relative
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019176 if test -f "$f"; then
19177 # Build tree
19178 echo $f
19179 elif test -f "$srcdir/$f"; then
19180 # Source tree
19181 echo $srcdir/$f
19182 else
19183 # /dev/null tree
19184 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019185echo "$as_me: error: cannot find input file: $f" >&2;}
19186 { (exit 1); exit 1; }; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019187 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019188 esac
19189 done` || { (exit 1); exit 1; }
19190_ACEOF
19191cat >>$CONFIG_STATUS <<_ACEOF
19192 sed "$ac_vpsub
19193$extrasub
19194_ACEOF
19195cat >>$CONFIG_STATUS <<\_ACEOF
19196:t
19197/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19198s,@configure_input@,$configure_input,;t t
19199s,@srcdir@,$ac_srcdir,;t t
19200s,@abs_srcdir@,$ac_abs_srcdir,;t t
19201s,@top_srcdir@,$ac_top_srcdir,;t t
19202s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
19203s,@builddir@,$ac_builddir,;t t
19204s,@abs_builddir@,$ac_abs_builddir,;t t
19205s,@top_builddir@,$ac_top_builddir,;t t
19206s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
19207s,@INSTALL@,$ac_INSTALL,;t t
19208" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19209 rm -f $tmp/stdin
19210 if test x"$ac_file" != x-; then
19211 mv $tmp/out $ac_file
19212 else
19213 cat $tmp/out
19214 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019215 fi
19216
Martin v. Löwis11437992002-04-12 09:54:03 +000019217done
19218_ACEOF
19219cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019220
Martin v. Löwis11437992002-04-12 09:54:03 +000019221#
19222# CONFIG_HEADER section.
19223#
Guido van Rossum627b2d71993-12-24 10:39:16 +000019224
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019225# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19226# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000019227#
19228# ac_d sets the value in "#define NAME VALUE" lines.
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019229ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19230ac_dB='[ ].*$,\1#\2'
Martin v. Löwis11437992002-04-12 09:54:03 +000019231ac_dC=' '
19232ac_dD=',;t'
19233# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019234ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
Martin v. Löwis11437992002-04-12 09:54:03 +000019235ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019236ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000019237ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019238
Martin v. Löwis11437992002-04-12 09:54:03 +000019239for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000019240 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000019241 case $ac_file in
19242 - | *:- | *:-:* ) # input from stdin
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019243 cat >$tmp/stdin
19244 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19245 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019246 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019247 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019248 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019249 esac
19250
Martin v. Löwis11437992002-04-12 09:54:03 +000019251 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
19252echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019253
Martin v. Löwis11437992002-04-12 09:54:03 +000019254 # First look for the input files in the build tree, otherwise in the
19255 # src tree.
19256 ac_file_inputs=`IFS=:
19257 for f in $ac_file_in; do
19258 case $f in
19259 -) echo $tmp/stdin ;;
19260 [\\/$]*)
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019261 # Absolute (can't be DOS-style, as IFS=:)
19262 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019263echo "$as_me: error: cannot find input file: $f" >&2;}
19264 { (exit 1); exit 1; }; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019265 echo $f;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019266 *) # Relative
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019267 if test -f "$f"; then
19268 # Build tree
19269 echo $f
19270 elif test -f "$srcdir/$f"; then
19271 # Source tree
19272 echo $srcdir/$f
19273 else
19274 # /dev/null tree
19275 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019276echo "$as_me: error: cannot find input file: $f" >&2;}
19277 { (exit 1); exit 1; }; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019278 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019279 esac
19280 done` || { (exit 1); exit 1; }
19281 # Remove the trailing spaces.
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019282 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019283
Martin v. Löwis11437992002-04-12 09:54:03 +000019284_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019285
Martin v. Löwis11437992002-04-12 09:54:03 +000019286# Transform confdefs.h into two sed scripts, `conftest.defines' and
19287# `conftest.undefs', that substitutes the proper values into
19288# config.h.in to produce config.h. The first handles `#define'
19289# templates, and the second `#undef' templates.
19290# And first: Protect against being on the right side of a sed subst in
19291# config.status. Protect against being in an unquoted here document
19292# in config.status.
19293rm -f conftest.defines conftest.undefs
19294# Using a here document instead of a string reduces the quoting nightmare.
19295# Putting comments in sed scripts is not portable.
19296#
19297# `end' is used to avoid that the second main sed command (meant for
19298# 0-ary CPP macros) applies to n-ary macro definitions.
19299# See the Autoconf documentation for `clear'.
19300cat >confdef2sed.sed <<\_ACEOF
19301s/[\\&,]/\\&/g
19302s,[\\$`],\\&,g
19303t clear
19304: clear
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019305s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000019306t end
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019307s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000019308: end
19309_ACEOF
19310# If some macros were called several times there might be several times
19311# the same #defines, which is useless. Nevertheless, we may not want to
19312# sort them, since we want the *last* AC-DEFINE to be honored.
19313uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19314sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19315rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019316
19317# This sed command replaces #undef with comments. This is necessary, for
19318# example, in the case of _POSIX_SOURCE, which is predefined and required
19319# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000019320cat >>conftest.undefs <<\_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019321s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
Martin v. Löwis11437992002-04-12 09:54:03 +000019322_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019323
Martin v. Löwis11437992002-04-12 09:54:03 +000019324# Break up conftest.defines because some shells have a limit on the size
19325# of here documents, and old seds have small limits too (100 cmds).
19326echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019327echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019328echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19329echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019330rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000019331while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000019332do
Martin v. Löwis11437992002-04-12 09:54:03 +000019333 # Write a limited-size here document to $tmp/defines.sed.
19334 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19335 # Speed up: don't consider the non `#define' lines.
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019336 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019337 # Work around the forget-to-reset-the-flag bug.
19338 echo 't clr' >>$CONFIG_STATUS
19339 echo ': clr' >>$CONFIG_STATUS
19340 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019341 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019342 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19343 rm -f $tmp/in
19344 mv $tmp/out $tmp/in
19345' >>$CONFIG_STATUS
19346 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19347 rm -f conftest.defines
19348 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000019349done
Martin v. Löwis11437992002-04-12 09:54:03 +000019350rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000019351echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019352echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019353
Martin v. Löwis11437992002-04-12 09:54:03 +000019354# Break up conftest.undefs because some shells have a limit on the size
19355# of here documents, and old seds have small limits too (100 cmds).
19356echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
19357rm -f conftest.tail
19358while grep . conftest.undefs >/dev/null
19359do
19360 # Write a limited-size here document to $tmp/undefs.sed.
19361 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19362 # Speed up: don't consider the non `#undef'
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019363 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019364 # Work around the forget-to-reset-the-flag bug.
19365 echo 't clr' >>$CONFIG_STATUS
19366 echo ': clr' >>$CONFIG_STATUS
19367 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19368 echo 'CEOF
19369 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19370 rm -f $tmp/in
19371 mv $tmp/out $tmp/in
19372' >>$CONFIG_STATUS
19373 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19374 rm -f conftest.undefs
19375 mv conftest.tail conftest.undefs
19376done
19377rm -f conftest.undefs
19378
19379cat >>$CONFIG_STATUS <<\_ACEOF
19380 # Let's still pretend it is `configure' which instantiates (i.e., don't
19381 # use $as_me), people would be surprised to read:
19382 # /* config.h. Generated by config.status. */
19383 if test x"$ac_file" = x-; then
19384 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019385 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019386 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019387 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019388 cat $tmp/in >>$tmp/config.h
19389 rm -f $tmp/in
19390 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019391 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019392 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19393echo "$as_me: $ac_file is unchanged" >&6;}
19394 else
19395 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19396$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019397 X"$ac_file" : 'X\(//\)[^/]' \| \
19398 X"$ac_file" : 'X\(//\)$' \| \
19399 X"$ac_file" : 'X\(/\)' \| \
19400 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000019401echo X"$ac_file" |
19402 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19403 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19404 /^X\(\/\/\)$/{ s//\1/; q; }
19405 /^X\(\/\).*/{ s//\1/; q; }
19406 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019407 { if $as_mkdir_p; then
19408 mkdir -p "$ac_dir"
19409 else
19410 as_dir="$ac_dir"
19411 as_dirs=
19412 while test ! -d "$as_dir"; do
19413 as_dirs="$as_dir $as_dirs"
19414 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19415$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019416 X"$as_dir" : 'X\(//\)[^/]' \| \
19417 X"$as_dir" : 'X\(//\)$' \| \
19418 X"$as_dir" : 'X\(/\)' \| \
19419 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000019420echo X"$as_dir" |
19421 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19422 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19423 /^X\(\/\/\)$/{ s//\1/; q; }
19424 /^X\(\/\).*/{ s//\1/; q; }
19425 s/.*/./; q'`
19426 done
19427 test ! -n "$as_dirs" || mkdir $as_dirs
19428 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19429echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19430 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019431
Martin v. Löwis11437992002-04-12 09:54:03 +000019432 rm -f $ac_file
19433 mv $tmp/config.h $ac_file
19434 fi
19435 else
19436 cat $tmp/config.h
19437 rm -f $tmp/config.h
19438 fi
19439done
19440_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019441
Martin v. Löwis11437992002-04-12 09:54:03 +000019442cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019443
Martin v. Löwis11437992002-04-12 09:54:03 +000019444{ (exit 0); exit 0; }
19445_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019446chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019447ac_clean_files=$ac_clean_files_save
19448
19449
19450# configure is writing to config.log, and then calls config.status.
19451# config.status does its own redirection, appending to config.log.
19452# Unfortunately, on DOS this fails, as config.log is still kept open
19453# by configure, so config.status won't be able to write to it; its
19454# output is simply discarded. So we exec the FD to /dev/null,
19455# effectively closing config.log, so it can be properly (re)opened and
19456# appended to by config.status. When coming back to configure, we
19457# need to make the FD available again.
19458if test "$no_create" != yes; then
19459 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019460 ac_config_status_args=
19461 test "$silent" = yes &&
19462 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019463 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019464 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019465 exec 5>>config.log
19466 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19467 # would make configure fail if this is the last instruction.
19468 $ac_cs_success || { (exit 1); exit 1; }
19469fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019470
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019471
19472echo "creating Setup"
19473if test ! -f Modules/Setup
19474then
19475 cp $srcdir/Modules/Setup.dist Modules/Setup
19476fi
19477
19478echo "creating Setup.local"
19479if test ! -f Modules/Setup.local
19480then
19481 echo "# Edit this file for local setup changes" >Modules/Setup.local
19482fi
19483
19484echo "creating Makefile"
19485$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
19486 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000019487 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019488mv config.c Modules