blob: 30aeb3fd8727b555965a9d22489eb3ce87b3b0ed [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Jack Jansenb36687a2004-07-16 08:43:47 +00002# From configure.in Revision: 1.462 .
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öwis35195ad2002-11-11 13:26:51 +00001350define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001351
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001352# Arguments passed to configure.
1353
1354CONFIG_ARGS="$ac_configure_args"
1355
Jack Jansene578a632001-08-15 01:27:14 +00001356# Check whether --enable-framework or --disable-framework was given.
1357if test "${enable_framework+set}" = set; then
1358 enableval="$enable_framework"
Martin v. Löwis11437992002-04-12 09:54:03 +00001359
Jack Jansene578a632001-08-15 01:27:14 +00001360 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00001361 yes)
Jack Jansene578a632001-08-15 01:27:14 +00001362 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00001363 esac
1364 case $enableval in
1365 no)
1366 PYTHONFRAMEWORK=
1367 PYTHONFRAMEWORKDIR=no-framework
1368 PYTHONFRAMEWORKPREFIX=
1369 PYTHONFRAMEWORKINSTALLDIR=
1370 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00001371 ;;
1372 *)
Jack Jansen127e56e2001-09-11 14:41:54 +00001373 PYTHONFRAMEWORK=Python
1374 PYTHONFRAMEWORKDIR=Python.framework
Jack Jansene578a632001-08-15 01:27:14 +00001375 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00001376 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
1377 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Jack Jansene578a632001-08-15 01:27:14 +00001378 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001379
Guido van Rossum563e7081996-09-10 18:20:48 +00001380else
Martin v. Löwis11437992002-04-12 09:54:03 +00001381
Jack Jansene578a632001-08-15 01:27:14 +00001382 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00001383 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00001384 PYTHONFRAMEWORKPREFIX=
1385 PYTHONFRAMEWORKINSTALLDIR=
1386 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001387
Martin v. Löwis11437992002-04-12 09:54:03 +00001388fi;
Michael W. Hudson54241132001-12-07 15:38:26 +00001389
1390
1391
1392
Jack Jansene578a632001-08-15 01:27:14 +00001393
1394##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001395## AC_HELP_STRING(--with-dyld,
1396## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00001397##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001398# Set name for machine-dependent library files
1399
Martin v. Löwis11437992002-04-12 09:54:03 +00001400echo "$as_me:$LINENO: checking MACHDEP" >&5
1401echo $ECHO_N "checking MACHDEP... $ECHO_C" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001402if test -z "$MACHDEP"
1403then
Guido van Rossum563e7081996-09-10 18:20:48 +00001404 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00001405 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
1406 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00001407 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001408 else
Guido van Rossum563e7081996-09-10 18:20:48 +00001409 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001410 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00001411 ac_md_system=`echo $ac_sys_system |
1412 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
1413 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00001414 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00001415 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00001416
Guido van Rossum07397971997-04-29 21:49:50 +00001417 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00001418 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00001419 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00001420 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00001421 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00001422 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001423 esac
1424fi
Guido van Rossum91922671997-10-09 20:24:13 +00001425
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001426# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
1427# disable features if it is defined, without any means to access these
1428# features as extensions. For these systems, we skip the definition of
1429# _XOPEN_SOURCE. Before adding a system to the list to gain access to
1430# some feature, make sure there is no alternative way to access this
1431# feature. Also, when using wildcards, make sure you have verified the
1432# need for not defining _XOPEN_SOURCE on all systems matching the
1433# wildcard, and that the wildcard does not include future systems
1434# (which may remove their limitations).
1435case $ac_sys_system/$ac_sys_release in
1436 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
1437 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00001438 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
1439 OpenBSD/2.* | OpenBSD/3.[01234])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001440 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00001441 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
1442 # of union __?sigval. Reported by Stuart Bishop.
1443 SunOS/5.6)
1444 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001445 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
1446 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00001447 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00001448 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001449 define_xopen_source=no;;
1450 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001451 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00001452 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00001453 define_xopen_source=no;;
Anthony Baxter6169c6b2003-10-04 07:46:23 +00001454 # On FreeBSD 4.8 and MacOS X 10.2, a bug in ncurses.h means that
1455 # it craps out if _XOPEN_EXTENDED_SOURCE is defined. Apparently,
1456 # this is fixed in 10.3, which identifies itself as Darwin/7.*
1457 # This should hopefully be fixed in FreeBSD 4.9
1458 FreeBSD/4.8* | Darwin/6* )
1459 define_xopen_source=no;;
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00001460 # On AIX 4, mbstate_t is defined only when _XOPEN_SOURCE == 500 but used in
1461 # wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined or
1462 # has another value. By not (re)defining it, the defaults come in place.
1463 AIX/4)
1464 define_xopen_source=no;;
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001465esac
1466
1467if test $define_xopen_source = yes
1468then
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001469
1470cat >>confdefs.h <<\_ACEOF
1471#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001472_ACEOF
1473
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00001474
1475 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
1476 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
1477 # several APIs are not declared. Since this is also needed in some
1478 # cases for HP-UX, we define it globally.
1479
1480
1481cat >>confdefs.h <<\_ACEOF
1482#define _XOPEN_SOURCE_EXTENDED 1
1483_ACEOF
1484
1485
1486cat >>confdefs.h <<\_ACEOF
1487#define _POSIX_C_SOURCE 200112L
1488_ACEOF
1489
1490
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001491fi
1492
Guido van Rossum91922671997-10-09 20:24:13 +00001493#
1494# SGI compilers allow the specification of the both the ABI and the
1495# ISA on the command line. Depending on the values of these switches,
1496# different and often incompatable code will be generated.
1497#
1498# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
1499# thus supply support for various ABI/ISA combinations. The MACHDEP
1500# variable is also adjusted.
1501#
1502
1503if test ! -z "$SGI_ABI"
1504then
1505 CC="cc $SGI_ABI"
1506 LDFLAGS="$SGI_ABI $LDFLAGS"
1507 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
1508fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001509echo "$as_me:$LINENO: result: $MACHDEP" >&5
1510echo "${ECHO_T}$MACHDEP" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001511
Jack Jansen83f898c2002-12-30 22:23:40 +00001512# And add extra plat-mac for darwin
1513
Jack Jansen7b59b422003-03-17 15:44:10 +00001514
Jack Jansen83f898c2002-12-30 22:23:40 +00001515echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
1516echo $ECHO_N "checking EXTRAPLATDIR... $ECHO_C" >&6
1517if test -z "$EXTRAPLATDIR"
1518then
1519 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00001520 darwin)
1521 EXTRAPLATDIR="\$(PLATMACDIRS)"
1522 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
1523 ;;
1524 *)
1525 EXTRAPLATDIR=""
1526 EXTRAMACHDEPPATH=""
1527 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00001528 esac
1529fi
1530echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
1531echo "${ECHO_T}$EXTRAPLATDIR" >&6
1532
Jack Jansen6b08a402004-06-03 12:41:45 +00001533# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
1534# it may influence the way we can build extensions, so distutils
1535# needs to check it
1536
1537CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
1538
Guido van Rossum627b2d71993-12-24 10:39:16 +00001539# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00001540
1541# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
1542# for debug/optimization stuff. BASECFLAGS is for flags that are required
1543# just to get things to compile and link. Users are free to override OPT
1544# when running configure or make. The build should not break if they do.
1545# BASECFLAGS should generally not be messed with, however.
1546
1547# XXX shouldn't some/most/all of this code be merged with the stuff later
1548# on that fiddles with OPT and BASECFLAGS?
Martin v. Löwis11437992002-04-12 09:54:03 +00001549echo "$as_me:$LINENO: checking for --without-gcc" >&5
1550echo $ECHO_N "checking for --without-gcc... $ECHO_C" >&6
1551
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001552# Check whether --with-gcc or --without-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001553if test "${with_gcc+set}" = set; then
1554 withval="$with_gcc"
Martin v. Löwis11437992002-04-12 09:54:03 +00001555
Guido van Rossum7f43da71994-08-01 12:15:30 +00001556 case $withval in
Guido van Rossumda88dad1995-01-26 00:46:29 +00001557 no) CC=cc
1558 without_gcc=yes;;
1559 yes) CC=gcc
1560 without_gcc=no;;
1561 *) CC=$withval
1562 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001563 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00001564else
Martin v. Löwis11437992002-04-12 09:54:03 +00001565
Guido van Rossum7b3853f1996-07-30 18:09:35 +00001566 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001567 AIX*) CC=cc_r
1568 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001569 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001570 case $BE_HOST_CPU in
1571 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00001572 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001573 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00001574 BASECFLAGS="$BASECFLAGS -export pragma"
1575 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001576 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001577 ;;
1578 x86)
Fred Drake5790be12000-10-09 17:06:13 +00001579 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001580 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00001581 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001582 ;;
1583 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001584 { { echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
1585echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
1586 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001587 ;;
1588 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00001589 AR="\$(srcdir)/Modules/ar_beos"
1590 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00001591 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00001592 Monterey*)
1593 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00001594 without_gcc=;;
1595 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00001596 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001597fi;
1598echo "$as_me:$LINENO: result: $without_gcc" >&5
1599echo "${ECHO_T}$without_gcc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001600
1601
Guido van Rossum95012191999-12-16 17:50:52 +00001602
Fred Drakea1a84e72001-03-06 05:52:16 +00001603MAINOBJ=python.o
Martin v. Löwis11437992002-04-12 09:54:03 +00001604echo "$as_me:$LINENO: checking for --with-cxx=<compiler>" >&5
1605echo $ECHO_N "checking for --with-cxx=<compiler>... $ECHO_C" >&6
1606
Guido van Rossum95012191999-12-16 17:50:52 +00001607# Check whether --with-cxx or --without-cxx was given.
1608if test "${with_cxx+set}" = set; then
1609 withval="$with_cxx"
Martin v. Löwis11437992002-04-12 09:54:03 +00001610
Martin v. Löwis22352952000-12-13 17:37:02 +00001611 check_cxx=no
Guido van Rossum95012191999-12-16 17:50:52 +00001612 case $withval in
1613 no) CXX=
1614 with_cxx=no;;
1615 *) CXX=$withval
Fred Drakea1a84e72001-03-06 05:52:16 +00001616 MAINOBJ=ccpython.o
Guido van Rossum95012191999-12-16 17:50:52 +00001617 with_cxx=$withval;;
1618 esac
1619else
Martin v. Löwis11437992002-04-12 09:54:03 +00001620
Guido van Rossum95012191999-12-16 17:50:52 +00001621 with_cxx=no
Martin v. Löwis22352952000-12-13 17:37:02 +00001622 check_cxx=yes
Guido van Rossum95012191999-12-16 17:50:52 +00001623
Martin v. Löwis11437992002-04-12 09:54:03 +00001624fi;
1625echo "$as_me:$LINENO: result: $with_cxx" >&5
1626echo "${ECHO_T}$with_cxx" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00001627
1628if test "$with_cxx" = "yes"
1629then
Martin v. Löwis11437992002-04-12 09:54:03 +00001630 { { echo "$as_me:$LINENO: error: must supply a compiler when using --with-cxx" >&5
1631echo "$as_me: error: must supply a compiler when using --with-cxx" >&2;}
1632 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001633fi
1634
1635
1636
1637
Martin v. Löwis11437992002-04-12 09:54:03 +00001638if test "$check_cxx" = "yes"
Martin v. Löwis22352952000-12-13 17:37:02 +00001639then
1640 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
1641do
Martin v. Löwis11437992002-04-12 09:54:03 +00001642 # 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 +00001643set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00001644echo "$as_me:$LINENO: checking for $ac_word" >&5
1645echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1646if test "${ac_cv_prog_CXX+set}" = set; then
1647 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001648else
1649 if test -n "$CXX"; then
1650 ac_cv_prog_CXX="$CXX" # Let the user override the test.
1651else
Martin v. Löwis11437992002-04-12 09:54:03 +00001652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1653for as_dir in $PATH
1654do
1655 IFS=$as_save_IFS
1656 test -z "$as_dir" && as_dir=.
1657 for ac_exec_ext in '' $ac_executable_extensions; do
1658 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1659 ac_cv_prog_CXX="$ac_prog"
1660 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1661 break 2
1662 fi
1663done
1664done
1665
Martin v. Löwis22352952000-12-13 17:37:02 +00001666fi
1667fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001668CXX=$ac_cv_prog_CXX
Martin v. Löwis22352952000-12-13 17:37:02 +00001669if test -n "$CXX"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001670 echo "$as_me:$LINENO: result: $CXX" >&5
1671echo "${ECHO_T}$CXX" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001672else
Martin v. Löwis11437992002-04-12 09:54:03 +00001673 echo "$as_me:$LINENO: result: no" >&5
1674echo "${ECHO_T}no" >&6
Martin v. Löwis22352952000-12-13 17:37:02 +00001675fi
1676
Martin v. Löwis11437992002-04-12 09:54:03 +00001677 test -n "$CXX" && break
Martin v. Löwis22352952000-12-13 17:37:02 +00001678done
1679test -n "$CXX" || CXX="notfound"
1680
1681 if test "$CXX" = "notfound"
1682 then
1683 CXX=
1684 else
Martin v. Löwis11437992002-04-12 09:54:03 +00001685 ac_ext=cc
Martin v. Löwis22352952000-12-13 17:37:02 +00001686ac_cpp='$CXXCPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001687ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1688ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1689ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
1690 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001691#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00001692/* confdefs.h. */
1693_ACEOF
1694cat confdefs.h >>conftest.$ac_ext
1695cat >>conftest.$ac_ext <<_ACEOF
1696/* end confdefs.h. */
Martin v. Löwis22352952000-12-13 17:37:02 +00001697
Martin v. Löwis11437992002-04-12 09:54:03 +00001698int
1699main ()
1700{
Michael W. Hudson54241132001-12-07 15:38:26 +00001701
Martin v. Löwis11437992002-04-12 09:54:03 +00001702 ;
1703 return 0;
1704}
1705_ACEOF
1706ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00001707ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00001708# Try to create an executable without -o first, disregard a.out.
1709# It will help us diagnose broken compilers, and finding out an intuition
1710# of exeext.
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001711echo "$as_me:$LINENO: checking for C++ compiler default output" >&5
1712echo $ECHO_N "checking for C++ compiler default output... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00001713ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1714if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
1715 (eval $ac_link_default) 2>&5
1716 ac_status=$?
1717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1718 (exit $ac_status); }; then
1719 # Find the output, starting from the most likely. This scheme is
1720# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1721# resort.
1722
1723# Be careful to initialize this variable, since it used to be cached.
1724# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
1725ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00001726# b.out is created by i960 compilers.
1727for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
1728do
1729 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001730 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001731 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001732 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001733 conftest.$ac_ext )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001734 # This is the source file.
1735 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001736 [ab].out )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001737 # We found the default executable, but exeext='' is most
1738 # certainly right.
1739 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001740 *.* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001741 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1742 # FIXME: I believe we export ac_cv_exeext for Libtool,
1743 # but it would be cool to find out if it's true. Does anybody
1744 # maintain Libtool? --akim.
1745 export ac_cv_exeext
1746 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001747 * )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001748 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001749 esac
1750done
1751else
1752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00001753sed 's/^/| /' conftest.$ac_ext >&5
1754
1755{ { echo "$as_me:$LINENO: error: C++ compiler cannot create executables
1756See \`config.log' for more details." >&5
1757echo "$as_me: error: C++ compiler cannot create executables
1758See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001759 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00001760fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001761
1762ac_exeext=$ac_cv_exeext
1763echo "$as_me:$LINENO: result: $ac_file" >&5
1764echo "${ECHO_T}$ac_file" >&6
1765
1766# Check the compiler produces executables we can run. If not, either
1767# the compiler is broken, or we cross compile.
1768echo "$as_me:$LINENO: checking whether the C++ compiler works" >&5
1769echo $ECHO_N "checking whether the C++ compiler works... $ECHO_C" >&6
1770# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1771# If not cross compiling, check that we can run a simple program.
1772if test "$cross_compiling" != yes; then
1773 if { ac_try='./$ac_file'
1774 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
1775 (eval $ac_try) 2>&5
1776 ac_status=$?
1777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1778 (exit $ac_status); }; }; then
1779 cross_compiling=no
1780 else
1781 if test "$cross_compiling" = maybe; then
1782 cross_compiling=yes
1783 else
1784 { { echo "$as_me:$LINENO: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001785If you meant to cross compile, use \`--host'.
1786See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00001787echo "$as_me: error: cannot run C++ compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00001788If you meant to cross compile, use \`--host'.
1789See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001790 { (exit 1); exit 1; }; }
1791 fi
1792 fi
1793fi
1794echo "$as_me:$LINENO: result: yes" >&5
1795echo "${ECHO_T}yes" >&6
1796
Skip Montanaro6dead952003-09-25 14:50:04 +00001797rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00001798ac_clean_files=$ac_clean_files_save
1799# Check the compiler produces executables we can run. If not, either
1800# the compiler is broken, or we cross compile.
1801echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
1802echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1803echo "$as_me:$LINENO: result: $cross_compiling" >&5
1804echo "${ECHO_T}$cross_compiling" >&6
1805
1806echo "$as_me:$LINENO: checking for suffix of executables" >&5
1807echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
1808if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
1809 (eval $ac_link) 2>&5
1810 ac_status=$?
1811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
1812 (exit $ac_status); }; then
1813 # If both `conftest.exe' and `conftest' are `present' (well, observable)
1814# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
1815# work properly (i.e., refer to `conftest.exe'), while it won't with
1816# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00001817for ac_file in conftest.exe conftest conftest.*; do
1818 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001819 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00001820 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001821 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00001822 export ac_cv_exeext
1823 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001824 * ) break;;
1825 esac
1826done
1827else
Skip Montanaro6dead952003-09-25 14:50:04 +00001828 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
1829See \`config.log' for more details." >&5
1830echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
1831See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001832 { (exit 1); exit 1; }; }
1833fi
1834
1835rm -f conftest$ac_cv_exeext
1836echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
1837echo "${ECHO_T}$ac_cv_exeext" >&6
1838
1839rm -f conftest.$ac_ext
1840EXEEXT=$ac_cv_exeext
1841ac_exeext=$EXEEXT
1842
1843 ac_ext=c
1844ac_cpp='$CPP $CPPFLAGS'
1845ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1846ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1847ac_compiler_gnu=$ac_cv_c_compiler_gnu
1848
1849
Martin v. Löwis22352952000-12-13 17:37:02 +00001850
1851 fi
1852fi
1853
Guido van Rossum8b131c51995-03-09 14:10:13 +00001854# If the user switches compilers, we can't believe the cache
1855if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
1856then
Martin v. Löwis11437992002-04-12 09:54:03 +00001857 { { echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
1858(it is also a good idea to do 'make clean' before compiling)" >&5
1859echo "$as_me: error: cached CC is different -- throw away $cache_file
1860(it is also a good idea to do 'make clean' before compiling)" >&2;}
1861 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00001862fi
1863
Martin v. Löwis11437992002-04-12 09:54:03 +00001864ac_ext=c
1865ac_cpp='$CPP $CPPFLAGS'
1866ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1867ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1868ac_compiler_gnu=$ac_cv_c_compiler_gnu
1869if test -n "$ac_tool_prefix"; then
1870 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1871set dummy ${ac_tool_prefix}gcc; ac_word=$2
1872echo "$as_me:$LINENO: checking for $ac_word" >&5
1873echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1874if test "${ac_cv_prog_CC+set}" = set; then
1875 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001876else
1877 if test -n "$CC"; then
1878 ac_cv_prog_CC="$CC" # Let the user override the test.
1879else
Martin v. Löwis11437992002-04-12 09:54:03 +00001880as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1881for as_dir in $PATH
1882do
1883 IFS=$as_save_IFS
1884 test -z "$as_dir" && as_dir=.
1885 for ac_exec_ext in '' $ac_executable_extensions; do
1886 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1887 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1888 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1889 break 2
1890 fi
1891done
1892done
1893
Jack Jansendd19cf82001-12-06 22:36:17 +00001894fi
1895fi
Martin v. Löwis11437992002-04-12 09:54:03 +00001896CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00001897if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001898 echo "$as_me:$LINENO: result: $CC" >&5
1899echo "${ECHO_T}$CC" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001900else
Martin v. Löwis11437992002-04-12 09:54:03 +00001901 echo "$as_me:$LINENO: result: no" >&5
1902echo "${ECHO_T}no" >&6
1903fi
1904
1905fi
1906if test -z "$ac_cv_prog_CC"; then
1907 ac_ct_CC=$CC
1908 # Extract the first word of "gcc", so it can be a program name with args.
1909set dummy gcc; ac_word=$2
1910echo "$as_me:$LINENO: checking for $ac_word" >&5
1911echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1912if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1913 echo $ECHO_N "(cached) $ECHO_C" >&6
1914else
1915 if test -n "$ac_ct_CC"; then
1916 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1917else
1918as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1919for as_dir in $PATH
1920do
1921 IFS=$as_save_IFS
1922 test -z "$as_dir" && as_dir=.
1923 for ac_exec_ext in '' $ac_executable_extensions; do
1924 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1925 ac_cv_prog_ac_ct_CC="gcc"
1926 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1927 break 2
1928 fi
1929done
1930done
1931
1932fi
1933fi
1934ac_ct_CC=$ac_cv_prog_ac_ct_CC
1935if test -n "$ac_ct_CC"; then
1936 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
1937echo "${ECHO_T}$ac_ct_CC" >&6
1938else
1939 echo "$as_me:$LINENO: result: no" >&5
1940echo "${ECHO_T}no" >&6
1941fi
1942
1943 CC=$ac_ct_CC
1944else
1945 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00001946fi
1947
Jack Jansendd19cf82001-12-06 22:36:17 +00001948if test -z "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001949 if test -n "$ac_tool_prefix"; then
1950 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1951set dummy ${ac_tool_prefix}cc; ac_word=$2
1952echo "$as_me:$LINENO: checking for $ac_word" >&5
1953echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1954if test "${ac_cv_prog_CC+set}" = set; then
1955 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00001956else
1957 if test -n "$CC"; then
1958 ac_cv_prog_CC="$CC" # Let the user override the test.
1959else
Martin v. Löwis11437992002-04-12 09:54:03 +00001960as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1961for as_dir in $PATH
1962do
1963 IFS=$as_save_IFS
1964 test -z "$as_dir" && as_dir=.
1965 for ac_exec_ext in '' $ac_executable_extensions; do
1966 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
1967 ac_cv_prog_CC="${ac_tool_prefix}cc"
1968 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
1969 break 2
1970 fi
1971done
1972done
1973
1974fi
1975fi
1976CC=$ac_cv_prog_CC
1977if test -n "$CC"; then
1978 echo "$as_me:$LINENO: result: $CC" >&5
1979echo "${ECHO_T}$CC" >&6
1980else
1981 echo "$as_me:$LINENO: result: no" >&5
1982echo "${ECHO_T}no" >&6
1983fi
1984
1985fi
1986if test -z "$ac_cv_prog_CC"; then
1987 ac_ct_CC=$CC
1988 # Extract the first word of "cc", so it can be a program name with args.
1989set dummy cc; ac_word=$2
1990echo "$as_me:$LINENO: checking for $ac_word" >&5
1991echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1992if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1993 echo $ECHO_N "(cached) $ECHO_C" >&6
1994else
1995 if test -n "$ac_ct_CC"; then
1996 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1997else
1998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1999for as_dir in $PATH
2000do
2001 IFS=$as_save_IFS
2002 test -z "$as_dir" && as_dir=.
2003 for ac_exec_ext in '' $ac_executable_extensions; do
2004 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2005 ac_cv_prog_ac_ct_CC="cc"
2006 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2007 break 2
2008 fi
2009done
2010done
2011
2012fi
2013fi
2014ac_ct_CC=$ac_cv_prog_ac_ct_CC
2015if test -n "$ac_ct_CC"; then
2016 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2017echo "${ECHO_T}$ac_ct_CC" >&6
2018else
2019 echo "$as_me:$LINENO: result: no" >&5
2020echo "${ECHO_T}no" >&6
2021fi
2022
2023 CC=$ac_ct_CC
2024else
2025 CC="$ac_cv_prog_CC"
2026fi
2027
2028fi
2029if test -z "$CC"; then
2030 # Extract the first word of "cc", so it can be a program name with args.
2031set dummy cc; ac_word=$2
2032echo "$as_me:$LINENO: checking for $ac_word" >&5
2033echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2034if test "${ac_cv_prog_CC+set}" = set; then
2035 echo $ECHO_N "(cached) $ECHO_C" >&6
2036else
2037 if test -n "$CC"; then
2038 ac_cv_prog_CC="$CC" # Let the user override the test.
2039else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002040 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002041as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2042for as_dir in $PATH
2043do
2044 IFS=$as_save_IFS
2045 test -z "$as_dir" && as_dir=.
2046 for ac_exec_ext in '' $ac_executable_extensions; do
2047 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2048 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2049 ac_prog_rejected=yes
2050 continue
2051 fi
2052 ac_cv_prog_CC="cc"
2053 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2054 break 2
2055 fi
2056done
2057done
2058
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002059if test $ac_prog_rejected = yes; then
2060 # We found a bogon in the path, so make sure we never use it.
2061 set dummy $ac_cv_prog_CC
2062 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002063 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002064 # We chose a different compiler from the bogus one.
2065 # However, it has the same basename, so the bogon will be chosen
2066 # first if we set CC to just the basename; use the full file name.
2067 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002068 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002069 fi
2070fi
2071fi
2072fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002073CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002074if test -n "$CC"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002075 echo "$as_me:$LINENO: result: $CC" >&5
2076echo "${ECHO_T}$CC" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002077else
Martin v. Löwis11437992002-04-12 09:54:03 +00002078 echo "$as_me:$LINENO: result: no" >&5
2079echo "${ECHO_T}no" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002080fi
2081
Martin v. Löwis11437992002-04-12 09:54:03 +00002082fi
2083if test -z "$CC"; then
2084 if test -n "$ac_tool_prefix"; then
2085 for ac_prog in cl
2086 do
2087 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2088set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2089echo "$as_me:$LINENO: checking for $ac_word" >&5
2090echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2091if test "${ac_cv_prog_CC+set}" = set; then
2092 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002093else
2094 if test -n "$CC"; then
2095 ac_cv_prog_CC="$CC" # Let the user override the test.
2096else
Martin v. Löwis11437992002-04-12 09:54:03 +00002097as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2098for as_dir in $PATH
2099do
2100 IFS=$as_save_IFS
2101 test -z "$as_dir" && as_dir=.
2102 for ac_exec_ext in '' $ac_executable_extensions; do
2103 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2104 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2105 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2106 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002107 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002108done
2109done
2110
2111fi
2112fi
2113CC=$ac_cv_prog_CC
2114if test -n "$CC"; then
2115 echo "$as_me:$LINENO: result: $CC" >&5
2116echo "${ECHO_T}$CC" >&6
2117else
2118 echo "$as_me:$LINENO: result: no" >&5
2119echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002120fi
2121
Martin v. Löwis11437992002-04-12 09:54:03 +00002122 test -n "$CC" && break
2123 done
2124fi
2125if test -z "$CC"; then
2126 ac_ct_CC=$CC
2127 for ac_prog in cl
2128do
2129 # Extract the first word of "$ac_prog", so it can be a program name with args.
2130set dummy $ac_prog; ac_word=$2
2131echo "$as_me:$LINENO: checking for $ac_word" >&5
2132echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2133if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2134 echo $ECHO_N "(cached) $ECHO_C" >&6
2135else
2136 if test -n "$ac_ct_CC"; then
2137 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2138else
2139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2140for as_dir in $PATH
2141do
2142 IFS=$as_save_IFS
2143 test -z "$as_dir" && as_dir=.
2144 for ac_exec_ext in '' $ac_executable_extensions; do
2145 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2146 ac_cv_prog_ac_ct_CC="$ac_prog"
2147 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
2148 break 2
2149 fi
2150done
2151done
Jack Jansendd19cf82001-12-06 22:36:17 +00002152
Martin v. Löwis11437992002-04-12 09:54:03 +00002153fi
2154fi
2155ac_ct_CC=$ac_cv_prog_ac_ct_CC
2156if test -n "$ac_ct_CC"; then
2157 echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2158echo "${ECHO_T}$ac_ct_CC" >&6
2159else
2160 echo "$as_me:$LINENO: result: no" >&5
2161echo "${ECHO_T}no" >&6
2162fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002163
Martin v. Löwis11437992002-04-12 09:54:03 +00002164 test -n "$ac_ct_CC" && break
2165done
Michael W. Hudson54241132001-12-07 15:38:26 +00002166
Martin v. Löwis11437992002-04-12 09:54:03 +00002167 CC=$ac_ct_CC
2168fi
2169
2170fi
2171
2172
Skip Montanaro6dead952003-09-25 14:50:04 +00002173test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
2174See \`config.log' for more details." >&5
2175echo "$as_me: error: no acceptable C compiler found in \$PATH
2176See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002177 { (exit 1); exit 1; }; }
2178
2179# Provide some information about the compiler.
2180echo "$as_me:$LINENO:" \
2181 "checking for C compiler version" >&5
2182ac_compiler=`set X $ac_compile; echo $2`
2183{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
2184 (eval $ac_compiler --version </dev/null >&5) 2>&5
2185 ac_status=$?
2186 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2187 (exit $ac_status); }
2188{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
2189 (eval $ac_compiler -v </dev/null >&5) 2>&5
2190 ac_status=$?
2191 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2192 (exit $ac_status); }
2193{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
2194 (eval $ac_compiler -V </dev/null >&5) 2>&5
2195 ac_status=$?
2196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2197 (exit $ac_status); }
2198
2199cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002200#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002201/* confdefs.h. */
2202_ACEOF
2203cat confdefs.h >>conftest.$ac_ext
2204cat >>conftest.$ac_ext <<_ACEOF
2205/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002206
Martin v. Löwis11437992002-04-12 09:54:03 +00002207int
2208main ()
2209{
2210
2211 ;
2212 return 0;
2213}
2214_ACEOF
2215ac_clean_files_save=$ac_clean_files
Skip Montanaro6dead952003-09-25 14:50:04 +00002216ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002217# Try to create an executable without -o first, disregard a.out.
2218# It will help us diagnose broken compilers, and finding out an intuition
2219# of exeext.
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002220echo "$as_me:$LINENO: checking for C compiler default output" >&5
2221echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002222ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2223if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
2224 (eval $ac_link_default) 2>&5
2225 ac_status=$?
2226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2227 (exit $ac_status); }; then
2228 # Find the output, starting from the most likely. This scheme is
2229# not robust to junk in `.', hence go to wildcards (a.*) only as a last
2230# resort.
2231
2232# Be careful to initialize this variable, since it used to be cached.
2233# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
2234ac_cv_exeext=
Skip Montanaro6dead952003-09-25 14:50:04 +00002235# b.out is created by i960 compilers.
2236for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
2237do
2238 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002239 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002240 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002241 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002242 conftest.$ac_ext )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002243 # This is the source file.
2244 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002245 [ab].out )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002246 # We found the default executable, but exeext='' is most
2247 # certainly right.
2248 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002249 *.* )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002250 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2251 # FIXME: I believe we export ac_cv_exeext for Libtool,
2252 # but it would be cool to find out if it's true. Does anybody
2253 # maintain Libtool? --akim.
2254 export ac_cv_exeext
2255 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002256 * )
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002257 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002258 esac
2259done
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002260else
Martin v. Löwis11437992002-04-12 09:54:03 +00002261 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002262sed 's/^/| /' conftest.$ac_ext >&5
2263
2264{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
2265See \`config.log' for more details." >&5
2266echo "$as_me: error: C compiler cannot create executables
2267See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002268 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002269fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002270
Martin v. Löwis11437992002-04-12 09:54:03 +00002271ac_exeext=$ac_cv_exeext
2272echo "$as_me:$LINENO: result: $ac_file" >&5
2273echo "${ECHO_T}$ac_file" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002274
Martin v. Löwis11437992002-04-12 09:54:03 +00002275# Check the compiler produces executables we can run. If not, either
2276# the compiler is broken, or we cross compile.
2277echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2278echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2279# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2280# If not cross compiling, check that we can run a simple program.
2281if test "$cross_compiling" != yes; then
2282 if { ac_try='./$ac_file'
2283 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2284 (eval $ac_try) 2>&5
2285 ac_status=$?
2286 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2287 (exit $ac_status); }; }; then
2288 cross_compiling=no
2289 else
2290 if test "$cross_compiling" = maybe; then
2291 cross_compiling=yes
2292 else
2293 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002294If you meant to cross compile, use \`--host'.
2295See \`config.log' for more details." >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002296echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002297If you meant to cross compile, use \`--host'.
2298See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002299 { (exit 1); exit 1; }; }
2300 fi
2301 fi
2302fi
2303echo "$as_me:$LINENO: result: yes" >&5
2304echo "${ECHO_T}yes" >&6
2305
Skip Montanaro6dead952003-09-25 14:50:04 +00002306rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002307ac_clean_files=$ac_clean_files_save
2308# Check the compiler produces executables we can run. If not, either
2309# the compiler is broken, or we cross compile.
2310echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2311echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2312echo "$as_me:$LINENO: result: $cross_compiling" >&5
2313echo "${ECHO_T}$cross_compiling" >&6
2314
2315echo "$as_me:$LINENO: checking for suffix of executables" >&5
2316echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
2317if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
2318 (eval $ac_link) 2>&5
2319 ac_status=$?
2320 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2321 (exit $ac_status); }; then
2322 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2323# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2324# work properly (i.e., refer to `conftest.exe'), while it won't with
2325# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002326for ac_file in conftest.exe conftest conftest.*; do
2327 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002328 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002329 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002330 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002331 export ac_cv_exeext
2332 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002333 * ) break;;
2334 esac
2335done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002336else
Skip Montanaro6dead952003-09-25 14:50:04 +00002337 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
2338See \`config.log' for more details." >&5
2339echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
2340See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002341 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002342fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002343
Martin v. Löwis11437992002-04-12 09:54:03 +00002344rm -f conftest$ac_cv_exeext
2345echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2346echo "${ECHO_T}$ac_cv_exeext" >&6
2347
2348rm -f conftest.$ac_ext
2349EXEEXT=$ac_cv_exeext
2350ac_exeext=$EXEEXT
2351echo "$as_me:$LINENO: checking for suffix of object files" >&5
2352echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
2353if test "${ac_cv_objext+set}" = set; then
2354 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002355else
Martin v. Löwis11437992002-04-12 09:54:03 +00002356 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002357#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002358/* confdefs.h. */
2359_ACEOF
2360cat confdefs.h >>conftest.$ac_ext
2361cat >>conftest.$ac_ext <<_ACEOF
2362/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002363
Martin v. Löwis11437992002-04-12 09:54:03 +00002364int
2365main ()
2366{
2367
2368 ;
2369 return 0;
2370}
2371_ACEOF
2372rm -f conftest.o conftest.obj
2373if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
2374 (eval $ac_compile) 2>&5
2375 ac_status=$?
2376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2377 (exit $ac_status); }; then
2378 for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2379 case $ac_file in
Skip Montanaro6dead952003-09-25 14:50:04 +00002380 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002381 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2382 break;;
2383 esac
2384done
2385else
2386 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002387sed 's/^/| /' conftest.$ac_ext >&5
2388
2389{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
2390See \`config.log' for more details." >&5
2391echo "$as_me: error: cannot compute suffix of object files: cannot compile
2392See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002393 { (exit 1); exit 1; }; }
2394fi
2395
2396rm -f conftest.$ac_cv_objext conftest.$ac_ext
2397fi
2398echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2399echo "${ECHO_T}$ac_cv_objext" >&6
2400OBJEXT=$ac_cv_objext
2401ac_objext=$OBJEXT
2402echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2403echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2404if test "${ac_cv_c_compiler_gnu+set}" = set; then
2405 echo $ECHO_N "(cached) $ECHO_C" >&6
2406else
2407 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002408#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002409/* confdefs.h. */
2410_ACEOF
2411cat confdefs.h >>conftest.$ac_ext
2412cat >>conftest.$ac_ext <<_ACEOF
2413/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002414
Martin v. Löwis11437992002-04-12 09:54:03 +00002415int
2416main ()
2417{
2418#ifndef __GNUC__
2419 choke me
2420#endif
2421
2422 ;
2423 return 0;
2424}
2425_ACEOF
2426rm -f conftest.$ac_objext
2427if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002428 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002429 ac_status=$?
2430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2431 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002432 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002433 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2434 (eval $ac_try) 2>&5
2435 ac_status=$?
2436 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2437 (exit $ac_status); }; }; then
2438 ac_compiler_gnu=yes
2439else
2440 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002441sed 's/^/| /' conftest.$ac_ext >&5
2442
Martin v. Löwis11437992002-04-12 09:54:03 +00002443ac_compiler_gnu=no
2444fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002445rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002446ac_cv_c_compiler_gnu=$ac_compiler_gnu
2447
2448fi
2449echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
2450echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2451GCC=`test $ac_compiler_gnu = yes && echo yes`
2452ac_test_CFLAGS=${CFLAGS+set}
2453ac_save_CFLAGS=$CFLAGS
2454CFLAGS="-g"
2455echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
2456echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2457if test "${ac_cv_prog_cc_g+set}" = set; then
2458 echo $ECHO_N "(cached) $ECHO_C" >&6
2459else
2460 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002461#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002462/* confdefs.h. */
2463_ACEOF
2464cat confdefs.h >>conftest.$ac_ext
2465cat >>conftest.$ac_ext <<_ACEOF
2466/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002467
Martin v. Löwis11437992002-04-12 09:54:03 +00002468int
2469main ()
2470{
2471
2472 ;
2473 return 0;
2474}
2475_ACEOF
2476rm -f conftest.$ac_objext
2477if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002478 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002479 ac_status=$?
2480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2481 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002482 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002483 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2484 (eval $ac_try) 2>&5
2485 ac_status=$?
2486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2487 (exit $ac_status); }; }; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002488 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002489else
Martin v. Löwis11437992002-04-12 09:54:03 +00002490 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002491sed 's/^/| /' conftest.$ac_ext >&5
2492
Martin v. Löwis11437992002-04-12 09:54:03 +00002493ac_cv_prog_cc_g=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00002494fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002495rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002496fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002497echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
2498echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002499if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002500 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002501elif test $ac_cv_prog_cc_g = yes; then
2502 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00002503 CFLAGS="-g -O2"
2504 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002505 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002506 fi
2507else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002508 if test "$GCC" = yes; then
2509 CFLAGS="-O2"
2510 else
2511 CFLAGS=
2512 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002513fi
Skip Montanaro6dead952003-09-25 14:50:04 +00002514echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
2515echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2516if test "${ac_cv_prog_cc_stdc+set}" = set; then
2517 echo $ECHO_N "(cached) $ECHO_C" >&6
2518else
2519 ac_cv_prog_cc_stdc=no
2520ac_save_CC=$CC
2521cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002522#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002523/* confdefs.h. */
2524_ACEOF
2525cat confdefs.h >>conftest.$ac_ext
2526cat >>conftest.$ac_ext <<_ACEOF
2527/* end confdefs.h. */
2528#include <stdarg.h>
2529#include <stdio.h>
2530#include <sys/types.h>
2531#include <sys/stat.h>
2532/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2533struct buf { int x; };
2534FILE * (*rcsopen) (struct buf *, struct stat *, int);
2535static char *e (p, i)
2536 char **p;
2537 int i;
2538{
2539 return p[i];
2540}
2541static char *f (char * (*g) (char **, int), char **p, ...)
2542{
2543 char *s;
2544 va_list v;
2545 va_start (v,p);
2546 s = g (p, va_arg (v,int));
2547 va_end (v);
2548 return s;
2549}
2550int test (int i, double x);
2551struct s1 {int (*f) (int a);};
2552struct s2 {int (*f) (double a);};
2553int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2554int argc;
2555char **argv;
2556int
2557main ()
2558{
2559return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2560 ;
2561 return 0;
2562}
2563_ACEOF
2564# Don't try gcc -ansi; that turns off useful extensions and
2565# breaks some systems' header files.
2566# AIX -qlanglvl=ansi
2567# Ultrix and OSF/1 -std1
2568# HP-UX 10.20 and later -Ae
2569# HP-UX older versions -Aa -D_HPUX_SOURCE
2570# SVR4 -Xc -D__EXTENSIONS__
2571for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2572do
2573 CC="$ac_save_CC $ac_arg"
2574 rm -f conftest.$ac_objext
2575if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002576 (eval $ac_compile) 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002577 ac_status=$?
2578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2579 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002580 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00002581 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2582 (eval $ac_try) 2>&5
2583 ac_status=$?
2584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2585 (exit $ac_status); }; }; then
2586 ac_cv_prog_cc_stdc=$ac_arg
2587break
2588else
2589 echo "$as_me: failed program was:" >&5
2590sed 's/^/| /' conftest.$ac_ext >&5
2591
2592fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002593rm -f conftest.$ac_objext
Skip Montanaro6dead952003-09-25 14:50:04 +00002594done
2595rm -f conftest.$ac_ext conftest.$ac_objext
2596CC=$ac_save_CC
2597
2598fi
2599
2600case "x$ac_cv_prog_cc_stdc" in
2601 x|xno)
2602 echo "$as_me:$LINENO: result: none needed" >&5
2603echo "${ECHO_T}none needed" >&6 ;;
2604 *)
2605 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
2606echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2607 CC="$CC $ac_cv_prog_cc_stdc" ;;
2608esac
2609
Martin v. Löwis11437992002-04-12 09:54:03 +00002610# Some people use a C++ compiler to compile C. Since we use `exit',
2611# in C++ we need to declare it. In case someone uses the same compiler
2612# for both compiling C and C++ we need to have the C++ compiler decide
2613# the declaration of exit, since it's the most demanding environment.
2614cat >conftest.$ac_ext <<_ACEOF
2615#ifndef __cplusplus
2616 choke me
2617#endif
2618_ACEOF
2619rm -f conftest.$ac_objext
2620if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002621 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002622 ac_status=$?
2623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2624 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002625 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2627 (eval $ac_try) 2>&5
2628 ac_status=$?
2629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2630 (exit $ac_status); }; }; then
2631 for ac_declaration in \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002632 ''\
2633 '#include <stdlib.h>' \
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 'extern "C" void std::exit (int) throw (); using std::exit;' \
2635 'extern "C" void std::exit (int); using std::exit;' \
2636 'extern "C" void exit (int) throw ();' \
2637 'extern "C" void exit (int);' \
2638 'void exit (int);'
2639do
2640 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002641#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002642/* confdefs.h. */
2643_ACEOF
2644cat confdefs.h >>conftest.$ac_ext
2645cat >>conftest.$ac_ext <<_ACEOF
2646/* end confdefs.h. */
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00002647#include <stdlib.h>
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002648$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002649int
2650main ()
2651{
2652exit (42);
2653 ;
2654 return 0;
2655}
2656_ACEOF
2657rm -f conftest.$ac_objext
2658if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002659 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002660 ac_status=$?
2661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2662 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002663 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2665 (eval $ac_try) 2>&5
2666 ac_status=$?
2667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2668 (exit $ac_status); }; }; then
2669 :
2670else
2671 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002672sed 's/^/| /' conftest.$ac_ext >&5
2673
Martin v. Löwis11437992002-04-12 09:54:03 +00002674continue
2675fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002676rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002678#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002679/* confdefs.h. */
2680_ACEOF
2681cat confdefs.h >>conftest.$ac_ext
2682cat >>conftest.$ac_ext <<_ACEOF
2683/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002684$ac_declaration
Martin v. Löwis11437992002-04-12 09:54:03 +00002685int
2686main ()
2687{
2688exit (42);
2689 ;
2690 return 0;
2691}
2692_ACEOF
2693rm -f conftest.$ac_objext
2694if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002695 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 ac_status=$?
2697 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2698 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002699 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
2701 (eval $ac_try) 2>&5
2702 ac_status=$?
2703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2704 (exit $ac_status); }; }; then
2705 break
2706else
2707 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002708sed 's/^/| /' conftest.$ac_ext >&5
2709
Martin v. Löwis11437992002-04-12 09:54:03 +00002710fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002711rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002712done
2713rm -f conftest*
2714if test -n "$ac_declaration"; then
2715 echo '#ifdef __cplusplus' >>confdefs.h
2716 echo $ac_declaration >>confdefs.h
2717 echo '#endif' >>confdefs.h
2718fi
2719
2720else
2721 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002722sed 's/^/| /' conftest.$ac_ext >&5
2723
Martin v. Löwis11437992002-04-12 09:54:03 +00002724fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002725rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002726ac_ext=c
2727ac_cpp='$CPP $CPPFLAGS'
2728ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2729ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2730ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002731
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002732
2733# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00002734
2735ac_ext=c
2736ac_cpp='$CPP $CPPFLAGS'
2737ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2738ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2739ac_compiler_gnu=$ac_cv_c_compiler_gnu
2740echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
2741echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002742# On Suns, sometimes $CPP names a directory.
2743if test -n "$CPP" && test -d "$CPP"; then
2744 CPP=
2745fi
2746if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002747 if test "${ac_cv_prog_CPP+set}" = set; then
2748 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002749else
Martin v. Löwis11437992002-04-12 09:54:03 +00002750 # Double quotes because CPP needs to be expanded
2751 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2752 do
2753 ac_preproc_ok=false
2754for ac_c_preproc_warn_flag in '' yes
2755do
2756 # Use a header file that comes with gcc, so configuring glibc
2757 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002758 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2759 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002760 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00002761 # not just through cpp. "Syntax error" is here to catch this case.
2762 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002763#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002764/* confdefs.h. */
2765_ACEOF
2766cat confdefs.h >>conftest.$ac_ext
2767cat >>conftest.$ac_ext <<_ACEOF
2768/* end confdefs.h. */
2769#ifdef __STDC__
2770# include <limits.h>
2771#else
2772# include <assert.h>
2773#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002774 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00002775_ACEOF
2776if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2777 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2778 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002779 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002780 rm -f conftest.er1
2781 cat conftest.err >&5
2782 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2783 (exit $ac_status); } >/dev/null; then
2784 if test -s conftest.err; then
2785 ac_cpp_err=$ac_c_preproc_warn_flag
2786 else
2787 ac_cpp_err=
2788 fi
2789else
2790 ac_cpp_err=yes
2791fi
2792if test -z "$ac_cpp_err"; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002793 :
2794else
Martin v. Löwis11437992002-04-12 09:54:03 +00002795 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002796sed 's/^/| /' conftest.$ac_ext >&5
2797
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 # Broken: fails on valid input.
2799continue
Jack Jansendd19cf82001-12-06 22:36:17 +00002800fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002801rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00002802
Martin v. Löwis11437992002-04-12 09:54:03 +00002803 # OK, works on sane cases. Now check whether non-existent headers
2804 # can be detected and how.
2805 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002806#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002807/* confdefs.h. */
2808_ACEOF
2809cat confdefs.h >>conftest.$ac_ext
2810cat >>conftest.$ac_ext <<_ACEOF
2811/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002812#include <ac_nonexistent.h>
2813_ACEOF
2814if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2815 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2816 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002817 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002818 rm -f conftest.er1
2819 cat conftest.err >&5
2820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2821 (exit $ac_status); } >/dev/null; then
2822 if test -s conftest.err; then
2823 ac_cpp_err=$ac_c_preproc_warn_flag
2824 else
2825 ac_cpp_err=
2826 fi
2827else
2828 ac_cpp_err=yes
2829fi
2830if test -z "$ac_cpp_err"; then
2831 # Broken: success on invalid input.
2832continue
2833else
2834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002835sed 's/^/| /' conftest.$ac_ext >&5
2836
Martin v. Löwis11437992002-04-12 09:54:03 +00002837 # Passes both tests.
2838ac_preproc_ok=:
2839break
2840fi
2841rm -f conftest.err conftest.$ac_ext
2842
2843done
2844# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2845rm -f conftest.err conftest.$ac_ext
2846if $ac_preproc_ok; then
2847 break
2848fi
2849
2850 done
2851 ac_cv_prog_CPP=$CPP
2852
2853fi
2854 CPP=$ac_cv_prog_CPP
2855else
2856 ac_cv_prog_CPP=$CPP
2857fi
2858echo "$as_me:$LINENO: result: $CPP" >&5
2859echo "${ECHO_T}$CPP" >&6
2860ac_preproc_ok=false
2861for ac_c_preproc_warn_flag in '' yes
2862do
2863 # Use a header file that comes with gcc, so configuring glibc
2864 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00002865 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2866 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00002867 # On the NeXT, cc -E runs the code through the compiler's parser,
2868 # not just through cpp. "Syntax error" is here to catch this case.
2869 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002870#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002871/* confdefs.h. */
2872_ACEOF
2873cat confdefs.h >>conftest.$ac_ext
2874cat >>conftest.$ac_ext <<_ACEOF
2875/* end confdefs.h. */
2876#ifdef __STDC__
2877# include <limits.h>
2878#else
2879# include <assert.h>
2880#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002881 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00002882_ACEOF
2883if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2884 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2885 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002886 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002887 rm -f conftest.er1
2888 cat conftest.err >&5
2889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2890 (exit $ac_status); } >/dev/null; then
2891 if test -s conftest.err; then
2892 ac_cpp_err=$ac_c_preproc_warn_flag
2893 else
2894 ac_cpp_err=
2895 fi
2896else
2897 ac_cpp_err=yes
2898fi
2899if test -z "$ac_cpp_err"; then
2900 :
2901else
2902 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002903sed 's/^/| /' conftest.$ac_ext >&5
2904
Martin v. Löwis11437992002-04-12 09:54:03 +00002905 # Broken: fails on valid input.
2906continue
2907fi
2908rm -f conftest.err conftest.$ac_ext
2909
2910 # OK, works on sane cases. Now check whether non-existent headers
2911 # can be detected and how.
2912 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002913#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002914/* confdefs.h. */
2915_ACEOF
2916cat confdefs.h >>conftest.$ac_ext
2917cat >>conftest.$ac_ext <<_ACEOF
2918/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002919#include <ac_nonexistent.h>
2920_ACEOF
2921if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
2922 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2923 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00002924 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00002925 rm -f conftest.er1
2926 cat conftest.err >&5
2927 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2928 (exit $ac_status); } >/dev/null; then
2929 if test -s conftest.err; then
2930 ac_cpp_err=$ac_c_preproc_warn_flag
2931 else
2932 ac_cpp_err=
2933 fi
2934else
2935 ac_cpp_err=yes
2936fi
2937if test -z "$ac_cpp_err"; then
2938 # Broken: success on invalid input.
2939continue
2940else
2941 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002942sed 's/^/| /' conftest.$ac_ext >&5
2943
Martin v. Löwis11437992002-04-12 09:54:03 +00002944 # Passes both tests.
2945ac_preproc_ok=:
2946break
2947fi
2948rm -f conftest.err conftest.$ac_ext
2949
2950done
2951# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2952rm -f conftest.err conftest.$ac_ext
2953if $ac_preproc_ok; then
2954 :
2955else
Skip Montanaro6dead952003-09-25 14:50:04 +00002956 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
2957See \`config.log' for more details." >&5
2958echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
2959See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002960 { (exit 1); exit 1; }; }
2961fi
2962
2963ac_ext=c
2964ac_cpp='$CPP $CPPFLAGS'
2965ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2966ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2967ac_compiler_gnu=$ac_cv_c_compiler_gnu
2968
2969
Skip Montanaro6dead952003-09-25 14:50:04 +00002970echo "$as_me:$LINENO: checking for egrep" >&5
2971echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2972if test "${ac_cv_prog_egrep+set}" = set; then
2973 echo $ECHO_N "(cached) $ECHO_C" >&6
2974else
2975 if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2976 then ac_cv_prog_egrep='grep -E'
2977 else ac_cv_prog_egrep='egrep'
2978 fi
2979fi
2980echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
2981echo "${ECHO_T}$ac_cv_prog_egrep" >&6
2982 EGREP=$ac_cv_prog_egrep
2983
2984
Martin v. Löwis11437992002-04-12 09:54:03 +00002985
2986echo "$as_me:$LINENO: checking for AIX" >&5
2987echo $ECHO_N "checking for AIX... $ECHO_C" >&6
2988cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00002989#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00002990/* confdefs.h. */
2991_ACEOF
2992cat confdefs.h >>conftest.$ac_ext
2993cat >>conftest.$ac_ext <<_ACEOF
2994/* end confdefs.h. */
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00002995#ifdef _AIX
2996 yes
2997#endif
2998
Martin v. Löwis11437992002-04-12 09:54:03 +00002999_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003000if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003001 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003002 echo "$as_me:$LINENO: result: yes" >&5
3003echo "${ECHO_T}yes" >&6
3004cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003005#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003006_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003007
3008else
Martin v. Löwis11437992002-04-12 09:54:03 +00003009 echo "$as_me:$LINENO: result: no" >&5
3010echo "${ECHO_T}no" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003011fi
3012rm -f conftest*
3013
Michael W. Hudson54241132001-12-07 15:38:26 +00003014
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003015
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003016# Check for unsupported systems
3017case $ac_sys_system/$ac_sys_release in
Martin v. Löwis12af0482004-01-31 12:34:17 +00003018Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00003019 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3020 echo See README for details.
3021 exit 1;;
3022esac
3023
Michael W. Hudson54241132001-12-07 15:38:26 +00003024
Martin v. Löwis11437992002-04-12 09:54:03 +00003025echo "$as_me:$LINENO: checking for --with-suffix" >&5
3026echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003027
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003028# Check whether --with-suffix or --without-suffix was given.
3029if test "${with_suffix+set}" = set; then
3030 withval="$with_suffix"
Martin v. Löwis11437992002-04-12 09:54:03 +00003031
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00003032 case $withval in
3033 no) EXEEXT=;;
3034 yes) EXEEXT=.exe;;
3035 *) EXEEXT=$withval;;
3036 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00003037fi;
3038echo "$as_me:$LINENO: result: $EXEEXT" >&5
3039echo "${ECHO_T}$EXEEXT" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003040
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003041# Test whether we're running on a non-case-sensitive system, in which
3042# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00003043
Martin v. Löwis11437992002-04-12 09:54:03 +00003044echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3045echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6
Jack Jansen3c2c4332002-11-06 13:33:32 +00003046if test ! -d CaseSensitiveTestDir; then
3047mkdir CaseSensitiveTestDir
3048fi
3049
3050if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003051then
Martin v. Löwis11437992002-04-12 09:54:03 +00003052 echo "$as_me:$LINENO: result: yes" >&5
3053echo "${ECHO_T}yes" >&6
Jack Jansen1999ef42001-12-06 21:47:20 +00003054 BUILDEXEEXT=.exe
3055else
Martin v. Löwis11437992002-04-12 09:54:03 +00003056 echo "$as_me:$LINENO: result: no" >&5
3057echo "${ECHO_T}no" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00003058 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00003059fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00003060rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00003061
Guido van Rossumdd997f71998-10-07 19:58:26 +00003062case $MACHDEP in
3063bsdos*)
3064 case $CC in
3065 gcc) CC="$CC -D_HAVE_BSDI";;
3066 esac;;
3067esac
3068
Guido van Rossum24b1e751997-08-21 02:29:16 +00003069case $ac_sys_system in
3070hp*|HP*)
3071 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00003072 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003073 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00003074Monterey*)
3075 case $CC in
3076 cc) CC="$CC -Wl,-Bexport";;
3077 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003078SunOS*)
3079 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00003080
3081cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003082#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003083_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00003084
3085 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00003086esac
3087
Michael W. Hudson54241132001-12-07 15:38:26 +00003088
3089
Martin v. Löwis11437992002-04-12 09:54:03 +00003090echo "$as_me:$LINENO: checking LIBRARY" >&5
3091echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003092if test -z "$LIBRARY"
3093then
3094 LIBRARY='libpython$(VERSION).a'
3095fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003096echo "$as_me:$LINENO: result: $LIBRARY" >&5
3097echo "${ECHO_T}$LIBRARY" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003098
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003099# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00003100# name of the library into which to insert object files). BLDLIBRARY is also
3101# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
3102# is blank as the main program is not linked directly against LDLIBRARY.
3103# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
3104# systems without shared libraries, LDLIBRARY is the same as LIBRARY
3105# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
3106# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00003107#
Martin v. Löwis1142de32002-03-29 16:28:31 +00003108# RUNSHARED is used to run shared python without installed libraries
3109#
3110# INSTSONAME is the name of the shared library that will be use to install
3111# on the system - some systems like version suffix, others don't
3112
3113
Michael W. Hudson54241132001-12-07 15:38:26 +00003114
3115
3116
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003117
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00003118LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00003119BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00003120INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00003121DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00003122LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00003123RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003124
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003125# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003126# If CXX is set, and if it is needed to link a main function that was
3127# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
3128# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00003129# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003130# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003131
Martin v. Löwis11437992002-04-12 09:54:03 +00003132echo "$as_me:$LINENO: checking LINKCC" >&5
3133echo $ECHO_N "checking LINKCC... $ECHO_C" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003134if test -z "$LINKCC"
3135then
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003136 if test -z "$CXX"; then
3137 LINKCC="\$(PURIFY) \$(CC)"
3138 else
Martin v. Löwis1931ca72002-06-01 21:39:58 +00003139 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00003140 $CXX -c conftest.$ac_ext 2>&5
3141 if $CC -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
3142 && test -s conftest$ac_exeext && ./conftest$ac_exeext
3143 then
3144 LINKCC="\$(PURIFY) \$(CC)"
3145 else
3146 LINKCC="\$(PURIFY) \$(CXX)"
3147 fi
3148 rm -fr conftest*
3149 fi
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003150 case $ac_sys_system in
3151 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00003152 exp_extra="\"\""
3153 if test $ac_sys_release -ge 5 -o \
3154 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
3155 exp_extra="."
3156 fi
3157 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00003158 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00003159 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003160 esac
3161fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003162echo "$as_me:$LINENO: result: $LINKCC" >&5
3163echo "${ECHO_T}$LINKCC" >&6
Guido van Rossum76c5fe21997-08-14 19:45:07 +00003164
Martin v. Löwis11437992002-04-12 09:54:03 +00003165echo "$as_me:$LINENO: checking for --enable-shared" >&5
3166echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003167# Check whether --enable-shared or --disable-shared was given.
3168if test "${enable_shared+set}" = set; then
3169 enableval="$enable_shared"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003170
Martin v. Löwis11437992002-04-12 09:54:03 +00003171fi;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003172
3173if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00003174then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003175 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003176 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00003177 enable_shared="yes";;
3178 *)
3179 enable_shared="no";;
3180 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003181fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003182echo "$as_me:$LINENO: result: $enable_shared" >&5
3183echo "${ECHO_T}$enable_shared" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +00003184
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003185echo "$as_me:$LINENO: checking for --enable-profiling" >&5
3186echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6
3187# Check whether --enable-profiling or --disable-profiling was given.
3188if test "${enable_profiling+set}" = set; then
3189 enableval="$enable_profiling"
3190 ac_save_cc="$CC"
3191 CC="$CC -pg"
3192 if test "$cross_compiling" = yes; then
3193 ac_enable_profiling="no"
3194else
3195 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003196#line $LINENO "configure"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003197/* confdefs.h. */
3198_ACEOF
3199cat confdefs.h >>conftest.$ac_ext
3200cat >>conftest.$ac_ext <<_ACEOF
3201/* end confdefs.h. */
3202int main() { return 0; }
3203_ACEOF
3204rm -f conftest$ac_exeext
3205if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3206 (eval $ac_link) 2>&5
3207 ac_status=$?
3208 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3209 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3210 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3211 (eval $ac_try) 2>&5
3212 ac_status=$?
3213 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3214 (exit $ac_status); }; }; then
3215 ac_enable_profiling="yes"
3216else
3217 echo "$as_me: program exited with status $ac_status" >&5
3218echo "$as_me: failed program was:" >&5
3219sed 's/^/| /' conftest.$ac_ext >&5
3220
3221( exit $ac_status )
3222ac_enable_profiling="no"
3223fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003224rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00003225fi
3226 CC="$ac_save_cc"
3227fi;
3228echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
3229echo "${ECHO_T}$ac_enable_profiling" >&6
3230
3231case "$ac_enable_profiling" in
3232 "yes")
3233 BASECFLAGS="-pg $BASECFLAGS"
3234 LDFLAGS="-pg $LDFLAGS"
3235 ;;
3236esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003237
Martin v. Löwis11437992002-04-12 09:54:03 +00003238echo "$as_me:$LINENO: checking LDLIBRARY" >&5
3239echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00003240
Guido van Rossumb8552162001-09-05 14:58:11 +00003241# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
3242# library that we build, but we do not want to link against it (we
3243# will find it with a -framework option). For this reason there is an
3244# extra variable BLDLIBRARY against which Python and the extension
3245# modules are linked, BLDLIBRARY. This is normally the same as
3246# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00003247if test "$enable_framework"
3248then
3249 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00003250 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00003251 BLDLIBRARY=''
3252else
3253 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00003254fi
Jack Jansene578a632001-08-15 01:27:14 +00003255
Martin v. Löwis1142de32002-03-29 16:28:31 +00003256# Other platforms follow
3257if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00003258
3259cat >>confdefs.h <<\_ACEOF
3260#define Py_ENABLE_SHARED 1
3261_ACEOF
3262
Martin v. Löwis1142de32002-03-29 16:28:31 +00003263 case $ac_sys_system in
3264 BeOS*)
3265 LDLIBRARY='libpython$(VERSION).so'
3266 ;;
3267 CYGWIN*)
3268 LDLIBRARY='libpython$(VERSION).dll.a'
3269 DLLLIBRARY='libpython$(VERSION).dll'
3270 ;;
3271 SunOS*)
3272 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00003273 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003274 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00003275 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00003276 ;;
Martin v. Löwis96ce8052003-05-31 07:58:45 +00003277 Linux*|GNU*|NetBSD*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00003278 LDLIBRARY='libpython$(VERSION).so'
3279 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003280 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003281 INSTSONAME="$LDLIBRARY".$SOVERSION
3282 ;;
3283 hp*|HP*)
3284 LDLIBRARY='libpython$(VERSION).sl'
3285 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003286 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003287 ;;
3288 OSF*)
3289 LDLIBRARY='libpython$(VERSION).so'
3290 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00003291 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00003292 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003293 atheos*)
3294 LDLIBRARY='libpython$(VERSION).so'
3295 BLDLIBRARY='-L. -lpython$(VERSION)'
3296 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
3297 ;;
Martin v. Löwis1142de32002-03-29 16:28:31 +00003298 esac
Jason Tishler30765592003-09-04 11:04:06 +00003299else # shared is disabled
3300 case $ac_sys_system in
3301 CYGWIN*)
3302 BLDLIBRARY='$(LIBRARY)'
3303 LDLIBRARY='libpython$(VERSION).dll.a'
3304 ;;
3305 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00003306fi
3307
Martin v. Löwis11437992002-04-12 09:54:03 +00003308echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
3309echo "${ECHO_T}$LDLIBRARY" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00003310
Martin v. Löwis11437992002-04-12 09:54:03 +00003311if test -n "$ac_tool_prefix"; then
3312 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3313set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3314echo "$as_me:$LINENO: checking for $ac_word" >&5
3315echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3316if test "${ac_cv_prog_RANLIB+set}" = set; then
3317 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003318else
3319 if test -n "$RANLIB"; then
3320 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3321else
Martin v. Löwis11437992002-04-12 09:54:03 +00003322as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3323for as_dir in $PATH
3324do
3325 IFS=$as_save_IFS
3326 test -z "$as_dir" && as_dir=.
3327 for ac_exec_ext in '' $ac_executable_extensions; do
3328 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3329 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3330 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3331 break 2
3332 fi
3333done
3334done
3335
Guido van Rossum627b2d71993-12-24 10:39:16 +00003336fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003337fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003338RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003339if test -n "$RANLIB"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003340 echo "$as_me:$LINENO: result: $RANLIB" >&5
3341echo "${ECHO_T}$RANLIB" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003342else
Martin v. Löwis11437992002-04-12 09:54:03 +00003343 echo "$as_me:$LINENO: result: no" >&5
3344echo "${ECHO_T}no" >&6
3345fi
3346
3347fi
3348if test -z "$ac_cv_prog_RANLIB"; then
3349 ac_ct_RANLIB=$RANLIB
3350 # Extract the first word of "ranlib", so it can be a program name with args.
3351set dummy ranlib; ac_word=$2
3352echo "$as_me:$LINENO: checking for $ac_word" >&5
3353echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3354if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3355 echo $ECHO_N "(cached) $ECHO_C" >&6
3356else
3357 if test -n "$ac_ct_RANLIB"; then
3358 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3359else
3360as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3361for as_dir in $PATH
3362do
3363 IFS=$as_save_IFS
3364 test -z "$as_dir" && as_dir=.
3365 for ac_exec_ext in '' $ac_executable_extensions; do
3366 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3367 ac_cv_prog_ac_ct_RANLIB="ranlib"
3368 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3369 break 2
3370 fi
3371done
3372done
3373
3374 test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
3375fi
3376fi
3377ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3378if test -n "$ac_ct_RANLIB"; then
3379 echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
3380echo "${ECHO_T}$ac_ct_RANLIB" >&6
3381else
3382 echo "$as_me:$LINENO: result: no" >&5
3383echo "${ECHO_T}no" >&6
3384fi
3385
3386 RANLIB=$ac_ct_RANLIB
3387else
3388 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003389fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00003390
3391
Guido van Rossum7f43da71994-08-01 12:15:30 +00003392for ac_prog in ar aal
3393do
Martin v. Löwis11437992002-04-12 09:54:03 +00003394 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003395set dummy $ac_prog; ac_word=$2
Martin v. Löwis11437992002-04-12 09:54:03 +00003396echo "$as_me:$LINENO: checking for $ac_word" >&5
3397echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3398if test "${ac_cv_prog_AR+set}" = set; then
3399 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003400else
3401 if test -n "$AR"; then
3402 ac_cv_prog_AR="$AR" # Let the user override the test.
3403else
Martin v. Löwis11437992002-04-12 09:54:03 +00003404as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3405for as_dir in $PATH
3406do
3407 IFS=$as_save_IFS
3408 test -z "$as_dir" && as_dir=.
3409 for ac_exec_ext in '' $ac_executable_extensions; do
3410 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3411 ac_cv_prog_AR="$ac_prog"
3412 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
3413 break 2
3414 fi
3415done
3416done
3417
Guido van Rossum7f43da71994-08-01 12:15:30 +00003418fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003419fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003420AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003421if test -n "$AR"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003422 echo "$as_me:$LINENO: result: $AR" >&5
3423echo "${ECHO_T}$AR" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003424else
Martin v. Löwis11437992002-04-12 09:54:03 +00003425 echo "$as_me:$LINENO: result: no" >&5
3426echo "${ECHO_T}no" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003427fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00003428
Martin v. Löwis11437992002-04-12 09:54:03 +00003429 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00003430done
3431test -n "$AR" || AR="ar"
3432
Michael W. Hudson54241132001-12-07 15:38:26 +00003433
Neil Schemenauera42c8272001-03-31 00:01:55 +00003434case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00003435bsdos*|hp*|HP*)
3436 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00003437 if test -z "$INSTALL"
3438 then
3439 INSTALL="${srcdir}/install-sh -c"
3440 fi
3441esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003442ac_aux_dir=
3443for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
3444 if test -f $ac_dir/install-sh; then
3445 ac_aux_dir=$ac_dir
3446 ac_install_sh="$ac_aux_dir/install-sh -c"
3447 break
3448 elif test -f $ac_dir/install.sh; then
3449 ac_aux_dir=$ac_dir
3450 ac_install_sh="$ac_aux_dir/install.sh -c"
3451 break
Martin v. Löwis11437992002-04-12 09:54:03 +00003452 elif test -f $ac_dir/shtool; then
3453 ac_aux_dir=$ac_dir
3454 ac_install_sh="$ac_aux_dir/shtool install -c"
3455 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003456 fi
3457done
3458if test -z "$ac_aux_dir"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003459 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
3460echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
3461 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003462fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003463ac_config_guess="$SHELL $ac_aux_dir/config.guess"
3464ac_config_sub="$SHELL $ac_aux_dir/config.sub"
3465ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003466
3467# Find a good install program. We prefer a C program (faster),
3468# so one script is as good as another. But avoid the broken or
3469# incompatible versions:
3470# SysV /etc/install, /usr/sbin/install
3471# SunOS /usr/etc/install
3472# IRIX /sbin/install
3473# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00003474# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003475# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3476# AFS /usr/afsws/bin/install, which mishandles nonexistent args
3477# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3478# ./install, which can be erroneously created by make from ./install.sh.
Martin v. Löwis11437992002-04-12 09:54:03 +00003479echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
3480echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003481if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003482if test "${ac_cv_path_install+set}" = set; then
3483 echo $ECHO_N "(cached) $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003484else
Martin v. Löwis11437992002-04-12 09:54:03 +00003485 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3486for as_dir in $PATH
3487do
3488 IFS=$as_save_IFS
3489 test -z "$as_dir" && as_dir=.
3490 # Account for people who put trailing slashes in PATH elements.
3491case $as_dir/ in
3492 ./ | .// | /cC/* | \
3493 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3494 /usr/ucb/* ) ;;
3495 *)
3496 # OSF1 and SCO ODT 3.0 have their own names for install.
3497 # Don't use installbsd from OSF since it installs stuff as root
3498 # by default.
3499 for ac_prog in ginstall scoinst install; do
3500 for ac_exec_ext in '' $ac_executable_extensions; do
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003501 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3502 if test $ac_prog = install &&
3503 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3504 # AIX install. It has an incompatible calling convention.
3505 :
3506 elif test $ac_prog = install &&
3507 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3508 # program-specific install script used by HP pwplus--don't use.
3509 :
3510 else
3511 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3512 break 3
3513 fi
3514 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003515 done
Martin v. Löwis11437992002-04-12 09:54:03 +00003516 done
3517 ;;
3518esac
3519done
3520
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003521
3522fi
3523 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003524 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003525 else
3526 # As a last resort, use the slow shell script. We don't cache a
3527 # path for INSTALL within a source directory, because that will
3528 # break other packages using the cache if that directory is
3529 # removed, or if the path is relative.
Martin v. Löwis11437992002-04-12 09:54:03 +00003530 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003531 fi
3532fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003533echo "$as_me:$LINENO: result: $INSTALL" >&5
3534echo "${ECHO_T}$INSTALL" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003535
3536# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3537# It thinks the first close brace ends the variable substitution.
3538test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3539
Martin v. Löwis11437992002-04-12 09:54:03 +00003540test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003541
3542test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3543
Michael W. Hudson54241132001-12-07 15:38:26 +00003544
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003545# Not every filesystem supports hard links
3546
3547if test -z "$LN" ; then
3548 case $ac_sys_system in
3549 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00003550 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00003551 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00003552 *) LN=ln;;
3553 esac
3554fi
3555
Fred Drake109d9862001-07-11 06:27:56 +00003556# Check for --with-pydebug
Martin v. Löwis11437992002-04-12 09:54:03 +00003557echo "$as_me:$LINENO: checking for --with-pydebug" >&5
3558echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6
3559
Fred Drake109d9862001-07-11 06:27:56 +00003560# Check whether --with-pydebug or --without-pydebug was given.
3561if test "${with_pydebug+set}" = set; then
3562 withval="$with_pydebug"
Martin v. Löwis11437992002-04-12 09:54:03 +00003563
Fred Drake109d9862001-07-11 06:27:56 +00003564if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00003565then
3566
3567cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00003568#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00003569_ACEOF
3570
3571 echo "$as_me:$LINENO: result: yes" >&5
3572echo "${ECHO_T}yes" >&6;
Martin v. Löwisc45929e2002-04-06 10:10:49 +00003573 Py_DEBUG='true'
Martin v. Löwis11437992002-04-12 09:54:03 +00003574else echo "$as_me:$LINENO: result: no" >&5
3575echo "${ECHO_T}no" >&6; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00003576fi
3577else
Martin v. Löwis11437992002-04-12 09:54:03 +00003578 echo "$as_me:$LINENO: result: no" >&5
3579echo "${ECHO_T}no" >&6
3580fi;
Fred Drake109d9862001-07-11 06:27:56 +00003581
Skip Montanarodecc6a42003-01-01 20:07:49 +00003582# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
3583# merged with this chunk of code?
3584
Neil Schemenauerd32c2492001-01-24 17:25:28 +00003585# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00003586# ------------------------
3587# (The following bit of code is complicated enough - please keep things
3588# indented properly. Just pretend you're editing Python code. ;-)
3589
3590# There are two parallel sets of case statements below, one that checks to
3591# see if OPT was set and one that does BASECFLAGS setting based upon
3592# compiler and platform. BASECFLAGS tweaks need to be made even if the
3593# user set OPT.
3594
3595# tweak OPT based on compiler and platform, only if the user didn't set
3596# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003597
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003598if test -z "$OPT"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00003599then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003600 case $GCC in
3601 yes)
3602 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003603 yes)
Fred Drake109d9862001-07-11 06:27:56 +00003604 if test "$Py_DEBUG" = 'true' ; then
3605 # Optimization messes up debuggers, so turn it off for
3606 # debug builds.
3607 OPT="-g -Wall -Wstrict-prototypes"
3608 else
3609 OPT="-g -O3 -Wall -Wstrict-prototypes"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003610 fi
3611 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003612 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003613 OPT="-O3 -Wall -Wstrict-prototypes"
3614 ;;
Fred Drake109d9862001-07-11 06:27:56 +00003615 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00003616 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003617 SCO_SV*) OPT="$OPT -m486 -DSCO5"
3618 ;;
3619 esac
Fred Drake109d9862001-07-11 06:27:56 +00003620 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003621
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003622 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00003623 OPT="-O"
3624 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00003625 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003626
3627 # The current (beta) Monterey compiler dies with optimizations
3628 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00003629 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003630 Monterey*)
3631 OPT=""
3632 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00003633 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00003634
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00003635fi
3636
Skip Montanarodecc6a42003-01-01 20:07:49 +00003637
3638# tweak BASECFLAGS based on compiler and platform
3639case $GCC in
3640yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003641 # Python violates C99 rules, by casting between incompatible
3642 # pointer types. GCC may generate bad code as a result of that,
3643 # so use -fno-strict-aliasing if supported.
3644 echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
3645echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6
3646 ac_save_cc="$CC"
3647 CC="$CC -fno-strict-aliasing"
3648 if test "$cross_compiling" = yes; then
3649 ac_cv_no_strict_aliasing_ok=no
3650else
3651 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003652#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003653/* confdefs.h. */
3654_ACEOF
3655cat confdefs.h >>conftest.$ac_ext
3656cat >>conftest.$ac_ext <<_ACEOF
3657/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003658int main() { return 0; }
3659_ACEOF
3660rm -f conftest$ac_exeext
3661if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3662 (eval $ac_link) 2>&5
3663 ac_status=$?
3664 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3665 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3666 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3667 (eval $ac_try) 2>&5
3668 ac_status=$?
3669 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3670 (exit $ac_status); }; }; then
3671 ac_cv_no_strict_aliasing_ok=yes
3672else
3673 echo "$as_me: program exited with status $ac_status" >&5
3674echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003675sed 's/^/| /' conftest.$ac_ext >&5
3676
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00003677( exit $ac_status )
3678ac_cv_no_strict_aliasing_ok=no
3679fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003680rm -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 +00003681fi
3682 CC="$ac_save_cc"
3683 echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
3684echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6
3685 if test $ac_cv_no_strict_aliasing_ok = yes
3686 then
3687 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
3688 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00003689 case $ac_sys_system in
3690 SCO_SV*)
3691 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
3692 ;;
3693 # is there any other compiler on Darwin besides gcc?
3694 Darwin*)
Jack Jansene0040412003-07-23 22:17:28 +00003695 BASECFLAGS="$BASECFLAGS -Wno-long-double -no-cpp-precomp -mno-fused-madd"
Skip Montanarodecc6a42003-01-01 20:07:49 +00003696 ;;
3697 esac
3698 ;;
3699
3700*)
3701 case $ac_sys_system in
3702 OpenUNIX*|UnixWare*)
3703 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
3704 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00003705 OSF*)
3706 BASECFLAGS="$BASECFLAGS -ieee -std"
3707 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00003708 SCO_SV*)
3709 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
3710 ;;
3711 esac
3712 ;;
3713esac
3714
Fred Drakee1ceaa02001-12-04 20:55:47 +00003715if test "$Py_DEBUG" = 'true'; then
3716 :
3717else
3718 OPT="-DNDEBUG $OPT"
3719fi
3720
Guido van Rossum563e7081996-09-10 18:20:48 +00003721if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003722then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003723 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00003724fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00003725
Martin v. Löwis11437992002-04-12 09:54:03 +00003726echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
3727echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6
3728if test "${ac_cv_opt_olimit_ok+set}" = set; then
3729 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum91922671997-10-09 20:24:13 +00003730else
3731 ac_save_cc="$CC"
3732CC="$CC -OPT:Olimit=0"
3733if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003734 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003735else
Martin v. Löwis11437992002-04-12 09:54:03 +00003736 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003737#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003738/* confdefs.h. */
3739_ACEOF
3740cat confdefs.h >>conftest.$ac_ext
3741cat >>conftest.$ac_ext <<_ACEOF
3742/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00003743int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003744_ACEOF
3745rm -f conftest$ac_exeext
3746if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3747 (eval $ac_link) 2>&5
3748 ac_status=$?
3749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3750 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3751 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3752 (eval $ac_try) 2>&5
3753 ac_status=$?
3754 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3755 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00003756 ac_cv_opt_olimit_ok=yes
3757else
Martin v. Löwis11437992002-04-12 09:54:03 +00003758 echo "$as_me: program exited with status $ac_status" >&5
3759echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003760sed 's/^/| /' conftest.$ac_ext >&5
3761
Martin v. Löwis11437992002-04-12 09:54:03 +00003762( exit $ac_status )
3763ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00003764fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003765rm -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 +00003766fi
Guido van Rossum91922671997-10-09 20:24:13 +00003767CC="$ac_save_cc"
3768fi
3769
Martin v. Löwis11437992002-04-12 09:54:03 +00003770echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
3771echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6
Guido van Rossum2efa34b1997-10-23 17:43:11 +00003772if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00003773 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00003774 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
3775 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
3776 # environment?
3777 Darwin*)
3778 ;;
3779 *)
3780 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
3781 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00003782 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003783else
Martin v. Löwis11437992002-04-12 09:54:03 +00003784 echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
3785echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6
3786 if test "${ac_cv_olimit_ok+set}" = set; then
3787 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003788else
3789 ac_save_cc="$CC"
3790 CC="$CC -Olimit 1500"
3791 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00003792 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003793else
Martin v. Löwis11437992002-04-12 09:54:03 +00003794 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003795#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003796/* confdefs.h. */
3797_ACEOF
3798cat confdefs.h >>conftest.$ac_ext
3799cat >>conftest.$ac_ext <<_ACEOF
3800/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003801int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003802_ACEOF
3803rm -f conftest$ac_exeext
3804if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3805 (eval $ac_link) 2>&5
3806 ac_status=$?
3807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3808 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3810 (eval $ac_try) 2>&5
3811 ac_status=$?
3812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3813 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003814 ac_cv_olimit_ok=yes
3815else
Martin v. Löwis11437992002-04-12 09:54:03 +00003816 echo "$as_me: program exited with status $ac_status" >&5
3817echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003818sed 's/^/| /' conftest.$ac_ext >&5
3819
Martin v. Löwis11437992002-04-12 09:54:03 +00003820( exit $ac_status )
3821ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00003822fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003823rm -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 +00003824fi
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003825 CC="$ac_save_cc"
3826fi
3827
Martin v. Löwis11437992002-04-12 09:54:03 +00003828 echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
3829echo "${ECHO_T}$ac_cv_olimit_ok" >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003830 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00003831 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00003832 fi
3833fi
3834
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003835# On some compilers, pthreads are available without further options
3836# (e.g. MacOS X). On some of these systems, the compiler will not
3837# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
3838# So we have to see first whether pthreads are available without
3839# options before we can check whether -Kpthread improves anything.
Martin v. Löwis11437992002-04-12 09:54:03 +00003840echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
3841echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6
3842if test "${ac_cv_pthread_is_default+set}" = set; then
3843 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00003844else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003845 if test "$cross_compiling" = yes; then
3846 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003847else
Martin v. Löwis11437992002-04-12 09:54:03 +00003848 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003849#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003850/* confdefs.h. */
3851_ACEOF
3852cat confdefs.h >>conftest.$ac_ext
3853cat >>conftest.$ac_ext <<_ACEOF
3854/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003855
Martin v. Löwis130fb172001-07-19 11:00:41 +00003856#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003857
3858void* routine(void* p){return NULL;}
3859
3860int main(){
3861 pthread_t p;
3862 if(pthread_create(&p,NULL,routine,NULL)!=0)
3863 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003864 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00003865 return 0;
3866}
3867
Martin v. Löwis11437992002-04-12 09:54:03 +00003868_ACEOF
3869rm -f conftest$ac_exeext
3870if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3871 (eval $ac_link) 2>&5
3872 ac_status=$?
3873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3874 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3875 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3876 (eval $ac_try) 2>&5
3877 ac_status=$?
3878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3879 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00003880
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003881 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00003882 ac_cv_kthread=no
3883 ac_cv_pthread=no
3884
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003885else
Martin v. Löwis11437992002-04-12 09:54:03 +00003886 echo "$as_me: program exited with status $ac_status" >&5
3887echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003888sed 's/^/| /' conftest.$ac_ext >&5
3889
Martin v. Löwis11437992002-04-12 09:54:03 +00003890( exit $ac_status )
3891ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003892fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003893rm -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 +00003894fi
3895
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003896fi
3897
Martin v. Löwis11437992002-04-12 09:54:03 +00003898echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
3899echo "${ECHO_T}$ac_cv_pthread_is_default" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003900
Michael W. Hudson54241132001-12-07 15:38:26 +00003901
Martin v. Löwis11437992002-04-12 09:54:03 +00003902if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003903then
3904 ac_cv_kpthread=no
3905else
3906# -Kpthread, if available, provides the right #defines
3907# and linker options to make pthread_create available
3908# Some compilers won't report that they do not support -Kpthread,
3909# so we need to run a program to see whether it really made the
3910# function available.
Martin v. Löwis11437992002-04-12 09:54:03 +00003911echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
3912echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6
3913if test "${ac_cv_kpthread+set}" = set; then
3914 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003915else
3916 ac_save_cc="$CC"
3917CC="$CC -Kpthread"
3918if test "$cross_compiling" = yes; then
3919 ac_cv_kpthread=no
3920else
Martin v. Löwis11437992002-04-12 09:54:03 +00003921 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003922#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003923/* confdefs.h. */
3924_ACEOF
3925cat confdefs.h >>conftest.$ac_ext
3926cat >>conftest.$ac_ext <<_ACEOF
3927/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003928
3929#include <pthread.h>
3930
3931void* routine(void* p){return NULL;}
3932
3933int main(){
3934 pthread_t p;
3935 if(pthread_create(&p,NULL,routine,NULL)!=0)
3936 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00003937 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003938 return 0;
3939}
3940
Martin v. Löwis11437992002-04-12 09:54:03 +00003941_ACEOF
3942rm -f conftest$ac_exeext
3943if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
3944 (eval $ac_link) 2>&5
3945 ac_status=$?
3946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3947 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3948 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
3949 (eval $ac_try) 2>&5
3950 ac_status=$?
3951 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3952 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00003953 ac_cv_kpthread=yes
3954else
Martin v. Löwis11437992002-04-12 09:54:03 +00003955 echo "$as_me: program exited with status $ac_status" >&5
3956echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003957sed 's/^/| /' conftest.$ac_ext >&5
3958
Martin v. Löwis11437992002-04-12 09:54:03 +00003959( exit $ac_status )
3960ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00003961fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003962rm -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 +00003963fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003964CC="$ac_save_cc"
3965fi
3966
Martin v. Löwis11437992002-04-12 09:54:03 +00003967echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
3968echo "${ECHO_T}$ac_cv_kpthread" >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00003969fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00003970
Skip Montanarod8d39a02003-07-10 20:44:10 +00003971if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003972then
3973# -Kthread, if available, provides the right #defines
3974# and linker options to make pthread_create available
3975# Some compilers won't report that they do not support -Kthread,
3976# so we need to run a program to see whether it really made the
3977# function available.
3978echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
3979echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6
3980if test "${ac_cv_kthread+set}" = set; then
3981 echo $ECHO_N "(cached) $ECHO_C" >&6
3982else
3983 ac_save_cc="$CC"
3984CC="$CC -Kthread"
3985if test "$cross_compiling" = yes; then
3986 ac_cv_kthread=no
3987else
3988 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00003989#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00003990/* confdefs.h. */
3991_ACEOF
3992cat confdefs.h >>conftest.$ac_ext
3993cat >>conftest.$ac_ext <<_ACEOF
3994/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00003995
3996#include <pthread.h>
3997
3998void* routine(void* p){return NULL;}
3999
4000int main(){
4001 pthread_t p;
4002 if(pthread_create(&p,NULL,routine,NULL)!=0)
4003 return 1;
4004 (void)pthread_detach(p);
4005 return 0;
4006}
4007
4008_ACEOF
4009rm -f conftest$ac_exeext
4010if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4011 (eval $ac_link) 2>&5
4012 ac_status=$?
4013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4014 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4015 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4016 (eval $ac_try) 2>&5
4017 ac_status=$?
4018 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4019 (exit $ac_status); }; }; then
4020 ac_cv_kthread=yes
4021else
4022 echo "$as_me: program exited with status $ac_status" >&5
4023echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004024sed 's/^/| /' conftest.$ac_ext >&5
4025
Martin v. Löwis5f433f02003-05-05 05:05:30 +00004026( exit $ac_status )
4027ac_cv_kthread=no
4028fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004029rm -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 +00004030fi
4031CC="$ac_save_cc"
4032fi
4033
4034echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
4035echo "${ECHO_T}$ac_cv_kthread" >&6
4036fi
4037
Skip Montanarod8d39a02003-07-10 20:44:10 +00004038if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004039then
4040# -pthread, if available, provides the right #defines
4041# and linker options to make pthread_create available
4042# Some compilers won't report that they do not support -pthread,
4043# so we need to run a program to see whether it really made the
4044# function available.
4045echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
4046echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6
4047if test "${ac_cv_thread+set}" = set; then
4048 echo $ECHO_N "(cached) $ECHO_C" >&6
4049else
4050 ac_save_cc="$CC"
4051CC="$CC -pthread"
4052if test "$cross_compiling" = yes; then
4053 ac_cv_pthread=no
4054else
4055 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004056#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004057/* confdefs.h. */
4058_ACEOF
4059cat confdefs.h >>conftest.$ac_ext
4060cat >>conftest.$ac_ext <<_ACEOF
4061/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004062
4063#include <pthread.h>
4064
4065void* routine(void* p){return NULL;}
4066
4067int main(){
4068 pthread_t p;
4069 if(pthread_create(&p,NULL,routine,NULL)!=0)
4070 return 1;
4071 (void)pthread_detach(p);
4072 return 0;
4073}
4074
4075_ACEOF
4076rm -f conftest$ac_exeext
4077if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4078 (eval $ac_link) 2>&5
4079 ac_status=$?
4080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4081 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4082 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4083 (eval $ac_try) 2>&5
4084 ac_status=$?
4085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4086 (exit $ac_status); }; }; then
4087 ac_cv_pthread=yes
4088else
4089 echo "$as_me: program exited with status $ac_status" >&5
4090echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004091sed 's/^/| /' conftest.$ac_ext >&5
4092
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00004093( exit $ac_status )
4094ac_cv_pthread=no
4095fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004096rm -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 +00004097fi
4098CC="$ac_save_cc"
4099fi
4100
4101echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
4102echo "${ECHO_T}$ac_cv_pthread" >&6
4103fi
4104
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004105# If we have set a CC compiler flag for thread support then
4106# check if it works for CXX, too.
4107ac_cv_cxx_thread=no
4108if test ! -z "$CXX"
4109then
4110echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
4111echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6
4112ac_save_cxx="$CXX"
4113
4114if test "$ac_cv_kpthread" = "yes"
4115then
4116 CXX="$CXX -Kpthread"
4117 ac_cv_cxx_thread=yes
4118elif test "$ac_cv_kthread" = "yes"
4119then
4120 CXX="$CXX -Kthread"
4121 ac_cv_cxx_thread=yes
4122elif test "$ac_cv_pthread" = "yes"
4123then
4124 CXX="$CXX -pthread"
4125 ac_cv_cxx_thread=yes
4126fi
4127
4128if test $ac_cv_cxx_thread = yes
4129then
4130 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
4131 $CXX -c conftest.$ac_ext 2>&5
4132 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
4133 && test -s conftest$ac_exeext && ./conftest$ac_exeext
4134 then
4135 ac_cv_cxx_thread=yes
4136 else
4137 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004138 fi
4139 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004140fi
4141fi
Martin v. Löwis519adae2003-09-20 10:47:47 +00004142CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00004143echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
4144echo "${ECHO_T}$ac_cv_cxx_thread" >&6
4145
Michael W. Hudson54241132001-12-07 15:38:26 +00004146
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00004147# checks for header files
Martin v. Löwis11437992002-04-12 09:54:03 +00004148echo "$as_me:$LINENO: checking for ANSI C header files" >&5
4149echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4150if test "${ac_cv_header_stdc+set}" = set; then
4151 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004152else
Martin v. Löwis11437992002-04-12 09:54:03 +00004153 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004154#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004155/* confdefs.h. */
4156_ACEOF
4157cat confdefs.h >>conftest.$ac_ext
4158cat >>conftest.$ac_ext <<_ACEOF
4159/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004160#include <stdlib.h>
4161#include <stdarg.h>
4162#include <string.h>
4163#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004164
Skip Montanaro6dead952003-09-25 14:50:04 +00004165int
4166main ()
4167{
4168
4169 ;
4170 return 0;
4171}
Martin v. Löwis11437992002-04-12 09:54:03 +00004172_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004173rm -f conftest.$ac_objext
4174if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004175 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004176 ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00004177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004178 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004179 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +00004180 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4181 (eval $ac_try) 2>&5
4182 ac_status=$?
4183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4184 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004185 ac_cv_header_stdc=yes
4186else
Martin v. Löwis11437992002-04-12 09:54:03 +00004187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004188sed 's/^/| /' conftest.$ac_ext >&5
4189
4190ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004191fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004192rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004193
4194if test $ac_cv_header_stdc = yes; then
4195 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004196 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004197#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004198/* confdefs.h. */
4199_ACEOF
4200cat confdefs.h >>conftest.$ac_ext
4201cat >>conftest.$ac_ext <<_ACEOF
4202/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004203#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004204
4205_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004206if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004207 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004208 :
4209else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004210 ac_cv_header_stdc=no
4211fi
4212rm -f conftest*
4213
4214fi
4215
4216if test $ac_cv_header_stdc = yes; then
4217 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00004218 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004219#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004220/* confdefs.h. */
4221_ACEOF
4222cat confdefs.h >>conftest.$ac_ext
4223cat >>conftest.$ac_ext <<_ACEOF
4224/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004225#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004226
4227_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004228if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00004229 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004230 :
4231else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004232 ac_cv_header_stdc=no
4233fi
4234rm -f conftest*
4235
4236fi
4237
4238if test $ac_cv_header_stdc = yes; then
4239 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00004240 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004241 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004242else
Martin v. Löwis11437992002-04-12 09:54:03 +00004243 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004244#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004245/* confdefs.h. */
4246_ACEOF
4247cat confdefs.h >>conftest.$ac_ext
4248cat >>conftest.$ac_ext <<_ACEOF
4249/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00004250#include <ctype.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004251#if ((' ' & 0x0FF) == 0x020)
4252# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4253# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4254#else
Skip Montanaro6dead952003-09-25 14:50:04 +00004255# define ISLOWER(c) \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004256 (('a' <= (c) && (c) <= 'i') \
4257 || ('j' <= (c) && (c) <= 'r') \
4258 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00004259# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4260#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00004261
Martin v. Löwis11437992002-04-12 09:54:03 +00004262#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4263int
4264main ()
4265{
4266 int i;
4267 for (i = 0; i < 256; i++)
4268 if (XOR (islower (i), ISLOWER (i))
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004269 || toupper (i) != TOUPPER (i))
Martin v. Löwis11437992002-04-12 09:54:03 +00004270 exit(2);
4271 exit (0);
4272}
4273_ACEOF
4274rm -f conftest$ac_exeext
4275if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
4276 (eval $ac_link) 2>&5
4277 ac_status=$?
4278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4279 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4281 (eval $ac_try) 2>&5
4282 ac_status=$?
4283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4284 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004285 :
4286else
Martin v. Löwis11437992002-04-12 09:54:03 +00004287 echo "$as_me: program exited with status $ac_status" >&5
4288echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004289sed 's/^/| /' conftest.$ac_ext >&5
4290
Martin v. Löwis11437992002-04-12 09:54:03 +00004291( exit $ac_status )
4292ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004293fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004294rm -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 +00004295fi
4296fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004297fi
4298echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4299echo "${ECHO_T}$ac_cv_header_stdc" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004300if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004301
4302cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004303#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004304_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004305
4306fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004307
Skip Montanarob9820a32004-01-17 00:16:12 +00004308# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318for 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 +00004319 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00004320do
4321as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4322echo "$as_me:$LINENO: checking for $ac_header" >&5
4323echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4324if eval "test \"\${$as_ac_Header+set}\" = set"; then
4325 echo $ECHO_N "(cached) $ECHO_C" >&6
4326else
4327 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004328#line $LINENO "configure"
Skip Montanarob9820a32004-01-17 00:16:12 +00004329/* confdefs.h. */
4330_ACEOF
4331cat confdefs.h >>conftest.$ac_ext
4332cat >>conftest.$ac_ext <<_ACEOF
4333/* end confdefs.h. */
4334$ac_includes_default
4335
4336#include <$ac_header>
4337_ACEOF
4338rm -f conftest.$ac_objext
4339if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004340 (eval $ac_compile) 2>&5
Skip Montanarob9820a32004-01-17 00:16:12 +00004341 ac_status=$?
4342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4343 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004344 { ac_try='test -s conftest.$ac_objext'
Skip Montanarob9820a32004-01-17 00:16:12 +00004345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4346 (eval $ac_try) 2>&5
4347 ac_status=$?
4348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4349 (exit $ac_status); }; }; then
4350 eval "$as_ac_Header=yes"
4351else
4352 echo "$as_me: failed program was:" >&5
4353sed 's/^/| /' conftest.$ac_ext >&5
4354
4355eval "$as_ac_Header=no"
4356fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004357rm -f conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00004358fi
4359echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4360echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4361if test `eval echo '${'$as_ac_Header'}'` = yes; then
4362 cat >>confdefs.h <<_ACEOF
4363#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4364_ACEOF
4365
4366fi
4367
4368done
4369
4370
Martin v. Löwis11437992002-04-12 09:54:03 +00004371
4372
4373
4374
4375
4376
4377
4378
4379
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
Skip Montanaro7befb992004-02-10 16:50:21 +00004407for ac_header in dlfcn.h fcntl.h grp.h langinfo.h \
4408libintl.h ncurses.h poll.h pthread.h \
4409stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00004410unistd.h utime.h \
Neal Norwitz82251032003-05-23 14:35:24 +00004411sys/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 +00004412sys/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 +00004413sys/un.h sys/utsname.h sys/wait.h pty.h term.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00004414sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
4415bluetooth/bluetooth.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00004416do
Martin v. Löwis11437992002-04-12 09:54:03 +00004417as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4418if eval "test \"\${$as_ac_Header+set}\" = set"; then
4419 echo "$as_me:$LINENO: checking for $ac_header" >&5
4420echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4421if eval "test \"\${$as_ac_Header+set}\" = set"; then
4422 echo $ECHO_N "(cached) $ECHO_C" >&6
4423fi
4424echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4425echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004426else
Martin v. Löwis11437992002-04-12 09:54:03 +00004427 # Is the header compilable?
4428echo "$as_me:$LINENO: checking $ac_header usability" >&5
4429echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
4430cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004431#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004432/* confdefs.h. */
4433_ACEOF
4434cat confdefs.h >>conftest.$ac_ext
4435cat >>conftest.$ac_ext <<_ACEOF
4436/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004437$ac_includes_default
4438#include <$ac_header>
4439_ACEOF
4440rm -f conftest.$ac_objext
4441if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004442 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004443 ac_status=$?
4444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4445 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004446 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004447 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4448 (eval $ac_try) 2>&5
4449 ac_status=$?
4450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4451 (exit $ac_status); }; }; then
4452 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00004453else
Martin v. Löwis11437992002-04-12 09:54:03 +00004454 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004455sed 's/^/| /' conftest.$ac_ext >&5
4456
Martin v. Löwis11437992002-04-12 09:54:03 +00004457ac_header_compiler=no
4458fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004459rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004460echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4461echo "${ECHO_T}$ac_header_compiler" >&6
4462
4463# Is the header present?
4464echo "$as_me:$LINENO: checking $ac_header presence" >&5
4465echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
4466cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004467#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004468/* confdefs.h. */
4469_ACEOF
4470cat confdefs.h >>conftest.$ac_ext
4471cat >>conftest.$ac_ext <<_ACEOF
4472/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004473#include <$ac_header>
4474_ACEOF
4475if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4476 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4477 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004478 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00004479 rm -f conftest.er1
4480 cat conftest.err >&5
4481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4482 (exit $ac_status); } >/dev/null; then
4483 if test -s conftest.err; then
4484 ac_cpp_err=$ac_c_preproc_warn_flag
4485 else
4486 ac_cpp_err=
4487 fi
4488else
4489 ac_cpp_err=yes
4490fi
4491if test -z "$ac_cpp_err"; then
4492 ac_header_preproc=yes
4493else
4494 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004495sed 's/^/| /' conftest.$ac_ext >&5
4496
Martin v. Löwis11437992002-04-12 09:54:03 +00004497 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00004498fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004499rm -f conftest.err conftest.$ac_ext
4500echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4501echo "${ECHO_T}$ac_header_preproc" >&6
4502
4503# So? What about this header?
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004504case $ac_header_compiler:$ac_header_preproc in
4505 yes:no )
Martin v. Löwis11437992002-04-12 09:54:03 +00004506 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
4507echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004508 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004509echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4510 (
4511 cat <<\_ASBOX
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004512## ------------------------------------ ##
4513## Report this to bug-autoconf@gnu.org. ##
4514## ------------------------------------ ##
4515_ASBOX
4516 ) |
4517 sed "s/^/$as_me: WARNING: /" >&2
4518 ;;
4519 no:yes )
4520 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
4521echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
4522 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
4523echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
4524 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
4525echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
4526 (
4527 cat <<\_ASBOX
4528## ------------------------------------ ##
4529## Report this to bug-autoconf@gnu.org. ##
4530## ------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00004531_ASBOX
4532 ) |
4533 sed "s/^/$as_me: WARNING: /" >&2
4534 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00004535esac
4536echo "$as_me:$LINENO: checking for $ac_header" >&5
4537echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4538if eval "test \"\${$as_ac_Header+set}\" = set"; then
4539 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00004540else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004541 eval "$as_ac_Header=$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004542fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004543echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4544echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4545
4546fi
4547if test `eval echo '${'$as_ac_Header'}'` = yes; then
4548 cat >>confdefs.h <<_ACEOF
4549#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4550_ACEOF
4551
4552fi
4553
Guido van Rossum627b2d71993-12-24 10:39:16 +00004554done
4555
Martin v. Löwis11437992002-04-12 09:54:03 +00004556
4557
4558
4559
4560
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004561ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00004562for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
4563 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
4564echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
4565echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
4566if eval "test \"\${$as_ac_Header+set}\" = set"; then
4567 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00004568else
Martin v. Löwis11437992002-04-12 09:54:03 +00004569 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004570#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004571/* confdefs.h. */
4572_ACEOF
4573cat confdefs.h >>conftest.$ac_ext
4574cat >>conftest.$ac_ext <<_ACEOF
4575/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004576#include <sys/types.h>
4577#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00004578
Martin v. Löwis11437992002-04-12 09:54:03 +00004579int
4580main ()
4581{
4582if ((DIR *) 0)
4583return 0;
4584 ;
4585 return 0;
4586}
4587_ACEOF
4588rm -f conftest.$ac_objext
4589if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004590 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004591 ac_status=$?
4592 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4593 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004594 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004595 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4596 (eval $ac_try) 2>&5
4597 ac_status=$?
4598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4599 (exit $ac_status); }; }; then
4600 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00004601else
Martin v. Löwis11437992002-04-12 09:54:03 +00004602 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004603sed 's/^/| /' conftest.$ac_ext >&5
4604
Martin v. Löwis11437992002-04-12 09:54:03 +00004605eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004606fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004607rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00004608fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004609echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
4610echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4611if test `eval echo '${'$as_ac_Header'}'` = yes; then
4612 cat >>confdefs.h <<_ACEOF
4613#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
4614_ACEOF
4615
4616ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00004617fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004618
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004619done
4620# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
4621if test $ac_header_dirent = dirent.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004622 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4623echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4624if test "${ac_cv_search_opendir+set}" = set; then
4625 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004626else
Martin v. Löwis11437992002-04-12 09:54:03 +00004627 ac_func_search_save_LIBS=$LIBS
4628ac_cv_search_opendir=no
4629cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004630#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004631/* confdefs.h. */
4632_ACEOF
4633cat confdefs.h >>conftest.$ac_ext
4634cat >>conftest.$ac_ext <<_ACEOF
4635/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004636
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004637/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004638#ifdef __cplusplus
4639extern "C"
4640#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004641/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004642 builtin and then its argument prototype would still apply. */
4643char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004644int
4645main ()
4646{
4647opendir ();
4648 ;
4649 return 0;
4650}
4651_ACEOF
4652rm -f conftest.$ac_objext conftest$ac_exeext
4653if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004654 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004655 ac_status=$?
4656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4657 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004658 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004659 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4660 (eval $ac_try) 2>&5
4661 ac_status=$?
4662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4663 (exit $ac_status); }; }; then
4664 ac_cv_search_opendir="none required"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004665else
Martin v. Löwis11437992002-04-12 09:54:03 +00004666 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004667sed 's/^/| /' conftest.$ac_ext >&5
4668
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004669fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004670rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004671if test "$ac_cv_search_opendir" = no; then
4672 for ac_lib in dir; do
4673 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4674 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004675#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004676/* confdefs.h. */
4677_ACEOF
4678cat confdefs.h >>conftest.$ac_ext
4679cat >>conftest.$ac_ext <<_ACEOF
4680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004681
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004682/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004683#ifdef __cplusplus
4684extern "C"
4685#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00004686/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00004687 builtin and then its argument prototype would still apply. */
4688char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004689int
4690main ()
4691{
4692opendir ();
4693 ;
4694 return 0;
4695}
4696_ACEOF
4697rm -f conftest.$ac_objext conftest$ac_exeext
4698if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004699 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004700 ac_status=$?
4701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4702 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004703 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004704 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4705 (eval $ac_try) 2>&5
4706 ac_status=$?
4707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4708 (exit $ac_status); }; }; then
4709 ac_cv_search_opendir="-l$ac_lib"
4710break
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004711else
Martin v. Löwis11437992002-04-12 09:54:03 +00004712 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004713sed 's/^/| /' conftest.$ac_ext >&5
4714
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004715fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004716rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004717 done
4718fi
4719LIBS=$ac_func_search_save_LIBS
4720fi
4721echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4722echo "${ECHO_T}$ac_cv_search_opendir" >&6
4723if test "$ac_cv_search_opendir" != no; then
4724 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00004725
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004726fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004727
Michael W. Hudson54241132001-12-07 15:38:26 +00004728else
Martin v. Löwis11437992002-04-12 09:54:03 +00004729 echo "$as_me:$LINENO: checking for library containing opendir" >&5
4730echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6
4731if test "${ac_cv_search_opendir+set}" = set; then
4732 echo $ECHO_N "(cached) $ECHO_C" >&6
4733else
4734 ac_func_search_save_LIBS=$LIBS
4735ac_cv_search_opendir=no
4736cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004737#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004738/* confdefs.h. */
4739_ACEOF
4740cat confdefs.h >>conftest.$ac_ext
4741cat >>conftest.$ac_ext <<_ACEOF
4742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004743
4744/* Override any gcc2 internal prototype to avoid an error. */
4745#ifdef __cplusplus
4746extern "C"
4747#endif
4748/* We use char because int might match the return type of a gcc2
4749 builtin and then its argument prototype would still apply. */
4750char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004751int
4752main ()
4753{
4754opendir ();
4755 ;
4756 return 0;
4757}
4758_ACEOF
4759rm -f conftest.$ac_objext conftest$ac_exeext
4760if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004761 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004762 ac_status=$?
4763 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4764 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004765 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004766 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4767 (eval $ac_try) 2>&5
4768 ac_status=$?
4769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4770 (exit $ac_status); }; }; then
4771 ac_cv_search_opendir="none required"
4772else
4773 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004774sed 's/^/| /' conftest.$ac_ext >&5
4775
Martin v. Löwis11437992002-04-12 09:54:03 +00004776fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004777rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004778if test "$ac_cv_search_opendir" = no; then
4779 for ac_lib in x; do
4780 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4781 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004782#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004783/* confdefs.h. */
4784_ACEOF
4785cat confdefs.h >>conftest.$ac_ext
4786cat >>conftest.$ac_ext <<_ACEOF
4787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00004788
4789/* Override any gcc2 internal prototype to avoid an error. */
4790#ifdef __cplusplus
4791extern "C"
4792#endif
4793/* We use char because int might match the return type of a gcc2
4794 builtin and then its argument prototype would still apply. */
4795char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00004796int
4797main ()
4798{
4799opendir ();
4800 ;
4801 return 0;
4802}
4803_ACEOF
4804rm -f conftest.$ac_objext conftest$ac_exeext
4805if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004806 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004807 ac_status=$?
4808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4809 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004810 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00004811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4812 (eval $ac_try) 2>&5
4813 ac_status=$?
4814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4815 (exit $ac_status); }; }; then
4816 ac_cv_search_opendir="-l$ac_lib"
4817break
4818else
4819 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004820sed 's/^/| /' conftest.$ac_ext >&5
4821
Martin v. Löwis11437992002-04-12 09:54:03 +00004822fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004823rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00004824 done
4825fi
4826LIBS=$ac_func_search_save_LIBS
4827fi
4828echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
4829echo "${ECHO_T}$ac_cv_search_opendir" >&6
4830if test "$ac_cv_search_opendir" != no; then
4831 test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS"
4832
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004833fi
4834
4835fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004836
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004837echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
4838echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6
4839if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
4840 echo $ECHO_N "(cached) $ECHO_C" >&6
4841else
4842 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004843#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004844/* confdefs.h. */
4845_ACEOF
4846cat confdefs.h >>conftest.$ac_ext
4847cat >>conftest.$ac_ext <<_ACEOF
4848/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004849#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004850int
4851main ()
4852{
4853return makedev(0, 0);
4854 ;
4855 return 0;
4856}
4857_ACEOF
4858rm -f conftest.$ac_objext conftest$ac_exeext
4859if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004860 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004861 ac_status=$?
4862 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4863 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004864 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004865 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4866 (eval $ac_try) 2>&5
4867 ac_status=$?
4868 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4869 (exit $ac_status); }; }; then
4870 ac_cv_header_sys_types_h_makedev=yes
4871else
4872 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004873sed 's/^/| /' conftest.$ac_ext >&5
4874
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004875ac_cv_header_sys_types_h_makedev=no
4876fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004877rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004878
4879fi
4880echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
4881echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6
4882
4883if test $ac_cv_header_sys_types_h_makedev = no; then
4884if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4885 echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
4886echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
4887if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
4888 echo $ECHO_N "(cached) $ECHO_C" >&6
4889fi
4890echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
4891echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
4892else
4893 # Is the header compilable?
4894echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
4895echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6
4896cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004897#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004898/* confdefs.h. */
4899_ACEOF
4900cat confdefs.h >>conftest.$ac_ext
4901cat >>conftest.$ac_ext <<_ACEOF
4902/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004903$ac_includes_default
4904#include <sys/mkdev.h>
4905_ACEOF
4906rm -f conftest.$ac_objext
4907if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004908 (eval $ac_compile) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004909 ac_status=$?
4910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4911 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004912 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004913 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
4914 (eval $ac_try) 2>&5
4915 ac_status=$?
4916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4917 (exit $ac_status); }; }; then
4918 ac_header_compiler=yes
4919else
4920 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004921sed 's/^/| /' conftest.$ac_ext >&5
4922
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004923ac_header_compiler=no
4924fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004925rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004926echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4927echo "${ECHO_T}$ac_header_compiler" >&6
4928
4929# Is the header present?
4930echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
4931echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6
4932cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004933#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00004934/* confdefs.h. */
4935_ACEOF
4936cat confdefs.h >>conftest.$ac_ext
4937cat >>conftest.$ac_ext <<_ACEOF
4938/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004939#include <sys/mkdev.h>
4940_ACEOF
4941if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
4942 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4943 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00004944 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004945 rm -f conftest.er1
4946 cat conftest.err >&5
4947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4948 (exit $ac_status); } >/dev/null; then
4949 if test -s conftest.err; then
4950 ac_cpp_err=$ac_c_preproc_warn_flag
4951 else
4952 ac_cpp_err=
4953 fi
4954else
4955 ac_cpp_err=yes
4956fi
4957if test -z "$ac_cpp_err"; then
4958 ac_header_preproc=yes
4959else
4960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004961sed 's/^/| /' conftest.$ac_ext >&5
4962
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004963 ac_header_preproc=no
4964fi
4965rm -f conftest.err conftest.$ac_ext
4966echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4967echo "${ECHO_T}$ac_header_preproc" >&6
4968
4969# So? What about this header?
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004970case $ac_header_compiler:$ac_header_preproc in
4971 yes:no )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004972 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
4973echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00004974 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004975echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4976 (
4977 cat <<\_ASBOX
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00004978## ------------------------------------ ##
4979## Report this to bug-autoconf@gnu.org. ##
4980## ------------------------------------ ##
4981_ASBOX
4982 ) |
4983 sed "s/^/$as_me: WARNING: /" >&2
4984 ;;
4985 no:yes )
4986 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
4987echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
4988 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
4989echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
4990 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
4991echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
4992 (
4993 cat <<\_ASBOX
4994## ------------------------------------ ##
4995## Report this to bug-autoconf@gnu.org. ##
4996## ------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00004997_ASBOX
4998 ) |
4999 sed "s/^/$as_me: WARNING: /" >&2
5000 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005001esac
5002echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
5003echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6
5004if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
5005 echo $ECHO_N "(cached) $ECHO_C" >&6
5006else
5007 ac_cv_header_sys_mkdev_h=$ac_header_preproc
5008fi
5009echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
5010echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6
5011
5012fi
5013if test $ac_cv_header_sys_mkdev_h = yes; then
5014
5015cat >>confdefs.h <<\_ACEOF
5016#define MAJOR_IN_MKDEV 1
5017_ACEOF
5018
5019fi
5020
5021
5022
5023 if test $ac_cv_header_sys_mkdev_h = no; then
5024 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5025 echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5026echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5027if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5028 echo $ECHO_N "(cached) $ECHO_C" >&6
5029fi
5030echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5031echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5032else
5033 # Is the header compilable?
5034echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
5035echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6
5036cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005037#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005038/* confdefs.h. */
5039_ACEOF
5040cat confdefs.h >>conftest.$ac_ext
5041cat >>conftest.$ac_ext <<_ACEOF
5042/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005043$ac_includes_default
5044#include <sys/sysmacros.h>
5045_ACEOF
5046rm -f conftest.$ac_objext
5047if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005048 (eval $ac_compile) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005049 ac_status=$?
5050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5051 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005052 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005053 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5054 (eval $ac_try) 2>&5
5055 ac_status=$?
5056 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5057 (exit $ac_status); }; }; then
5058 ac_header_compiler=yes
5059else
5060 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005061sed 's/^/| /' conftest.$ac_ext >&5
5062
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005063ac_header_compiler=no
5064fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005065rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005066echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5067echo "${ECHO_T}$ac_header_compiler" >&6
5068
5069# Is the header present?
5070echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
5071echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6
5072cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005073#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005074/* confdefs.h. */
5075_ACEOF
5076cat confdefs.h >>conftest.$ac_ext
5077cat >>conftest.$ac_ext <<_ACEOF
5078/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005079#include <sys/sysmacros.h>
5080_ACEOF
5081if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
5082 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5083 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005084 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005085 rm -f conftest.er1
5086 cat conftest.err >&5
5087 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5088 (exit $ac_status); } >/dev/null; then
5089 if test -s conftest.err; then
5090 ac_cpp_err=$ac_c_preproc_warn_flag
5091 else
5092 ac_cpp_err=
5093 fi
5094else
5095 ac_cpp_err=yes
5096fi
5097if test -z "$ac_cpp_err"; then
5098 ac_header_preproc=yes
5099else
5100 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005101sed 's/^/| /' conftest.$ac_ext >&5
5102
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005103 ac_header_preproc=no
5104fi
5105rm -f conftest.err conftest.$ac_ext
5106echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5107echo "${ECHO_T}$ac_header_preproc" >&6
5108
5109# So? What about this header?
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005110case $ac_header_compiler:$ac_header_preproc in
5111 yes:no )
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005112 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
5113echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005114 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005115echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5116 (
5117 cat <<\_ASBOX
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005118## ------------------------------------ ##
5119## Report this to bug-autoconf@gnu.org. ##
5120## ------------------------------------ ##
5121_ASBOX
5122 ) |
5123 sed "s/^/$as_me: WARNING: /" >&2
5124 ;;
5125 no:yes )
5126 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
5127echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
5128 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
5129echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
5130 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
5131echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
5132 (
5133 cat <<\_ASBOX
5134## ------------------------------------ ##
5135## Report this to bug-autoconf@gnu.org. ##
5136## ------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005137_ASBOX
5138 ) |
5139 sed "s/^/$as_me: WARNING: /" >&2
5140 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00005141esac
5142echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
5143echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6
5144if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
5145 echo $ECHO_N "(cached) $ECHO_C" >&6
5146else
5147 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
5148fi
5149echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
5150echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6
5151
5152fi
5153if test $ac_cv_header_sys_sysmacros_h = yes; then
5154
5155cat >>confdefs.h <<\_ACEOF
5156#define MAJOR_IN_SYSMACROS 1
5157_ACEOF
5158
5159fi
5160
5161
5162 fi
5163fi
5164
Michael W. Hudson54241132001-12-07 15:38:26 +00005165
Guido van Rossum627b2d71993-12-24 10:39:16 +00005166# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00005167was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005168echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
5169echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6
5170cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005171#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005172/* confdefs.h. */
5173_ACEOF
5174cat confdefs.h >>conftest.$ac_ext
5175cat >>conftest.$ac_ext <<_ACEOF
5176/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005177#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005178
5179_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005180if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005181 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00005182 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005183else
Martin v. Löwis11437992002-04-12 09:54:03 +00005184
5185
5186cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005187#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00005188_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005189
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005190
Guido van Rossum627b2d71993-12-24 10:39:16 +00005191fi
5192rm -f conftest*
5193
Martin v. Löwis11437992002-04-12 09:54:03 +00005194echo "$as_me:$LINENO: result: $was_it_defined" >&5
5195echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossumda88dad1995-01-26 00:46:29 +00005196
Neal Norwitz11690112002-07-30 01:08:28 +00005197# Check whether using makedev requires defining _OSF_SOURCE
5198echo "$as_me:$LINENO: checking for makedev" >&5
5199echo $ECHO_N "checking for makedev... $ECHO_C" >&6
5200cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005201#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005202/* confdefs.h. */
5203_ACEOF
5204cat confdefs.h >>conftest.$ac_ext
5205cat >>conftest.$ac_ext <<_ACEOF
5206/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005207#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005208int
5209main ()
5210{
5211 makedev(0, 0)
5212 ;
5213 return 0;
5214}
5215_ACEOF
5216rm -f conftest.$ac_objext conftest$ac_exeext
5217if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005218 (eval $ac_link) 2>&5
Neal Norwitz11690112002-07-30 01:08:28 +00005219 ac_status=$?
5220 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5221 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005222 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005223 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5224 (eval $ac_try) 2>&5
5225 ac_status=$?
5226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5227 (exit $ac_status); }; }; then
5228 ac_cv_has_makedev=yes
5229else
5230 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005231sed 's/^/| /' conftest.$ac_ext >&5
5232
Neal Norwitz11690112002-07-30 01:08:28 +00005233ac_cv_has_makedev=no
5234fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005235rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005236if test "$ac_cv_has_makedev" = "no"; then
5237 # we didn't link, try if _OSF_SOURCE will allow us to link
5238 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005239#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005240/* confdefs.h. */
5241_ACEOF
5242cat confdefs.h >>conftest.$ac_ext
5243cat >>conftest.$ac_ext <<_ACEOF
5244/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00005245
Neal Norwitz6eb37f02003-02-23 23:28:15 +00005246#define _OSF_SOURCE 1
5247#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00005248
Neal Norwitz11690112002-07-30 01:08:28 +00005249int
5250main ()
5251{
5252 makedev(0, 0)
5253 ;
5254 return 0;
5255}
5256_ACEOF
5257rm -f conftest.$ac_objext conftest$ac_exeext
5258if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005259 (eval $ac_link) 2>&5
Neal Norwitz11690112002-07-30 01:08:28 +00005260 ac_status=$?
5261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5262 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005263 { ac_try='test -s conftest$ac_exeext'
Neal Norwitz11690112002-07-30 01:08:28 +00005264 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5265 (eval $ac_try) 2>&5
5266 ac_status=$?
5267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5268 (exit $ac_status); }; }; then
5269 ac_cv_has_makedev=yes
5270else
5271 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005272sed 's/^/| /' conftest.$ac_ext >&5
5273
Neal Norwitz11690112002-07-30 01:08:28 +00005274ac_cv_has_makedev=no
5275fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005276rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00005277 if test "$ac_cv_has_makedev" = "yes"; then
5278
5279cat >>confdefs.h <<\_ACEOF
5280#define _OSF_SOURCE 1
5281_ACEOF
5282
5283 fi
5284fi
5285echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
5286echo "${ECHO_T}$ac_cv_has_makedev" >&6
5287if test "$ac_cv_has_makedev" = "yes"; then
5288
5289cat >>confdefs.h <<\_ACEOF
5290#define HAVE_MAKEDEV 1
5291_ACEOF
5292
5293fi
5294
Martin v. Löwis399a6892002-10-04 10:22:02 +00005295# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
5296# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
5297# defined, but the compiler does not support pragma redefine_extname,
5298# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
5299# structures (such as rlimit64) without declaring them. As a
5300# work-around, disable LFS on such configurations
5301
5302use_lfs=yes
5303echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
5304echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6
5305cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005306#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005307/* confdefs.h. */
5308_ACEOF
5309cat confdefs.h >>conftest.$ac_ext
5310cat >>conftest.$ac_ext <<_ACEOF
5311/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00005312
5313#define _LARGEFILE_SOURCE 1
5314#define _FILE_OFFSET_BITS 64
5315#include <sys/resource.h>
5316
Martin v. Löwis399a6892002-10-04 10:22:02 +00005317int
5318main ()
5319{
5320struct rlimit foo;
5321 ;
5322 return 0;
5323}
5324_ACEOF
5325rm -f conftest.$ac_objext
5326if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005327 (eval $ac_compile) 2>&5
Martin v. Löwis399a6892002-10-04 10:22:02 +00005328 ac_status=$?
5329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5330 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005331 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis399a6892002-10-04 10:22:02 +00005332 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5333 (eval $ac_try) 2>&5
5334 ac_status=$?
5335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5336 (exit $ac_status); }; }; then
5337 sol_lfs_bug=no
5338else
5339 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005340sed 's/^/| /' conftest.$ac_ext >&5
5341
Martin v. Löwis399a6892002-10-04 10:22:02 +00005342sol_lfs_bug=yes
5343fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005344rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis399a6892002-10-04 10:22:02 +00005345echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
5346echo "${ECHO_T}$sol_lfs_bug" >&6
5347if test "$sol_lfs_bug" = "yes"; then
5348 use_lfs=no
5349fi
5350
5351if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00005352# Two defines needed to enable largefile support on various platforms
5353# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00005354
Martin v. Löwis11437992002-04-12 09:54:03 +00005355cat >>confdefs.h <<\_ACEOF
5356#define _LARGEFILE_SOURCE 1
5357_ACEOF
5358
5359
5360cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005361#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00005362_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00005363
Martin v. Löwis399a6892002-10-04 10:22:02 +00005364fi
Michael W. Hudson54241132001-12-07 15:38:26 +00005365
Guido van Rossum84e7b241996-08-19 21:59:00 +00005366# Add some code to confdefs.h so that the test for off_t works on SCO
5367cat >> confdefs.h <<\EOF
5368#if defined(SCO_DS)
5369#undef _OFF_T
5370#endif
5371EOF
5372
Guido van Rossumef2255b2000-03-10 22:30:29 +00005373# Type availability checks
Martin v. Löwis11437992002-04-12 09:54:03 +00005374echo "$as_me:$LINENO: checking for mode_t" >&5
5375echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5376if test "${ac_cv_type_mode_t+set}" = set; then
5377 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005378else
Martin v. Löwis11437992002-04-12 09:54:03 +00005379 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005380#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005381/* confdefs.h. */
5382_ACEOF
5383cat confdefs.h >>conftest.$ac_ext
5384cat >>conftest.$ac_ext <<_ACEOF
5385/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005386$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005387int
5388main ()
5389{
5390if ((mode_t *) 0)
5391 return 0;
5392if (sizeof (mode_t))
5393 return 0;
5394 ;
5395 return 0;
5396}
5397_ACEOF
5398rm -f conftest.$ac_objext
5399if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005400 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005401 ac_status=$?
5402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5403 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005404 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005405 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5406 (eval $ac_try) 2>&5
5407 ac_status=$?
5408 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5409 (exit $ac_status); }; }; then
Jack Jansendd19cf82001-12-06 22:36:17 +00005410 ac_cv_type_mode_t=yes
5411else
Martin v. Löwis11437992002-04-12 09:54:03 +00005412 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005413sed 's/^/| /' conftest.$ac_ext >&5
5414
Martin v. Löwis11437992002-04-12 09:54:03 +00005415ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00005416fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005417rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005418fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005419echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
5420echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5421if test $ac_cv_type_mode_t = yes; then
5422 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005423else
Martin v. Löwis11437992002-04-12 09:54:03 +00005424
5425cat >>confdefs.h <<_ACEOF
5426#define mode_t int
5427_ACEOF
5428
5429fi
5430
5431echo "$as_me:$LINENO: checking for off_t" >&5
5432echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5433if test "${ac_cv_type_off_t+set}" = set; then
5434 echo $ECHO_N "(cached) $ECHO_C" >&6
5435else
5436 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005437#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005438/* confdefs.h. */
5439_ACEOF
5440cat confdefs.h >>conftest.$ac_ext
5441cat >>conftest.$ac_ext <<_ACEOF
5442/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005443$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005444int
5445main ()
5446{
5447if ((off_t *) 0)
5448 return 0;
5449if (sizeof (off_t))
5450 return 0;
5451 ;
5452 return 0;
5453}
5454_ACEOF
5455rm -f conftest.$ac_objext
5456if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005457 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005458 ac_status=$?
5459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5460 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005461 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005462 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5463 (eval $ac_try) 2>&5
5464 ac_status=$?
5465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5466 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005467 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005468else
Martin v. Löwis11437992002-04-12 09:54:03 +00005469 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005470sed 's/^/| /' conftest.$ac_ext >&5
5471
Martin v. Löwis11437992002-04-12 09:54:03 +00005472ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005473fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005474rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005475fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005476echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
5477echo "${ECHO_T}$ac_cv_type_off_t" >&6
5478if test $ac_cv_type_off_t = yes; then
5479 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005480else
Martin v. Löwis11437992002-04-12 09:54:03 +00005481
5482cat >>confdefs.h <<_ACEOF
5483#define off_t long
5484_ACEOF
5485
5486fi
5487
5488echo "$as_me:$LINENO: checking for pid_t" >&5
5489echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5490if test "${ac_cv_type_pid_t+set}" = set; then
5491 echo $ECHO_N "(cached) $ECHO_C" >&6
5492else
5493 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005494#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005495/* confdefs.h. */
5496_ACEOF
5497cat confdefs.h >>conftest.$ac_ext
5498cat >>conftest.$ac_ext <<_ACEOF
5499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005500$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005501int
5502main ()
5503{
5504if ((pid_t *) 0)
5505 return 0;
5506if (sizeof (pid_t))
5507 return 0;
5508 ;
5509 return 0;
5510}
5511_ACEOF
5512rm -f conftest.$ac_objext
5513if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005514 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005515 ac_status=$?
5516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5517 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005518 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005519 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5520 (eval $ac_try) 2>&5
5521 ac_status=$?
5522 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5523 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005524 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005525else
Martin v. Löwis11437992002-04-12 09:54:03 +00005526 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005527sed 's/^/| /' conftest.$ac_ext >&5
5528
Martin v. Löwis11437992002-04-12 09:54:03 +00005529ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005530fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005531rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005532fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005533echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
5534echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5535if test $ac_cv_type_pid_t = yes; then
5536 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005537else
Martin v. Löwis11437992002-04-12 09:54:03 +00005538
5539cat >>confdefs.h <<_ACEOF
5540#define pid_t int
5541_ACEOF
5542
5543fi
5544
5545echo "$as_me:$LINENO: checking return type of signal handlers" >&5
5546echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
5547if test "${ac_cv_type_signal+set}" = set; then
5548 echo $ECHO_N "(cached) $ECHO_C" >&6
5549else
5550 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005551#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005552/* confdefs.h. */
5553_ACEOF
5554cat confdefs.h >>conftest.$ac_ext
5555cat >>conftest.$ac_ext <<_ACEOF
5556/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00005557#include <sys/types.h>
5558#include <signal.h>
5559#ifdef signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005560# undef signal
Guido van Rossum627b2d71993-12-24 10:39:16 +00005561#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005562#ifdef __cplusplus
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005563extern "C" void (*signal (int, void (*)(int)))(int);
5564#else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005565void (*signal ()) ();
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005566#endif
5567
Martin v. Löwis11437992002-04-12 09:54:03 +00005568int
5569main ()
5570{
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005571int i;
Martin v. Löwis11437992002-04-12 09:54:03 +00005572 ;
5573 return 0;
5574}
5575_ACEOF
5576rm -f conftest.$ac_objext
5577if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005578 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005579 ac_status=$?
5580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5581 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005582 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005583 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5584 (eval $ac_try) 2>&5
5585 ac_status=$?
5586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5587 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005588 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00005589else
Martin v. Löwis11437992002-04-12 09:54:03 +00005590 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005591sed 's/^/| /' conftest.$ac_ext >&5
5592
Martin v. Löwis11437992002-04-12 09:54:03 +00005593ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00005594fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005595rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005596fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005597echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
5598echo "${ECHO_T}$ac_cv_type_signal" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00005599
Martin v. Löwis11437992002-04-12 09:54:03 +00005600cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005601#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00005602_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00005603
Michael W. Hudson54241132001-12-07 15:38:26 +00005604
Martin v. Löwis11437992002-04-12 09:54:03 +00005605echo "$as_me:$LINENO: checking for size_t" >&5
5606echo $ECHO_N "checking for size_t... $ECHO_C" >&6
5607if test "${ac_cv_type_size_t+set}" = set; then
5608 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005609else
Martin v. Löwis11437992002-04-12 09:54:03 +00005610 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005611#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005612/* confdefs.h. */
5613_ACEOF
5614cat confdefs.h >>conftest.$ac_ext
5615cat >>conftest.$ac_ext <<_ACEOF
5616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005617$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005618int
5619main ()
5620{
5621if ((size_t *) 0)
5622 return 0;
5623if (sizeof (size_t))
5624 return 0;
5625 ;
5626 return 0;
5627}
5628_ACEOF
5629rm -f conftest.$ac_objext
5630if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005631 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005632 ac_status=$?
5633 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5634 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005635 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005636 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5637 (eval $ac_try) 2>&5
5638 ac_status=$?
5639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5640 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +00005641 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00005642else
Martin v. Löwis11437992002-04-12 09:54:03 +00005643 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005644sed 's/^/| /' conftest.$ac_ext >&5
5645
Martin v. Löwis11437992002-04-12 09:54:03 +00005646ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00005647fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005648rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005649fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005650echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
5651echo "${ECHO_T}$ac_cv_type_size_t" >&6
5652if test $ac_cv_type_size_t = yes; then
5653 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005654else
Martin v. Löwis11437992002-04-12 09:54:03 +00005655
5656cat >>confdefs.h <<_ACEOF
5657#define size_t unsigned
5658_ACEOF
5659
5660fi
5661
5662echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
5663echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5664if test "${ac_cv_type_uid_t+set}" = set; then
5665 echo $ECHO_N "(cached) $ECHO_C" >&6
5666else
5667 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005668#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005669/* confdefs.h. */
5670_ACEOF
5671cat confdefs.h >>conftest.$ac_ext
5672cat >>conftest.$ac_ext <<_ACEOF
5673/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005674#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005675
5676_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005677if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00005678 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005679 ac_cv_type_uid_t=yes
5680else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005681 ac_cv_type_uid_t=no
5682fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00005683rm -f conftest*
5684
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005685fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005686echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
5687echo "${ECHO_T}$ac_cv_type_uid_t" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005688if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005689
Martin v. Löwis11437992002-04-12 09:54:03 +00005690cat >>confdefs.h <<\_ACEOF
5691#define uid_t int
5692_ACEOF
5693
5694
5695cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005696#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00005697_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005698
5699fi
5700
Jack Jansendd19cf82001-12-06 22:36:17 +00005701
Michael W. Hudson54241132001-12-07 15:38:26 +00005702# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00005703# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwis11437992002-04-12 09:54:03 +00005704echo "$as_me:$LINENO: checking for int" >&5
5705echo $ECHO_N "checking for int... $ECHO_C" >&6
5706if test "${ac_cv_type_int+set}" = set; then
5707 echo $ECHO_N "(cached) $ECHO_C" >&6
5708else
5709 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005710#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005711/* confdefs.h. */
5712_ACEOF
5713cat confdefs.h >>conftest.$ac_ext
5714cat >>conftest.$ac_ext <<_ACEOF
5715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005716$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005717int
5718main ()
5719{
5720if ((int *) 0)
5721 return 0;
5722if (sizeof (int))
5723 return 0;
5724 ;
5725 return 0;
5726}
5727_ACEOF
5728rm -f conftest.$ac_objext
5729if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005730 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005731 ac_status=$?
5732 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5733 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005734 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005735 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5736 (eval $ac_try) 2>&5
5737 ac_status=$?
5738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5739 (exit $ac_status); }; }; then
5740 ac_cv_type_int=yes
5741else
5742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005743sed 's/^/| /' conftest.$ac_ext >&5
5744
Martin v. Löwis11437992002-04-12 09:54:03 +00005745ac_cv_type_int=no
5746fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005747rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005748fi
5749echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
5750echo "${ECHO_T}$ac_cv_type_int" >&6
5751
5752echo "$as_me:$LINENO: checking size of int" >&5
5753echo $ECHO_N "checking size of int... $ECHO_C" >&6
5754if test "${ac_cv_sizeof_int+set}" = set; then
5755 echo $ECHO_N "(cached) $ECHO_C" >&6
5756else
5757 if test "$ac_cv_type_int" = yes; then
5758 # The cast to unsigned long works around a bug in the HP C Compiler
5759 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
5760 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
5761 # This bug is HP SR number 8606223364.
5762 if test "$cross_compiling" = yes; then
5763 # Depending upon the size, compute the lo and hi bounds.
5764cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005765#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005766/* confdefs.h. */
5767_ACEOF
5768cat confdefs.h >>conftest.$ac_ext
5769cat >>conftest.$ac_ext <<_ACEOF
5770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005771$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005772int
5773main ()
5774{
5775static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 0)];
5776test_array [0] = 0
5777
5778 ;
5779 return 0;
5780}
5781_ACEOF
5782rm -f conftest.$ac_objext
5783if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005784 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005785 ac_status=$?
5786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5787 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005788 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005789 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5790 (eval $ac_try) 2>&5
5791 ac_status=$?
5792 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5793 (exit $ac_status); }; }; then
5794 ac_lo=0 ac_mid=0
5795 while :; do
5796 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005797#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005798/* confdefs.h. */
5799_ACEOF
5800cat confdefs.h >>conftest.$ac_ext
5801cat >>conftest.$ac_ext <<_ACEOF
5802/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005803$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005804int
5805main ()
5806{
5807static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5808test_array [0] = 0
5809
5810 ;
5811 return 0;
5812}
5813_ACEOF
5814rm -f conftest.$ac_objext
5815if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005816 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005817 ac_status=$?
5818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5819 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005820 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005821 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5822 (eval $ac_try) 2>&5
5823 ac_status=$?
5824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5825 (exit $ac_status); }; }; then
5826 ac_hi=$ac_mid; break
5827else
5828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005829sed 's/^/| /' conftest.$ac_ext >&5
5830
Martin v. Löwis11437992002-04-12 09:54:03 +00005831ac_lo=`expr $ac_mid + 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005832 if test $ac_lo -le $ac_mid; then
5833 ac_lo= ac_hi=
5834 break
5835 fi
5836 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00005837fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005838rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005839 done
5840else
5841 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005842sed 's/^/| /' conftest.$ac_ext >&5
5843
Martin v. Löwis11437992002-04-12 09:54:03 +00005844cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005845#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005846/* confdefs.h. */
5847_ACEOF
5848cat confdefs.h >>conftest.$ac_ext
5849cat >>conftest.$ac_ext <<_ACEOF
5850/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005851$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005852int
5853main ()
5854{
5855static int test_array [1 - 2 * !(((long) (sizeof (int))) < 0)];
5856test_array [0] = 0
5857
5858 ;
5859 return 0;
5860}
5861_ACEOF
5862rm -f conftest.$ac_objext
5863if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005864 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005865 ac_status=$?
5866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5867 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005868 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005869 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5870 (eval $ac_try) 2>&5
5871 ac_status=$?
5872 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5873 (exit $ac_status); }; }; then
5874 ac_hi=-1 ac_mid=-1
5875 while :; do
5876 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005877#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005878/* confdefs.h. */
5879_ACEOF
5880cat confdefs.h >>conftest.$ac_ext
5881cat >>conftest.$ac_ext <<_ACEOF
5882/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005883$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005884int
5885main ()
5886{
5887static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $ac_mid)];
5888test_array [0] = 0
5889
5890 ;
5891 return 0;
5892}
5893_ACEOF
5894rm -f conftest.$ac_objext
5895if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005896 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005897 ac_status=$?
5898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5899 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005900 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5902 (eval $ac_try) 2>&5
5903 ac_status=$?
5904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5905 (exit $ac_status); }; }; then
5906 ac_lo=$ac_mid; break
5907else
5908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005909sed 's/^/| /' conftest.$ac_ext >&5
5910
Martin v. Löwis11437992002-04-12 09:54:03 +00005911ac_hi=`expr '(' $ac_mid ')' - 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005912 if test $ac_mid -le $ac_hi; then
5913 ac_lo= ac_hi=
5914 break
5915 fi
5916 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00005917fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005918rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005919 done
5920else
5921 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005922sed 's/^/| /' conftest.$ac_ext >&5
5923
Martin v. Löwis11437992002-04-12 09:54:03 +00005924ac_lo= ac_hi=
5925fi
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 +00005927fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005928rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005929# Binary search between lo and hi bounds.
5930while test "x$ac_lo" != "x$ac_hi"; do
5931 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
5932 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005933#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005934/* confdefs.h. */
5935_ACEOF
5936cat confdefs.h >>conftest.$ac_ext
5937cat >>conftest.$ac_ext <<_ACEOF
5938/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005939$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00005940int
5941main ()
5942{
5943static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $ac_mid)];
5944test_array [0] = 0
5945
5946 ;
5947 return 0;
5948}
5949_ACEOF
5950rm -f conftest.$ac_objext
5951if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005952 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005953 ac_status=$?
5954 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5955 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005956 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00005957 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
5958 (eval $ac_try) 2>&5
5959 ac_status=$?
5960 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5961 (exit $ac_status); }; }; then
5962 ac_hi=$ac_mid
5963else
5964 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005965sed 's/^/| /' conftest.$ac_ext >&5
5966
Martin v. Löwis11437992002-04-12 09:54:03 +00005967ac_lo=`expr '(' $ac_mid ')' + 1`
5968fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005969rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00005970done
5971case $ac_lo in
5972?*) ac_cv_sizeof_int=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00005973'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
5974See \`config.log' for more details." >&5
5975echo "$as_me: error: cannot compute sizeof (int), 77
5976See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005977 { (exit 1); exit 1; }; } ;;
5978esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005979else
5980 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00005981 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
5982See \`config.log' for more details." >&5
5983echo "$as_me: error: cannot run test program while cross compiling
5984See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00005985 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00005986else
Martin v. Löwis11437992002-04-12 09:54:03 +00005987 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005988#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00005989/* confdefs.h. */
5990_ACEOF
5991cat confdefs.h >>conftest.$ac_ext
5992cat >>conftest.$ac_ext <<_ACEOF
5993/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005994$ac_includes_default
5995long longval () { return (long) (sizeof (int)); }
5996unsigned long ulongval () { return (long) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00005997#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005998#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00005999int
6000main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006001{
Martin v. Löwis11437992002-04-12 09:54:03 +00006002
6003 FILE *f = fopen ("conftest.val", "w");
6004 if (! f)
6005 exit (1);
6006 if (((long) (sizeof (int))) < 0)
6007 {
6008 long i = longval ();
6009 if (i != ((long) (sizeof (int))))
6010 exit (1);
6011 fprintf (f, "%ld\n", i);
6012 }
6013 else
6014 {
6015 unsigned long i = ulongval ();
6016 if (i != ((long) (sizeof (int))))
6017 exit (1);
6018 fprintf (f, "%lu\n", i);
6019 }
6020 exit (ferror (f) || fclose (f) != 0);
6021
6022 ;
6023 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006024}
Martin v. Löwis11437992002-04-12 09:54:03 +00006025_ACEOF
6026rm -f conftest$ac_exeext
6027if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6028 (eval $ac_link) 2>&5
6029 ac_status=$?
6030 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6031 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6032 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6033 (eval $ac_try) 2>&5
6034 ac_status=$?
6035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6036 (exit $ac_status); }; }; then
6037 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006038else
Martin v. Löwis11437992002-04-12 09:54:03 +00006039 echo "$as_me: program exited with status $ac_status" >&5
6040echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006041sed 's/^/| /' conftest.$ac_ext >&5
6042
Martin v. Löwis11437992002-04-12 09:54:03 +00006043( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006044{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77
6045See \`config.log' for more details." >&5
6046echo "$as_me: error: cannot compute sizeof (int), 77
6047See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006048 { (exit 1); exit 1; }; }
6049fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006050rm -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 +00006051fi
6052fi
6053rm -f conftest.val
6054else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006055 ac_cv_sizeof_int=0
6056fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006057fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006058echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
6059echo "${ECHO_T}$ac_cv_sizeof_int" >&6
6060cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006061#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00006062_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006063
6064
Martin v. Löwis11437992002-04-12 09:54:03 +00006065echo "$as_me:$LINENO: checking for long" >&5
6066echo $ECHO_N "checking for long... $ECHO_C" >&6
6067if test "${ac_cv_type_long+set}" = set; then
6068 echo $ECHO_N "(cached) $ECHO_C" >&6
6069else
6070 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006071#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006072/* confdefs.h. */
6073_ACEOF
6074cat confdefs.h >>conftest.$ac_ext
6075cat >>conftest.$ac_ext <<_ACEOF
6076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006077$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006078int
6079main ()
6080{
6081if ((long *) 0)
6082 return 0;
6083if (sizeof (long))
6084 return 0;
6085 ;
6086 return 0;
6087}
6088_ACEOF
6089rm -f conftest.$ac_objext
6090if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006091 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006092 ac_status=$?
6093 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6094 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006095 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006096 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6097 (eval $ac_try) 2>&5
6098 ac_status=$?
6099 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6100 (exit $ac_status); }; }; then
6101 ac_cv_type_long=yes
6102else
6103 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006104sed 's/^/| /' conftest.$ac_ext >&5
6105
Martin v. Löwis11437992002-04-12 09:54:03 +00006106ac_cv_type_long=no
6107fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006108rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006109fi
6110echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
6111echo "${ECHO_T}$ac_cv_type_long" >&6
6112
6113echo "$as_me:$LINENO: checking size of long" >&5
6114echo $ECHO_N "checking size of long... $ECHO_C" >&6
6115if test "${ac_cv_sizeof_long+set}" = set; then
6116 echo $ECHO_N "(cached) $ECHO_C" >&6
6117else
6118 if test "$ac_cv_type_long" = yes; then
6119 # The cast to unsigned long works around a bug in the HP C Compiler
6120 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6121 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6122 # This bug is HP SR number 8606223364.
6123 if test "$cross_compiling" = yes; then
6124 # Depending upon the size, compute the lo and hi bounds.
6125cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006126#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006127/* confdefs.h. */
6128_ACEOF
6129cat confdefs.h >>conftest.$ac_ext
6130cat >>conftest.$ac_ext <<_ACEOF
6131/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006132$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006133int
6134main ()
6135{
6136static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 0)];
6137test_array [0] = 0
6138
6139 ;
6140 return 0;
6141}
6142_ACEOF
6143rm -f conftest.$ac_objext
6144if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006145 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006146 ac_status=$?
6147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6148 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006149 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006150 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6151 (eval $ac_try) 2>&5
6152 ac_status=$?
6153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6154 (exit $ac_status); }; }; then
6155 ac_lo=0 ac_mid=0
6156 while :; do
6157 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006158#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006159/* confdefs.h. */
6160_ACEOF
6161cat confdefs.h >>conftest.$ac_ext
6162cat >>conftest.$ac_ext <<_ACEOF
6163/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006164$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006165int
6166main ()
6167{
6168static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6169test_array [0] = 0
6170
6171 ;
6172 return 0;
6173}
6174_ACEOF
6175rm -f conftest.$ac_objext
6176if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006177 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006178 ac_status=$?
6179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6180 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006181 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6183 (eval $ac_try) 2>&5
6184 ac_status=$?
6185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6186 (exit $ac_status); }; }; then
6187 ac_hi=$ac_mid; break
6188else
6189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006190sed 's/^/| /' conftest.$ac_ext >&5
6191
Martin v. Löwis11437992002-04-12 09:54:03 +00006192ac_lo=`expr $ac_mid + 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006193 if test $ac_lo -le $ac_mid; then
6194 ac_lo= ac_hi=
6195 break
6196 fi
6197 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006198fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006199rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006200 done
6201else
6202 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006203sed 's/^/| /' conftest.$ac_ext >&5
6204
Martin v. Löwis11437992002-04-12 09:54:03 +00006205cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006206#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006207/* confdefs.h. */
6208_ACEOF
6209cat confdefs.h >>conftest.$ac_ext
6210cat >>conftest.$ac_ext <<_ACEOF
6211/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006212$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006213int
6214main ()
6215{
6216static int test_array [1 - 2 * !(((long) (sizeof (long))) < 0)];
6217test_array [0] = 0
6218
6219 ;
6220 return 0;
6221}
6222_ACEOF
6223rm -f conftest.$ac_objext
6224if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006225 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006226 ac_status=$?
6227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6228 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006229 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006230 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6231 (eval $ac_try) 2>&5
6232 ac_status=$?
6233 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6234 (exit $ac_status); }; }; then
6235 ac_hi=-1 ac_mid=-1
6236 while :; do
6237 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006238#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006239/* confdefs.h. */
6240_ACEOF
6241cat confdefs.h >>conftest.$ac_ext
6242cat >>conftest.$ac_ext <<_ACEOF
6243/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006244$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006245int
6246main ()
6247{
6248static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $ac_mid)];
6249test_array [0] = 0
6250
6251 ;
6252 return 0;
6253}
6254_ACEOF
6255rm -f conftest.$ac_objext
6256if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006257 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006258 ac_status=$?
6259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6260 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006261 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006262 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6263 (eval $ac_try) 2>&5
6264 ac_status=$?
6265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6266 (exit $ac_status); }; }; then
6267 ac_lo=$ac_mid; break
6268else
6269 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006270sed 's/^/| /' conftest.$ac_ext >&5
6271
Martin v. Löwis11437992002-04-12 09:54:03 +00006272ac_hi=`expr '(' $ac_mid ')' - 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006273 if test $ac_mid -le $ac_hi; then
6274 ac_lo= ac_hi=
6275 break
6276 fi
6277 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006278fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006279rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006280 done
6281else
6282 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006283sed 's/^/| /' conftest.$ac_ext >&5
6284
Martin v. Löwis11437992002-04-12 09:54:03 +00006285ac_lo= ac_hi=
6286fi
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 +00006288fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006289rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006290# Binary search between lo and hi bounds.
6291while test "x$ac_lo" != "x$ac_hi"; do
6292 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6293 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006294#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006295/* confdefs.h. */
6296_ACEOF
6297cat confdefs.h >>conftest.$ac_ext
6298cat >>conftest.$ac_ext <<_ACEOF
6299/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006300$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006301int
6302main ()
6303{
6304static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $ac_mid)];
6305test_array [0] = 0
6306
6307 ;
6308 return 0;
6309}
6310_ACEOF
6311rm -f conftest.$ac_objext
6312if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006313 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006314 ac_status=$?
6315 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6316 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006317 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006318 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6319 (eval $ac_try) 2>&5
6320 ac_status=$?
6321 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6322 (exit $ac_status); }; }; then
6323 ac_hi=$ac_mid
6324else
6325 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006326sed 's/^/| /' conftest.$ac_ext >&5
6327
Martin v. Löwis11437992002-04-12 09:54:03 +00006328ac_lo=`expr '(' $ac_mid ')' + 1`
6329fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006330rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006331done
6332case $ac_lo in
6333?*) ac_cv_sizeof_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006334'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6335See \`config.log' for more details." >&5
6336echo "$as_me: error: cannot compute sizeof (long), 77
6337See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006338 { (exit 1); exit 1; }; } ;;
6339esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006340else
6341 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006342 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6343See \`config.log' for more details." >&5
6344echo "$as_me: error: cannot run test program while cross compiling
6345See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006346 { (exit 1); exit 1; }; }
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006347else
Martin v. Löwis11437992002-04-12 09:54:03 +00006348 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006349#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006350/* confdefs.h. */
6351_ACEOF
6352cat confdefs.h >>conftest.$ac_ext
6353cat >>conftest.$ac_ext <<_ACEOF
6354/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006355$ac_includes_default
6356long longval () { return (long) (sizeof (long)); }
6357unsigned long ulongval () { return (long) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006358#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006359#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006360int
6361main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006362{
Martin v. Löwis11437992002-04-12 09:54:03 +00006363
6364 FILE *f = fopen ("conftest.val", "w");
6365 if (! f)
6366 exit (1);
6367 if (((long) (sizeof (long))) < 0)
6368 {
6369 long i = longval ();
6370 if (i != ((long) (sizeof (long))))
6371 exit (1);
6372 fprintf (f, "%ld\n", i);
6373 }
6374 else
6375 {
6376 unsigned long i = ulongval ();
6377 if (i != ((long) (sizeof (long))))
6378 exit (1);
6379 fprintf (f, "%lu\n", i);
6380 }
6381 exit (ferror (f) || fclose (f) != 0);
6382
6383 ;
6384 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006385}
Martin v. Löwis11437992002-04-12 09:54:03 +00006386_ACEOF
6387rm -f conftest$ac_exeext
6388if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6389 (eval $ac_link) 2>&5
6390 ac_status=$?
6391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6392 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6393 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6394 (eval $ac_try) 2>&5
6395 ac_status=$?
6396 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6397 (exit $ac_status); }; }; then
6398 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006399else
Martin v. Löwis11437992002-04-12 09:54:03 +00006400 echo "$as_me: program exited with status $ac_status" >&5
6401echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006402sed 's/^/| /' conftest.$ac_ext >&5
6403
Martin v. Löwis11437992002-04-12 09:54:03 +00006404( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006405{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77
6406See \`config.log' for more details." >&5
6407echo "$as_me: error: cannot compute sizeof (long), 77
6408See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006409 { (exit 1); exit 1; }; }
6410fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006411rm -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 +00006412fi
6413fi
6414rm -f conftest.val
6415else
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006416 ac_cv_sizeof_long=0
6417fi
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006418fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006419echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
6420echo "${ECHO_T}$ac_cv_sizeof_long" >&6
6421cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006422#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00006423_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00006424
6425
Martin v. Löwis11437992002-04-12 09:54:03 +00006426echo "$as_me:$LINENO: checking for void *" >&5
6427echo $ECHO_N "checking for void *... $ECHO_C" >&6
6428if test "${ac_cv_type_void_p+set}" = set; then
6429 echo $ECHO_N "(cached) $ECHO_C" >&6
6430else
6431 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006432#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006433/* confdefs.h. */
6434_ACEOF
6435cat confdefs.h >>conftest.$ac_ext
6436cat >>conftest.$ac_ext <<_ACEOF
6437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006438$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006439int
6440main ()
6441{
6442if ((void * *) 0)
6443 return 0;
6444if (sizeof (void *))
6445 return 0;
6446 ;
6447 return 0;
6448}
6449_ACEOF
6450rm -f conftest.$ac_objext
6451if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006452 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006453 ac_status=$?
6454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6455 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006456 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006457 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6458 (eval $ac_try) 2>&5
6459 ac_status=$?
6460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6461 (exit $ac_status); }; }; then
6462 ac_cv_type_void_p=yes
6463else
6464 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006465sed 's/^/| /' conftest.$ac_ext >&5
6466
Martin v. Löwis11437992002-04-12 09:54:03 +00006467ac_cv_type_void_p=no
6468fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006469rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006470fi
6471echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
6472echo "${ECHO_T}$ac_cv_type_void_p" >&6
6473
6474echo "$as_me:$LINENO: checking size of void *" >&5
6475echo $ECHO_N "checking size of void *... $ECHO_C" >&6
6476if test "${ac_cv_sizeof_void_p+set}" = set; then
6477 echo $ECHO_N "(cached) $ECHO_C" >&6
6478else
6479 if test "$ac_cv_type_void_p" = yes; then
6480 # The cast to unsigned long works around a bug in the HP C Compiler
6481 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6482 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6483 # This bug is HP SR number 8606223364.
6484 if test "$cross_compiling" = yes; then
6485 # Depending upon the size, compute the lo and hi bounds.
6486cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006487#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006488/* confdefs.h. */
6489_ACEOF
6490cat confdefs.h >>conftest.$ac_ext
6491cat >>conftest.$ac_ext <<_ACEOF
6492/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006493$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006494int
6495main ()
6496{
6497static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= 0)];
6498test_array [0] = 0
6499
6500 ;
6501 return 0;
6502}
6503_ACEOF
6504rm -f conftest.$ac_objext
6505if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006506 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006507 ac_status=$?
6508 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6509 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006510 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006511 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6512 (eval $ac_try) 2>&5
6513 ac_status=$?
6514 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6515 (exit $ac_status); }; }; then
6516 ac_lo=0 ac_mid=0
6517 while :; do
6518 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006519#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006520/* confdefs.h. */
6521_ACEOF
6522cat confdefs.h >>conftest.$ac_ext
6523cat >>conftest.$ac_ext <<_ACEOF
6524/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006525$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006526int
6527main ()
6528{
6529static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6530test_array [0] = 0
6531
6532 ;
6533 return 0;
6534}
6535_ACEOF
6536rm -f conftest.$ac_objext
6537if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006538 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006539 ac_status=$?
6540 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6541 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006542 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006543 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6544 (eval $ac_try) 2>&5
6545 ac_status=$?
6546 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6547 (exit $ac_status); }; }; then
6548 ac_hi=$ac_mid; break
6549else
6550 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006551sed 's/^/| /' conftest.$ac_ext >&5
6552
Martin v. Löwis11437992002-04-12 09:54:03 +00006553ac_lo=`expr $ac_mid + 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006554 if test $ac_lo -le $ac_mid; then
6555 ac_lo= ac_hi=
6556 break
6557 fi
6558 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006559fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006560rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006561 done
6562else
6563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006564sed 's/^/| /' conftest.$ac_ext >&5
6565
Martin v. Löwis11437992002-04-12 09:54:03 +00006566cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006567#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006568/* confdefs.h. */
6569_ACEOF
6570cat confdefs.h >>conftest.$ac_ext
6571cat >>conftest.$ac_ext <<_ACEOF
6572/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006573$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006574int
6575main ()
6576{
6577static int test_array [1 - 2 * !(((long) (sizeof (void *))) < 0)];
6578test_array [0] = 0
6579
6580 ;
6581 return 0;
6582}
6583_ACEOF
6584rm -f conftest.$ac_objext
6585if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006586 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006587 ac_status=$?
6588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6589 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006590 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006591 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6592 (eval $ac_try) 2>&5
6593 ac_status=$?
6594 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6595 (exit $ac_status); }; }; then
6596 ac_hi=-1 ac_mid=-1
6597 while :; do
6598 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006599#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006600/* confdefs.h. */
6601_ACEOF
6602cat confdefs.h >>conftest.$ac_ext
6603cat >>conftest.$ac_ext <<_ACEOF
6604/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006605$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006606int
6607main ()
6608{
6609static int test_array [1 - 2 * !(((long) (sizeof (void *))) >= $ac_mid)];
6610test_array [0] = 0
6611
6612 ;
6613 return 0;
6614}
6615_ACEOF
6616rm -f conftest.$ac_objext
6617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006618 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006619 ac_status=$?
6620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6621 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006622 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6624 (eval $ac_try) 2>&5
6625 ac_status=$?
6626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6627 (exit $ac_status); }; }; then
6628 ac_lo=$ac_mid; break
6629else
6630 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006631sed 's/^/| /' conftest.$ac_ext >&5
6632
Martin v. Löwis11437992002-04-12 09:54:03 +00006633ac_hi=`expr '(' $ac_mid ')' - 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006634 if test $ac_mid -le $ac_hi; then
6635 ac_lo= ac_hi=
6636 break
6637 fi
6638 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00006639fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006640rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006641 done
6642else
6643 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006644sed 's/^/| /' conftest.$ac_ext >&5
6645
Martin v. Löwis11437992002-04-12 09:54:03 +00006646ac_lo= ac_hi=
6647fi
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 +00006649fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006650rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006651# Binary search between lo and hi bounds.
6652while test "x$ac_lo" != "x$ac_hi"; do
6653 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
6654 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006655#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006656/* confdefs.h. */
6657_ACEOF
6658cat confdefs.h >>conftest.$ac_ext
6659cat >>conftest.$ac_ext <<_ACEOF
6660/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006661$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006662int
6663main ()
6664{
6665static int test_array [1 - 2 * !(((long) (sizeof (void *))) <= $ac_mid)];
6666test_array [0] = 0
6667
6668 ;
6669 return 0;
6670}
6671_ACEOF
6672rm -f conftest.$ac_objext
6673if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006674 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006675 ac_status=$?
6676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6677 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006678 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006679 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6680 (eval $ac_try) 2>&5
6681 ac_status=$?
6682 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6683 (exit $ac_status); }; }; then
6684 ac_hi=$ac_mid
6685else
6686 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006687sed 's/^/| /' conftest.$ac_ext >&5
6688
Martin v. Löwis11437992002-04-12 09:54:03 +00006689ac_lo=`expr '(' $ac_mid ')' + 1`
6690fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006691rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006692done
6693case $ac_lo in
6694?*) ac_cv_sizeof_void_p=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00006695'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6696See \`config.log' for more details." >&5
6697echo "$as_me: error: cannot compute sizeof (void *), 77
6698See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006699 { (exit 1); exit 1; }; } ;;
6700esac
Guido van Rossumad678af1998-10-02 14:42:15 +00006701else
6702 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00006703 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
6704See \`config.log' for more details." >&5
6705echo "$as_me: error: cannot run test program while cross compiling
6706See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006707 { (exit 1); exit 1; }; }
Guido van Rossumad678af1998-10-02 14:42:15 +00006708else
Martin v. Löwis11437992002-04-12 09:54:03 +00006709 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006710#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006711/* confdefs.h. */
6712_ACEOF
6713cat confdefs.h >>conftest.$ac_ext
6714cat >>conftest.$ac_ext <<_ACEOF
6715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006716$ac_includes_default
6717long longval () { return (long) (sizeof (void *)); }
6718unsigned long ulongval () { return (long) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00006719#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006720#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006721int
6722main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00006723{
Martin v. Löwis11437992002-04-12 09:54:03 +00006724
6725 FILE *f = fopen ("conftest.val", "w");
6726 if (! f)
6727 exit (1);
6728 if (((long) (sizeof (void *))) < 0)
6729 {
6730 long i = longval ();
6731 if (i != ((long) (sizeof (void *))))
6732 exit (1);
6733 fprintf (f, "%ld\n", i);
6734 }
6735 else
6736 {
6737 unsigned long i = ulongval ();
6738 if (i != ((long) (sizeof (void *))))
6739 exit (1);
6740 fprintf (f, "%lu\n", i);
6741 }
6742 exit (ferror (f) || fclose (f) != 0);
6743
6744 ;
6745 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00006746}
Martin v. Löwis11437992002-04-12 09:54:03 +00006747_ACEOF
6748rm -f conftest$ac_exeext
6749if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
6750 (eval $ac_link) 2>&5
6751 ac_status=$?
6752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6753 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6754 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6755 (eval $ac_try) 2>&5
6756 ac_status=$?
6757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6758 (exit $ac_status); }; }; then
6759 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00006760else
Martin v. Löwis11437992002-04-12 09:54:03 +00006761 echo "$as_me: program exited with status $ac_status" >&5
6762echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006763sed 's/^/| /' conftest.$ac_ext >&5
6764
Martin v. Löwis11437992002-04-12 09:54:03 +00006765( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00006766{ { echo "$as_me:$LINENO: error: cannot compute sizeof (void *), 77
6767See \`config.log' for more details." >&5
6768echo "$as_me: error: cannot compute sizeof (void *), 77
6769See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00006770 { (exit 1); exit 1; }; }
6771fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006772rm -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 +00006773fi
6774fi
6775rm -f conftest.val
6776else
Guido van Rossumad678af1998-10-02 14:42:15 +00006777 ac_cv_sizeof_void_p=0
6778fi
Guido van Rossumad678af1998-10-02 14:42:15 +00006779fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006780echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
6781echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6
6782cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006783#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00006784_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00006785
6786
Martin v. Löwis11437992002-04-12 09:54:03 +00006787echo "$as_me:$LINENO: checking for short" >&5
6788echo $ECHO_N "checking for short... $ECHO_C" >&6
6789if test "${ac_cv_type_short+set}" = set; then
6790 echo $ECHO_N "(cached) $ECHO_C" >&6
6791else
6792 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006793#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006794/* confdefs.h. */
6795_ACEOF
6796cat confdefs.h >>conftest.$ac_ext
6797cat >>conftest.$ac_ext <<_ACEOF
6798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006799$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006800int
6801main ()
6802{
6803if ((short *) 0)
6804 return 0;
6805if (sizeof (short))
6806 return 0;
6807 ;
6808 return 0;
6809}
6810_ACEOF
6811rm -f conftest.$ac_objext
6812if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006813 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006814 ac_status=$?
6815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6816 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006817 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006818 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6819 (eval $ac_try) 2>&5
6820 ac_status=$?
6821 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6822 (exit $ac_status); }; }; then
6823 ac_cv_type_short=yes
6824else
6825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006826sed 's/^/| /' conftest.$ac_ext >&5
6827
Martin v. Löwis11437992002-04-12 09:54:03 +00006828ac_cv_type_short=no
6829fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006830rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006831fi
6832echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
6833echo "${ECHO_T}$ac_cv_type_short" >&6
6834
6835echo "$as_me:$LINENO: checking size of short" >&5
6836echo $ECHO_N "checking size of short... $ECHO_C" >&6
6837if test "${ac_cv_sizeof_short+set}" = set; then
6838 echo $ECHO_N "(cached) $ECHO_C" >&6
6839else
6840 if test "$ac_cv_type_short" = yes; then
6841 # The cast to unsigned long works around a bug in the HP C Compiler
6842 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6843 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6844 # This bug is HP SR number 8606223364.
6845 if test "$cross_compiling" = yes; then
6846 # Depending upon the size, compute the lo and hi bounds.
6847cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006848#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006849/* confdefs.h. */
6850_ACEOF
6851cat confdefs.h >>conftest.$ac_ext
6852cat >>conftest.$ac_ext <<_ACEOF
6853/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006854$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006855int
6856main ()
6857{
6858static int test_array [1 - 2 * !(((long) (sizeof (short))) >= 0)];
6859test_array [0] = 0
6860
6861 ;
6862 return 0;
6863}
6864_ACEOF
6865rm -f conftest.$ac_objext
6866if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006867 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006868 ac_status=$?
6869 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6870 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006871 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006872 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6873 (eval $ac_try) 2>&5
6874 ac_status=$?
6875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6876 (exit $ac_status); }; }; then
6877 ac_lo=0 ac_mid=0
6878 while :; do
6879 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006880#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006881/* confdefs.h. */
6882_ACEOF
6883cat confdefs.h >>conftest.$ac_ext
6884cat >>conftest.$ac_ext <<_ACEOF
6885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006886$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006887int
6888main ()
6889{
6890static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
6891test_array [0] = 0
6892
6893 ;
6894 return 0;
6895}
6896_ACEOF
6897rm -f conftest.$ac_objext
6898if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006899 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006900 ac_status=$?
6901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6902 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006903 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006904 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6905 (eval $ac_try) 2>&5
6906 ac_status=$?
6907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6908 (exit $ac_status); }; }; then
6909 ac_hi=$ac_mid; break
6910else
6911 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006912sed 's/^/| /' conftest.$ac_ext >&5
6913
Martin v. Löwis11437992002-04-12 09:54:03 +00006914ac_lo=`expr $ac_mid + 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006915 if test $ac_lo -le $ac_mid; then
6916 ac_lo= ac_hi=
6917 break
6918 fi
6919 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00006920fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006921rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006922 done
6923else
6924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006925sed 's/^/| /' conftest.$ac_ext >&5
6926
Martin v. Löwis11437992002-04-12 09:54:03 +00006927cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006928#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006929/* confdefs.h. */
6930_ACEOF
6931cat confdefs.h >>conftest.$ac_ext
6932cat >>conftest.$ac_ext <<_ACEOF
6933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006934$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006935int
6936main ()
6937{
6938static int test_array [1 - 2 * !(((long) (sizeof (short))) < 0)];
6939test_array [0] = 0
6940
6941 ;
6942 return 0;
6943}
6944_ACEOF
6945rm -f conftest.$ac_objext
6946if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006947 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006948 ac_status=$?
6949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6950 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006951 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006952 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6953 (eval $ac_try) 2>&5
6954 ac_status=$?
6955 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6956 (exit $ac_status); }; }; then
6957 ac_hi=-1 ac_mid=-1
6958 while :; do
6959 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006960#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00006961/* confdefs.h. */
6962_ACEOF
6963cat confdefs.h >>conftest.$ac_ext
6964cat >>conftest.$ac_ext <<_ACEOF
6965/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006966$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00006967int
6968main ()
6969{
6970static int test_array [1 - 2 * !(((long) (sizeof (short))) >= $ac_mid)];
6971test_array [0] = 0
6972
6973 ;
6974 return 0;
6975}
6976_ACEOF
6977rm -f conftest.$ac_objext
6978if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006979 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006980 ac_status=$?
6981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6982 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006983 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00006984 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
6985 (eval $ac_try) 2>&5
6986 ac_status=$?
6987 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6988 (exit $ac_status); }; }; then
6989 ac_lo=$ac_mid; break
6990else
6991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006992sed 's/^/| /' conftest.$ac_ext >&5
6993
Martin v. Löwis11437992002-04-12 09:54:03 +00006994ac_hi=`expr '(' $ac_mid ')' - 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006995 if test $ac_mid -le $ac_hi; then
6996 ac_lo= ac_hi=
6997 break
6998 fi
6999 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007000fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007001rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007002 done
7003else
7004 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007005sed 's/^/| /' conftest.$ac_ext >&5
7006
Martin v. Löwis11437992002-04-12 09:54:03 +00007007ac_lo= ac_hi=
7008fi
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 +00007010fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007011rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007012# Binary search between lo and hi bounds.
7013while test "x$ac_lo" != "x$ac_hi"; do
7014 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7015 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007016#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007017/* confdefs.h. */
7018_ACEOF
7019cat confdefs.h >>conftest.$ac_ext
7020cat >>conftest.$ac_ext <<_ACEOF
7021/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007022$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007023int
7024main ()
7025{
7026static int test_array [1 - 2 * !(((long) (sizeof (short))) <= $ac_mid)];
7027test_array [0] = 0
7028
7029 ;
7030 return 0;
7031}
7032_ACEOF
7033rm -f conftest.$ac_objext
7034if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007035 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007036 ac_status=$?
7037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7038 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007039 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007040 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7041 (eval $ac_try) 2>&5
7042 ac_status=$?
7043 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7044 (exit $ac_status); }; }; then
7045 ac_hi=$ac_mid
7046else
7047 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007048sed 's/^/| /' conftest.$ac_ext >&5
7049
Martin v. Löwis11437992002-04-12 09:54:03 +00007050ac_lo=`expr '(' $ac_mid ')' + 1`
7051fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007052rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007053done
7054case $ac_lo in
7055?*) ac_cv_sizeof_short=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007056'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7057See \`config.log' for more details." >&5
7058echo "$as_me: error: cannot compute sizeof (short), 77
7059See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007060 { (exit 1); exit 1; }; } ;;
7061esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007062else
7063 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007064 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7065See \`config.log' for more details." >&5
7066echo "$as_me: error: cannot run test program while cross compiling
7067See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007068 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007069else
Martin v. Löwis11437992002-04-12 09:54:03 +00007070 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007071#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007072/* confdefs.h. */
7073_ACEOF
7074cat confdefs.h >>conftest.$ac_ext
7075cat >>conftest.$ac_ext <<_ACEOF
7076/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007077$ac_includes_default
7078long longval () { return (long) (sizeof (short)); }
7079unsigned long ulongval () { return (long) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007080#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007081#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007082int
7083main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007084{
Martin v. Löwis11437992002-04-12 09:54:03 +00007085
7086 FILE *f = fopen ("conftest.val", "w");
7087 if (! f)
7088 exit (1);
7089 if (((long) (sizeof (short))) < 0)
7090 {
7091 long i = longval ();
7092 if (i != ((long) (sizeof (short))))
7093 exit (1);
7094 fprintf (f, "%ld\n", i);
7095 }
7096 else
7097 {
7098 unsigned long i = ulongval ();
7099 if (i != ((long) (sizeof (short))))
7100 exit (1);
7101 fprintf (f, "%lu\n", i);
7102 }
7103 exit (ferror (f) || fclose (f) != 0);
7104
7105 ;
7106 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007107}
Martin v. Löwis11437992002-04-12 09:54:03 +00007108_ACEOF
7109rm -f conftest$ac_exeext
7110if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7111 (eval $ac_link) 2>&5
7112 ac_status=$?
7113 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7114 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7115 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7116 (eval $ac_try) 2>&5
7117 ac_status=$?
7118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7119 (exit $ac_status); }; }; then
7120 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007121else
Martin v. Löwis11437992002-04-12 09:54:03 +00007122 echo "$as_me: program exited with status $ac_status" >&5
7123echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007124sed 's/^/| /' conftest.$ac_ext >&5
7125
Martin v. Löwis11437992002-04-12 09:54:03 +00007126( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007127{ { echo "$as_me:$LINENO: error: cannot compute sizeof (short), 77
7128See \`config.log' for more details." >&5
7129echo "$as_me: error: cannot compute sizeof (short), 77
7130See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007131 { (exit 1); exit 1; }; }
7132fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007133rm -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 +00007134fi
7135fi
7136rm -f conftest.val
7137else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007138 ac_cv_sizeof_short=0
7139fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007140fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007141echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
7142echo "${ECHO_T}$ac_cv_sizeof_short" >&6
7143cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007144#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00007145_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007146
7147
Martin v. Löwis11437992002-04-12 09:54:03 +00007148echo "$as_me:$LINENO: checking for float" >&5
7149echo $ECHO_N "checking for float... $ECHO_C" >&6
7150if test "${ac_cv_type_float+set}" = set; then
7151 echo $ECHO_N "(cached) $ECHO_C" >&6
7152else
7153 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007154#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007155/* confdefs.h. */
7156_ACEOF
7157cat confdefs.h >>conftest.$ac_ext
7158cat >>conftest.$ac_ext <<_ACEOF
7159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007160$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007161int
7162main ()
7163{
7164if ((float *) 0)
7165 return 0;
7166if (sizeof (float))
7167 return 0;
7168 ;
7169 return 0;
7170}
7171_ACEOF
7172rm -f conftest.$ac_objext
7173if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007174 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007175 ac_status=$?
7176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7177 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007178 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007179 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7180 (eval $ac_try) 2>&5
7181 ac_status=$?
7182 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7183 (exit $ac_status); }; }; then
7184 ac_cv_type_float=yes
7185else
7186 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007187sed 's/^/| /' conftest.$ac_ext >&5
7188
Martin v. Löwis11437992002-04-12 09:54:03 +00007189ac_cv_type_float=no
7190fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007191rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007192fi
7193echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
7194echo "${ECHO_T}$ac_cv_type_float" >&6
7195
7196echo "$as_me:$LINENO: checking size of float" >&5
7197echo $ECHO_N "checking size of float... $ECHO_C" >&6
7198if test "${ac_cv_sizeof_float+set}" = set; then
7199 echo $ECHO_N "(cached) $ECHO_C" >&6
7200else
7201 if test "$ac_cv_type_float" = yes; then
7202 # The cast to unsigned long works around a bug in the HP C Compiler
7203 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7204 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7205 # This bug is HP SR number 8606223364.
7206 if test "$cross_compiling" = yes; then
7207 # Depending upon the size, compute the lo and hi bounds.
7208cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007209#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007210/* confdefs.h. */
7211_ACEOF
7212cat confdefs.h >>conftest.$ac_ext
7213cat >>conftest.$ac_ext <<_ACEOF
7214/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007215$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007216int
7217main ()
7218{
7219static int test_array [1 - 2 * !(((long) (sizeof (float))) >= 0)];
7220test_array [0] = 0
7221
7222 ;
7223 return 0;
7224}
7225_ACEOF
7226rm -f conftest.$ac_objext
7227if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007228 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007229 ac_status=$?
7230 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7231 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007232 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007233 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7234 (eval $ac_try) 2>&5
7235 ac_status=$?
7236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7237 (exit $ac_status); }; }; then
7238 ac_lo=0 ac_mid=0
7239 while :; do
7240 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007241#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007242/* confdefs.h. */
7243_ACEOF
7244cat confdefs.h >>conftest.$ac_ext
7245cat >>conftest.$ac_ext <<_ACEOF
7246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007247$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007248int
7249main ()
7250{
7251static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7252test_array [0] = 0
7253
7254 ;
7255 return 0;
7256}
7257_ACEOF
7258rm -f conftest.$ac_objext
7259if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007260 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007261 ac_status=$?
7262 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7263 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007264 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007265 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7266 (eval $ac_try) 2>&5
7267 ac_status=$?
7268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7269 (exit $ac_status); }; }; then
7270 ac_hi=$ac_mid; break
7271else
7272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007273sed 's/^/| /' conftest.$ac_ext >&5
7274
Martin v. Löwis11437992002-04-12 09:54:03 +00007275ac_lo=`expr $ac_mid + 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007276 if test $ac_lo -le $ac_mid; then
7277 ac_lo= ac_hi=
7278 break
7279 fi
7280 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007281fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007282rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007283 done
7284else
7285 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007286sed 's/^/| /' conftest.$ac_ext >&5
7287
Martin v. Löwis11437992002-04-12 09:54:03 +00007288cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007289#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007290/* confdefs.h. */
7291_ACEOF
7292cat confdefs.h >>conftest.$ac_ext
7293cat >>conftest.$ac_ext <<_ACEOF
7294/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007295$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007296int
7297main ()
7298{
7299static int test_array [1 - 2 * !(((long) (sizeof (float))) < 0)];
7300test_array [0] = 0
7301
7302 ;
7303 return 0;
7304}
7305_ACEOF
7306rm -f conftest.$ac_objext
7307if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007308 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007309 ac_status=$?
7310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7311 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007312 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007313 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7314 (eval $ac_try) 2>&5
7315 ac_status=$?
7316 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7317 (exit $ac_status); }; }; then
7318 ac_hi=-1 ac_mid=-1
7319 while :; do
7320 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007321#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007322/* confdefs.h. */
7323_ACEOF
7324cat confdefs.h >>conftest.$ac_ext
7325cat >>conftest.$ac_ext <<_ACEOF
7326/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007327$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007328int
7329main ()
7330{
7331static int test_array [1 - 2 * !(((long) (sizeof (float))) >= $ac_mid)];
7332test_array [0] = 0
7333
7334 ;
7335 return 0;
7336}
7337_ACEOF
7338rm -f conftest.$ac_objext
7339if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007340 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007341 ac_status=$?
7342 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7343 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007344 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007345 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7346 (eval $ac_try) 2>&5
7347 ac_status=$?
7348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7349 (exit $ac_status); }; }; then
7350 ac_lo=$ac_mid; break
7351else
7352 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007353sed 's/^/| /' conftest.$ac_ext >&5
7354
Martin v. Löwis11437992002-04-12 09:54:03 +00007355ac_hi=`expr '(' $ac_mid ')' - 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007356 if test $ac_mid -le $ac_hi; then
7357 ac_lo= ac_hi=
7358 break
7359 fi
7360 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007361fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007362rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007363 done
7364else
7365 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007366sed 's/^/| /' conftest.$ac_ext >&5
7367
Martin v. Löwis11437992002-04-12 09:54:03 +00007368ac_lo= ac_hi=
7369fi
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 +00007371fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007372rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007373# Binary search between lo and hi bounds.
7374while test "x$ac_lo" != "x$ac_hi"; do
7375 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7376 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007377#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007378/* confdefs.h. */
7379_ACEOF
7380cat confdefs.h >>conftest.$ac_ext
7381cat >>conftest.$ac_ext <<_ACEOF
7382/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007383$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007384int
7385main ()
7386{
7387static int test_array [1 - 2 * !(((long) (sizeof (float))) <= $ac_mid)];
7388test_array [0] = 0
7389
7390 ;
7391 return 0;
7392}
7393_ACEOF
7394rm -f conftest.$ac_objext
7395if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007396 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007397 ac_status=$?
7398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7399 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007400 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007401 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7402 (eval $ac_try) 2>&5
7403 ac_status=$?
7404 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7405 (exit $ac_status); }; }; then
7406 ac_hi=$ac_mid
7407else
7408 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007409sed 's/^/| /' conftest.$ac_ext >&5
7410
Martin v. Löwis11437992002-04-12 09:54:03 +00007411ac_lo=`expr '(' $ac_mid ')' + 1`
7412fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007413rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007414done
7415case $ac_lo in
7416?*) ac_cv_sizeof_float=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007417'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7418See \`config.log' for more details." >&5
7419echo "$as_me: error: cannot compute sizeof (float), 77
7420See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007421 { (exit 1); exit 1; }; } ;;
7422esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007423else
7424 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007425 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7426See \`config.log' for more details." >&5
7427echo "$as_me: error: cannot run test program while cross compiling
7428See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007429 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007430else
Martin v. Löwis11437992002-04-12 09:54:03 +00007431 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007432#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007433/* confdefs.h. */
7434_ACEOF
7435cat confdefs.h >>conftest.$ac_ext
7436cat >>conftest.$ac_ext <<_ACEOF
7437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007438$ac_includes_default
7439long longval () { return (long) (sizeof (float)); }
7440unsigned long ulongval () { return (long) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007441#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007442#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007443int
7444main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007445{
Martin v. Löwis11437992002-04-12 09:54:03 +00007446
7447 FILE *f = fopen ("conftest.val", "w");
7448 if (! f)
7449 exit (1);
7450 if (((long) (sizeof (float))) < 0)
7451 {
7452 long i = longval ();
7453 if (i != ((long) (sizeof (float))))
7454 exit (1);
7455 fprintf (f, "%ld\n", i);
7456 }
7457 else
7458 {
7459 unsigned long i = ulongval ();
7460 if (i != ((long) (sizeof (float))))
7461 exit (1);
7462 fprintf (f, "%lu\n", i);
7463 }
7464 exit (ferror (f) || fclose (f) != 0);
7465
7466 ;
7467 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007468}
Martin v. Löwis11437992002-04-12 09:54:03 +00007469_ACEOF
7470rm -f conftest$ac_exeext
7471if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7472 (eval $ac_link) 2>&5
7473 ac_status=$?
7474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7475 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7476 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7477 (eval $ac_try) 2>&5
7478 ac_status=$?
7479 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7480 (exit $ac_status); }; }; then
7481 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007482else
Martin v. Löwis11437992002-04-12 09:54:03 +00007483 echo "$as_me: program exited with status $ac_status" >&5
7484echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007485sed 's/^/| /' conftest.$ac_ext >&5
7486
Martin v. Löwis11437992002-04-12 09:54:03 +00007487( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007488{ { echo "$as_me:$LINENO: error: cannot compute sizeof (float), 77
7489See \`config.log' for more details." >&5
7490echo "$as_me: error: cannot compute sizeof (float), 77
7491See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007492 { (exit 1); exit 1; }; }
7493fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007494rm -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 +00007495fi
7496fi
7497rm -f conftest.val
7498else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007499 ac_cv_sizeof_float=0
7500fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007501fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007502echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
7503echo "${ECHO_T}$ac_cv_sizeof_float" >&6
7504cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007505#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00007506_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007507
7508
Martin v. Löwis11437992002-04-12 09:54:03 +00007509echo "$as_me:$LINENO: checking for double" >&5
7510echo $ECHO_N "checking for double... $ECHO_C" >&6
7511if test "${ac_cv_type_double+set}" = set; then
7512 echo $ECHO_N "(cached) $ECHO_C" >&6
7513else
7514 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007515#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007516/* confdefs.h. */
7517_ACEOF
7518cat confdefs.h >>conftest.$ac_ext
7519cat >>conftest.$ac_ext <<_ACEOF
7520/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007521$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007522int
7523main ()
7524{
7525if ((double *) 0)
7526 return 0;
7527if (sizeof (double))
7528 return 0;
7529 ;
7530 return 0;
7531}
7532_ACEOF
7533rm -f conftest.$ac_objext
7534if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007535 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007536 ac_status=$?
7537 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7538 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007539 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007540 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7541 (eval $ac_try) 2>&5
7542 ac_status=$?
7543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7544 (exit $ac_status); }; }; then
7545 ac_cv_type_double=yes
7546else
7547 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007548sed 's/^/| /' conftest.$ac_ext >&5
7549
Martin v. Löwis11437992002-04-12 09:54:03 +00007550ac_cv_type_double=no
7551fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007552rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007553fi
7554echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
7555echo "${ECHO_T}$ac_cv_type_double" >&6
7556
7557echo "$as_me:$LINENO: checking size of double" >&5
7558echo $ECHO_N "checking size of double... $ECHO_C" >&6
7559if test "${ac_cv_sizeof_double+set}" = set; then
7560 echo $ECHO_N "(cached) $ECHO_C" >&6
7561else
7562 if test "$ac_cv_type_double" = yes; then
7563 # The cast to unsigned long works around a bug in the HP C Compiler
7564 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7565 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7566 # This bug is HP SR number 8606223364.
7567 if test "$cross_compiling" = yes; then
7568 # Depending upon the size, compute the lo and hi bounds.
7569cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007570#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007571/* confdefs.h. */
7572_ACEOF
7573cat confdefs.h >>conftest.$ac_ext
7574cat >>conftest.$ac_ext <<_ACEOF
7575/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007576$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007577int
7578main ()
7579{
7580static int test_array [1 - 2 * !(((long) (sizeof (double))) >= 0)];
7581test_array [0] = 0
7582
7583 ;
7584 return 0;
7585}
7586_ACEOF
7587rm -f conftest.$ac_objext
7588if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007589 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007590 ac_status=$?
7591 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7592 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007593 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007594 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7595 (eval $ac_try) 2>&5
7596 ac_status=$?
7597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7598 (exit $ac_status); }; }; then
7599 ac_lo=0 ac_mid=0
7600 while :; do
7601 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007602#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007603/* confdefs.h. */
7604_ACEOF
7605cat confdefs.h >>conftest.$ac_ext
7606cat >>conftest.$ac_ext <<_ACEOF
7607/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007608$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007609int
7610main ()
7611{
7612static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7613test_array [0] = 0
7614
7615 ;
7616 return 0;
7617}
7618_ACEOF
7619rm -f conftest.$ac_objext
7620if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007621 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007622 ac_status=$?
7623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7624 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007625 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007626 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7627 (eval $ac_try) 2>&5
7628 ac_status=$?
7629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7630 (exit $ac_status); }; }; then
7631 ac_hi=$ac_mid; break
7632else
7633 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007634sed 's/^/| /' conftest.$ac_ext >&5
7635
Martin v. Löwis11437992002-04-12 09:54:03 +00007636ac_lo=`expr $ac_mid + 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007637 if test $ac_lo -le $ac_mid; then
7638 ac_lo= ac_hi=
7639 break
7640 fi
7641 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007642fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007643rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007644 done
7645else
7646 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007647sed 's/^/| /' conftest.$ac_ext >&5
7648
Martin v. Löwis11437992002-04-12 09:54:03 +00007649cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007650#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007651/* confdefs.h. */
7652_ACEOF
7653cat confdefs.h >>conftest.$ac_ext
7654cat >>conftest.$ac_ext <<_ACEOF
7655/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007656$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007657int
7658main ()
7659{
7660static int test_array [1 - 2 * !(((long) (sizeof (double))) < 0)];
7661test_array [0] = 0
7662
7663 ;
7664 return 0;
7665}
7666_ACEOF
7667rm -f conftest.$ac_objext
7668if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007669 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007670 ac_status=$?
7671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7672 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007673 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007674 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7675 (eval $ac_try) 2>&5
7676 ac_status=$?
7677 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7678 (exit $ac_status); }; }; then
7679 ac_hi=-1 ac_mid=-1
7680 while :; do
7681 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007682#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007683/* confdefs.h. */
7684_ACEOF
7685cat confdefs.h >>conftest.$ac_ext
7686cat >>conftest.$ac_ext <<_ACEOF
7687/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007688$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007689int
7690main ()
7691{
7692static int test_array [1 - 2 * !(((long) (sizeof (double))) >= $ac_mid)];
7693test_array [0] = 0
7694
7695 ;
7696 return 0;
7697}
7698_ACEOF
7699rm -f conftest.$ac_objext
7700if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007701 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007702 ac_status=$?
7703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7704 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007705 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007706 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7707 (eval $ac_try) 2>&5
7708 ac_status=$?
7709 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7710 (exit $ac_status); }; }; then
7711 ac_lo=$ac_mid; break
7712else
7713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007714sed 's/^/| /' conftest.$ac_ext >&5
7715
Martin v. Löwis11437992002-04-12 09:54:03 +00007716ac_hi=`expr '(' $ac_mid ')' - 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007717 if test $ac_mid -le $ac_hi; then
7718 ac_lo= ac_hi=
7719 break
7720 fi
7721 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007722fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007723rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007724 done
7725else
7726 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007727sed 's/^/| /' conftest.$ac_ext >&5
7728
Martin v. Löwis11437992002-04-12 09:54:03 +00007729ac_lo= ac_hi=
7730fi
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 +00007732fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007733rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007734# Binary search between lo and hi bounds.
7735while test "x$ac_lo" != "x$ac_hi"; do
7736 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7737 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007738#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007739/* confdefs.h. */
7740_ACEOF
7741cat confdefs.h >>conftest.$ac_ext
7742cat >>conftest.$ac_ext <<_ACEOF
7743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007744$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007745int
7746main ()
7747{
7748static int test_array [1 - 2 * !(((long) (sizeof (double))) <= $ac_mid)];
7749test_array [0] = 0
7750
7751 ;
7752 return 0;
7753}
7754_ACEOF
7755rm -f conftest.$ac_objext
7756if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007757 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007758 ac_status=$?
7759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7760 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007761 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007762 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7763 (eval $ac_try) 2>&5
7764 ac_status=$?
7765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7766 (exit $ac_status); }; }; then
7767 ac_hi=$ac_mid
7768else
7769 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007770sed 's/^/| /' conftest.$ac_ext >&5
7771
Martin v. Löwis11437992002-04-12 09:54:03 +00007772ac_lo=`expr '(' $ac_mid ')' + 1`
7773fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007774rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007775done
7776case $ac_lo in
7777?*) ac_cv_sizeof_double=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00007778'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7779See \`config.log' for more details." >&5
7780echo "$as_me: error: cannot compute sizeof (double), 77
7781See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007782 { (exit 1); exit 1; }; } ;;
7783esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00007784else
7785 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00007786 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
7787See \`config.log' for more details." >&5
7788echo "$as_me: error: cannot run test program while cross compiling
7789See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007790 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +00007791else
Martin v. Löwis11437992002-04-12 09:54:03 +00007792 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007793#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007794/* confdefs.h. */
7795_ACEOF
7796cat confdefs.h >>conftest.$ac_ext
7797cat >>conftest.$ac_ext <<_ACEOF
7798/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007799$ac_includes_default
7800long longval () { return (long) (sizeof (double)); }
7801unsigned long ulongval () { return (long) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007802#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007803#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007804int
7805main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00007806{
Martin v. Löwis11437992002-04-12 09:54:03 +00007807
7808 FILE *f = fopen ("conftest.val", "w");
7809 if (! f)
7810 exit (1);
7811 if (((long) (sizeof (double))) < 0)
7812 {
7813 long i = longval ();
7814 if (i != ((long) (sizeof (double))))
7815 exit (1);
7816 fprintf (f, "%ld\n", i);
7817 }
7818 else
7819 {
7820 unsigned long i = ulongval ();
7821 if (i != ((long) (sizeof (double))))
7822 exit (1);
7823 fprintf (f, "%lu\n", i);
7824 }
7825 exit (ferror (f) || fclose (f) != 0);
7826
7827 ;
7828 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00007829}
Martin v. Löwis11437992002-04-12 09:54:03 +00007830_ACEOF
7831rm -f conftest$ac_exeext
7832if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
7833 (eval $ac_link) 2>&5
7834 ac_status=$?
7835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7836 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7837 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7838 (eval $ac_try) 2>&5
7839 ac_status=$?
7840 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7841 (exit $ac_status); }; }; then
7842 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00007843else
Martin v. Löwis11437992002-04-12 09:54:03 +00007844 echo "$as_me: program exited with status $ac_status" >&5
7845echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007846sed 's/^/| /' conftest.$ac_ext >&5
7847
Martin v. Löwis11437992002-04-12 09:54:03 +00007848( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00007849{ { echo "$as_me:$LINENO: error: cannot compute sizeof (double), 77
7850See \`config.log' for more details." >&5
7851echo "$as_me: error: cannot compute sizeof (double), 77
7852See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00007853 { (exit 1); exit 1; }; }
7854fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007855rm -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 +00007856fi
7857fi
7858rm -f conftest.val
7859else
Guido van Rossumef2255b2000-03-10 22:30:29 +00007860 ac_cv_sizeof_double=0
7861fi
Guido van Rossumef2255b2000-03-10 22:30:29 +00007862fi
Martin v. Löwis11437992002-04-12 09:54:03 +00007863echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
7864echo "${ECHO_T}$ac_cv_sizeof_double" >&6
7865cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007866#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00007867_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00007868
7869
Martin v. Löwis11437992002-04-12 09:54:03 +00007870echo "$as_me:$LINENO: checking for fpos_t" >&5
7871echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6
7872if test "${ac_cv_type_fpos_t+set}" = set; then
7873 echo $ECHO_N "(cached) $ECHO_C" >&6
7874else
7875 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007876#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007877/* confdefs.h. */
7878_ACEOF
7879cat confdefs.h >>conftest.$ac_ext
7880cat >>conftest.$ac_ext <<_ACEOF
7881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007882$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007883int
7884main ()
7885{
7886if ((fpos_t *) 0)
7887 return 0;
7888if (sizeof (fpos_t))
7889 return 0;
7890 ;
7891 return 0;
7892}
7893_ACEOF
7894rm -f conftest.$ac_objext
7895if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007896 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007897 ac_status=$?
7898 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7899 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007900 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007901 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7902 (eval $ac_try) 2>&5
7903 ac_status=$?
7904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7905 (exit $ac_status); }; }; then
7906 ac_cv_type_fpos_t=yes
7907else
7908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007909sed 's/^/| /' conftest.$ac_ext >&5
7910
Martin v. Löwis11437992002-04-12 09:54:03 +00007911ac_cv_type_fpos_t=no
7912fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007913rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007914fi
7915echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
7916echo "${ECHO_T}$ac_cv_type_fpos_t" >&6
7917
7918echo "$as_me:$LINENO: checking size of fpos_t" >&5
7919echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6
7920if test "${ac_cv_sizeof_fpos_t+set}" = set; then
7921 echo $ECHO_N "(cached) $ECHO_C" >&6
7922else
7923 if test "$ac_cv_type_fpos_t" = yes; then
7924 # The cast to unsigned long works around a bug in the HP C Compiler
7925 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7926 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7927 # This bug is HP SR number 8606223364.
7928 if test "$cross_compiling" = yes; then
7929 # Depending upon the size, compute the lo and hi bounds.
7930cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007931#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007932/* confdefs.h. */
7933_ACEOF
7934cat confdefs.h >>conftest.$ac_ext
7935cat >>conftest.$ac_ext <<_ACEOF
7936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007937$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007938int
7939main ()
7940{
7941static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= 0)];
7942test_array [0] = 0
7943
7944 ;
7945 return 0;
7946}
7947_ACEOF
7948rm -f conftest.$ac_objext
7949if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007950 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007951 ac_status=$?
7952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7953 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007954 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007955 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7956 (eval $ac_try) 2>&5
7957 ac_status=$?
7958 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7959 (exit $ac_status); }; }; then
7960 ac_lo=0 ac_mid=0
7961 while :; do
7962 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007963#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00007964/* confdefs.h. */
7965_ACEOF
7966cat confdefs.h >>conftest.$ac_ext
7967cat >>conftest.$ac_ext <<_ACEOF
7968/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007969$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007970int
7971main ()
7972{
7973static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
7974test_array [0] = 0
7975
7976 ;
7977 return 0;
7978}
7979_ACEOF
7980rm -f conftest.$ac_objext
7981if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007982 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00007983 ac_status=$?
7984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7985 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007986 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00007987 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
7988 (eval $ac_try) 2>&5
7989 ac_status=$?
7990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7991 (exit $ac_status); }; }; then
7992 ac_hi=$ac_mid; break
7993else
7994 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007995sed 's/^/| /' conftest.$ac_ext >&5
7996
Martin v. Löwis11437992002-04-12 09:54:03 +00007997ac_lo=`expr $ac_mid + 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00007998 if test $ac_lo -le $ac_mid; then
7999 ac_lo= ac_hi=
8000 break
8001 fi
8002 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008003fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008004rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008005 done
8006else
8007 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008008sed 's/^/| /' conftest.$ac_ext >&5
8009
Martin v. Löwis11437992002-04-12 09:54:03 +00008010cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008011#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008012/* confdefs.h. */
8013_ACEOF
8014cat confdefs.h >>conftest.$ac_ext
8015cat >>conftest.$ac_ext <<_ACEOF
8016/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008017$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008018int
8019main ()
8020{
8021static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) < 0)];
8022test_array [0] = 0
8023
8024 ;
8025 return 0;
8026}
8027_ACEOF
8028rm -f conftest.$ac_objext
8029if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008030 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008031 ac_status=$?
8032 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8033 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008034 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008035 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8036 (eval $ac_try) 2>&5
8037 ac_status=$?
8038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8039 (exit $ac_status); }; }; then
8040 ac_hi=-1 ac_mid=-1
8041 while :; do
8042 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008043#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008044/* confdefs.h. */
8045_ACEOF
8046cat confdefs.h >>conftest.$ac_ext
8047cat >>conftest.$ac_ext <<_ACEOF
8048/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008049$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008050int
8051main ()
8052{
8053static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) >= $ac_mid)];
8054test_array [0] = 0
8055
8056 ;
8057 return 0;
8058}
8059_ACEOF
8060rm -f conftest.$ac_objext
8061if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008062 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008063 ac_status=$?
8064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8065 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008066 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008067 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8068 (eval $ac_try) 2>&5
8069 ac_status=$?
8070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8071 (exit $ac_status); }; }; then
8072 ac_lo=$ac_mid; break
8073else
8074 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008075sed 's/^/| /' conftest.$ac_ext >&5
8076
Martin v. Löwis11437992002-04-12 09:54:03 +00008077ac_hi=`expr '(' $ac_mid ')' - 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008078 if test $ac_mid -le $ac_hi; then
8079 ac_lo= ac_hi=
8080 break
8081 fi
8082 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008083fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008084rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008085 done
8086else
8087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008088sed 's/^/| /' conftest.$ac_ext >&5
8089
Martin v. Löwis11437992002-04-12 09:54:03 +00008090ac_lo= ac_hi=
8091fi
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 +00008093fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008094rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008095# Binary search between lo and hi bounds.
8096while test "x$ac_lo" != "x$ac_hi"; do
8097 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8098 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008099#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008100/* confdefs.h. */
8101_ACEOF
8102cat confdefs.h >>conftest.$ac_ext
8103cat >>conftest.$ac_ext <<_ACEOF
8104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008105$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008106int
8107main ()
8108{
8109static int test_array [1 - 2 * !(((long) (sizeof (fpos_t))) <= $ac_mid)];
8110test_array [0] = 0
8111
8112 ;
8113 return 0;
8114}
8115_ACEOF
8116rm -f conftest.$ac_objext
8117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008118 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008119 ac_status=$?
8120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8121 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008122 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8124 (eval $ac_try) 2>&5
8125 ac_status=$?
8126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8127 (exit $ac_status); }; }; then
8128 ac_hi=$ac_mid
8129else
8130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008131sed 's/^/| /' conftest.$ac_ext >&5
8132
Martin v. Löwis11437992002-04-12 09:54:03 +00008133ac_lo=`expr '(' $ac_mid ')' + 1`
8134fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008135rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008136done
8137case $ac_lo in
8138?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008139'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8140See \`config.log' for more details." >&5
8141echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8142See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008143 { (exit 1); exit 1; }; } ;;
8144esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008145else
8146 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008147 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8148See \`config.log' for more details." >&5
8149echo "$as_me: error: cannot run test program while cross compiling
8150See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008151 { (exit 1); exit 1; }; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008152else
Martin v. Löwis11437992002-04-12 09:54:03 +00008153 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008154#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008155/* confdefs.h. */
8156_ACEOF
8157cat confdefs.h >>conftest.$ac_ext
8158cat >>conftest.$ac_ext <<_ACEOF
8159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008160$ac_includes_default
8161long longval () { return (long) (sizeof (fpos_t)); }
8162unsigned long ulongval () { return (long) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008163#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008164#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008165int
8166main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008167{
Martin v. Löwis11437992002-04-12 09:54:03 +00008168
8169 FILE *f = fopen ("conftest.val", "w");
8170 if (! f)
8171 exit (1);
8172 if (((long) (sizeof (fpos_t))) < 0)
8173 {
8174 long i = longval ();
8175 if (i != ((long) (sizeof (fpos_t))))
8176 exit (1);
8177 fprintf (f, "%ld\n", i);
8178 }
8179 else
8180 {
8181 unsigned long i = ulongval ();
8182 if (i != ((long) (sizeof (fpos_t))))
8183 exit (1);
8184 fprintf (f, "%lu\n", i);
8185 }
8186 exit (ferror (f) || fclose (f) != 0);
8187
8188 ;
8189 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008190}
Martin v. Löwis11437992002-04-12 09:54:03 +00008191_ACEOF
8192rm -f conftest$ac_exeext
8193if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8194 (eval $ac_link) 2>&5
8195 ac_status=$?
8196 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8197 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8198 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8199 (eval $ac_try) 2>&5
8200 ac_status=$?
8201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8202 (exit $ac_status); }; }; then
8203 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008204else
Martin v. Löwis11437992002-04-12 09:54:03 +00008205 echo "$as_me: program exited with status $ac_status" >&5
8206echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008207sed 's/^/| /' conftest.$ac_ext >&5
8208
Martin v. Löwis11437992002-04-12 09:54:03 +00008209( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008210{ { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t), 77
8211See \`config.log' for more details." >&5
8212echo "$as_me: error: cannot compute sizeof (fpos_t), 77
8213See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008214 { (exit 1); exit 1; }; }
8215fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008216rm -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 +00008217fi
8218fi
8219rm -f conftest.val
8220else
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008221 ac_cv_sizeof_fpos_t=0
8222fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008223fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008224echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
8225echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6
8226cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008227#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +00008228_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00008229
Michael W. Hudson54241132001-12-07 15:38:26 +00008230
8231
Martin v. Löwis11437992002-04-12 09:54:03 +00008232echo "$as_me:$LINENO: checking for long long support" >&5
8233echo $ECHO_N "checking for long long support... $ECHO_C" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008234have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008235cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008236#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008237/* confdefs.h. */
8238_ACEOF
8239cat confdefs.h >>conftest.$ac_ext
8240cat >>conftest.$ac_ext <<_ACEOF
8241/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008242
Martin v. Löwis11437992002-04-12 09:54:03 +00008243int
8244main ()
8245{
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008246long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008247 ;
8248 return 0;
8249}
8250_ACEOF
8251rm -f conftest.$ac_objext
8252if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008253 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008254 ac_status=$?
8255 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8256 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008257 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008258 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8259 (eval $ac_try) 2>&5
8260 ac_status=$?
8261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8262 (exit $ac_status); }; }; then
8263
8264
8265cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008266#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008267_ACEOF
8268
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008269 have_long_long=yes
8270
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008271else
Martin v. Löwis11437992002-04-12 09:54:03 +00008272 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008273sed 's/^/| /' conftest.$ac_ext >&5
8274
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008275fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008276rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008277echo "$as_me:$LINENO: result: $have_long_long" >&5
8278echo "${ECHO_T}$have_long_long" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00008279if test "$have_long_long" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008280echo "$as_me:$LINENO: checking for long long" >&5
8281echo $ECHO_N "checking for long long... $ECHO_C" >&6
8282if test "${ac_cv_type_long_long+set}" = set; then
8283 echo $ECHO_N "(cached) $ECHO_C" >&6
8284else
8285 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008286#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008287/* confdefs.h. */
8288_ACEOF
8289cat confdefs.h >>conftest.$ac_ext
8290cat >>conftest.$ac_ext <<_ACEOF
8291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008292$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008293int
8294main ()
8295{
8296if ((long long *) 0)
8297 return 0;
8298if (sizeof (long long))
8299 return 0;
8300 ;
8301 return 0;
8302}
8303_ACEOF
8304rm -f conftest.$ac_objext
8305if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008306 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008307 ac_status=$?
8308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8309 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008310 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008311 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8312 (eval $ac_try) 2>&5
8313 ac_status=$?
8314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8315 (exit $ac_status); }; }; then
8316 ac_cv_type_long_long=yes
8317else
8318 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008319sed 's/^/| /' conftest.$ac_ext >&5
8320
Martin v. Löwis11437992002-04-12 09:54:03 +00008321ac_cv_type_long_long=no
8322fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008323rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008324fi
8325echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
8326echo "${ECHO_T}$ac_cv_type_long_long" >&6
8327
8328echo "$as_me:$LINENO: checking size of long long" >&5
8329echo $ECHO_N "checking size of long long... $ECHO_C" >&6
8330if test "${ac_cv_sizeof_long_long+set}" = set; then
8331 echo $ECHO_N "(cached) $ECHO_C" >&6
8332else
8333 if test "$ac_cv_type_long_long" = yes; then
8334 # The cast to unsigned long works around a bug in the HP C Compiler
8335 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8336 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8337 # This bug is HP SR number 8606223364.
8338 if test "$cross_compiling" = yes; then
8339 # Depending upon the size, compute the lo and hi bounds.
8340cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008341#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008342/* confdefs.h. */
8343_ACEOF
8344cat confdefs.h >>conftest.$ac_ext
8345cat >>conftest.$ac_ext <<_ACEOF
8346/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008347$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008348int
8349main ()
8350{
8351static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 0)];
8352test_array [0] = 0
8353
8354 ;
8355 return 0;
8356}
8357_ACEOF
8358rm -f conftest.$ac_objext
8359if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008360 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008361 ac_status=$?
8362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8363 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008364 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008365 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8366 (eval $ac_try) 2>&5
8367 ac_status=$?
8368 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8369 (exit $ac_status); }; }; then
8370 ac_lo=0 ac_mid=0
8371 while :; do
8372 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008373#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008374/* confdefs.h. */
8375_ACEOF
8376cat confdefs.h >>conftest.$ac_ext
8377cat >>conftest.$ac_ext <<_ACEOF
8378/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008379$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008380int
8381main ()
8382{
8383static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8384test_array [0] = 0
8385
8386 ;
8387 return 0;
8388}
8389_ACEOF
8390rm -f conftest.$ac_objext
8391if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008392 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008393 ac_status=$?
8394 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8395 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008396 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008397 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8398 (eval $ac_try) 2>&5
8399 ac_status=$?
8400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8401 (exit $ac_status); }; }; then
8402 ac_hi=$ac_mid; break
8403else
8404 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008405sed 's/^/| /' conftest.$ac_ext >&5
8406
Martin v. Löwis11437992002-04-12 09:54:03 +00008407ac_lo=`expr $ac_mid + 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008408 if test $ac_lo -le $ac_mid; then
8409 ac_lo= ac_hi=
8410 break
8411 fi
8412 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008413fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008414rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008415 done
8416else
8417 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008418sed 's/^/| /' conftest.$ac_ext >&5
8419
Martin v. Löwis11437992002-04-12 09:54:03 +00008420cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008421#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008422/* confdefs.h. */
8423_ACEOF
8424cat confdefs.h >>conftest.$ac_ext
8425cat >>conftest.$ac_ext <<_ACEOF
8426/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008427$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008428int
8429main ()
8430{
8431static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 0)];
8432test_array [0] = 0
8433
8434 ;
8435 return 0;
8436}
8437_ACEOF
8438rm -f conftest.$ac_objext
8439if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008440 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008441 ac_status=$?
8442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8443 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008444 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008445 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8446 (eval $ac_try) 2>&5
8447 ac_status=$?
8448 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8449 (exit $ac_status); }; }; then
8450 ac_hi=-1 ac_mid=-1
8451 while :; do
8452 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008453#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008454/* confdefs.h. */
8455_ACEOF
8456cat confdefs.h >>conftest.$ac_ext
8457cat >>conftest.$ac_ext <<_ACEOF
8458/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008459$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008460int
8461main ()
8462{
8463static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $ac_mid)];
8464test_array [0] = 0
8465
8466 ;
8467 return 0;
8468}
8469_ACEOF
8470rm -f conftest.$ac_objext
8471if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008472 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008473 ac_status=$?
8474 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8475 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008476 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008477 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8478 (eval $ac_try) 2>&5
8479 ac_status=$?
8480 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8481 (exit $ac_status); }; }; then
8482 ac_lo=$ac_mid; break
8483else
8484 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008485sed 's/^/| /' conftest.$ac_ext >&5
8486
Martin v. Löwis11437992002-04-12 09:54:03 +00008487ac_hi=`expr '(' $ac_mid ')' - 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008488 if test $ac_mid -le $ac_hi; then
8489 ac_lo= ac_hi=
8490 break
8491 fi
8492 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008493fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008494rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008495 done
8496else
8497 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008498sed 's/^/| /' conftest.$ac_ext >&5
8499
Martin v. Löwis11437992002-04-12 09:54:03 +00008500ac_lo= ac_hi=
8501fi
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 +00008503fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008504rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008505# Binary search between lo and hi bounds.
8506while test "x$ac_lo" != "x$ac_hi"; do
8507 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8508 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008509#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008510/* confdefs.h. */
8511_ACEOF
8512cat confdefs.h >>conftest.$ac_ext
8513cat >>conftest.$ac_ext <<_ACEOF
8514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008515$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008516int
8517main ()
8518{
8519static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $ac_mid)];
8520test_array [0] = 0
8521
8522 ;
8523 return 0;
8524}
8525_ACEOF
8526rm -f conftest.$ac_objext
8527if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008528 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008529 ac_status=$?
8530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8531 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008532 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8534 (eval $ac_try) 2>&5
8535 ac_status=$?
8536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8537 (exit $ac_status); }; }; then
8538 ac_hi=$ac_mid
8539else
8540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008541sed 's/^/| /' conftest.$ac_ext >&5
8542
Martin v. Löwis11437992002-04-12 09:54:03 +00008543ac_lo=`expr '(' $ac_mid ')' + 1`
8544fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008545rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008546done
8547case $ac_lo in
8548?*) ac_cv_sizeof_long_long=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008549'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8550See \`config.log' for more details." >&5
8551echo "$as_me: error: cannot compute sizeof (long long), 77
8552See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008553 { (exit 1); exit 1; }; } ;;
8554esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008555else
8556 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008557 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8558See \`config.log' for more details." >&5
8559echo "$as_me: error: cannot run test program while cross compiling
8560See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008561 { (exit 1); exit 1; }; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008562else
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008564#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008565/* confdefs.h. */
8566_ACEOF
8567cat confdefs.h >>conftest.$ac_ext
8568cat >>conftest.$ac_ext <<_ACEOF
8569/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008570$ac_includes_default
8571long longval () { return (long) (sizeof (long long)); }
8572unsigned long ulongval () { return (long) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008573#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008574#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008575int
8576main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008577{
Martin v. Löwis11437992002-04-12 09:54:03 +00008578
8579 FILE *f = fopen ("conftest.val", "w");
8580 if (! f)
8581 exit (1);
8582 if (((long) (sizeof (long long))) < 0)
8583 {
8584 long i = longval ();
8585 if (i != ((long) (sizeof (long long))))
8586 exit (1);
8587 fprintf (f, "%ld\n", i);
8588 }
8589 else
8590 {
8591 unsigned long i = ulongval ();
8592 if (i != ((long) (sizeof (long long))))
8593 exit (1);
8594 fprintf (f, "%lu\n", i);
8595 }
8596 exit (ferror (f) || fclose (f) != 0);
8597
8598 ;
8599 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008600}
Martin v. Löwis11437992002-04-12 09:54:03 +00008601_ACEOF
8602rm -f conftest$ac_exeext
8603if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
8604 (eval $ac_link) 2>&5
8605 ac_status=$?
8606 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8607 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
8608 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8609 (eval $ac_try) 2>&5
8610 ac_status=$?
8611 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8612 (exit $ac_status); }; }; then
8613 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008614else
Martin v. Löwis11437992002-04-12 09:54:03 +00008615 echo "$as_me: program exited with status $ac_status" >&5
8616echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008617sed 's/^/| /' conftest.$ac_ext >&5
8618
Martin v. Löwis11437992002-04-12 09:54:03 +00008619( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00008620{ { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77
8621See \`config.log' for more details." >&5
8622echo "$as_me: error: cannot compute sizeof (long long), 77
8623See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 { (exit 1); exit 1; }; }
8625fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008626rm -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 +00008627fi
8628fi
8629rm -f conftest.val
8630else
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008631 ac_cv_sizeof_long_long=0
8632fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008633fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008634echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
8635echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6
8636cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008637#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008638_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008639
Michael W. Hudson54241132001-12-07 15:38:26 +00008640
Guido van Rossumec95c7b1998-08-04 17:59:56 +00008641fi
8642
Martin v. Löwis11437992002-04-12 09:54:03 +00008643echo "$as_me:$LINENO: checking for uintptr_t support" >&5
8644echo $ECHO_N "checking for uintptr_t support... $ECHO_C" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008645have_uintptr_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00008646cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008647#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008648/* confdefs.h. */
8649_ACEOF
8650cat confdefs.h >>conftest.$ac_ext
8651cat >>conftest.$ac_ext <<_ACEOF
8652/* end confdefs.h. */
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008653
Martin v. Löwis11437992002-04-12 09:54:03 +00008654int
8655main ()
8656{
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008657uintptr_t x; x = (uintptr_t)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008658 ;
8659 return 0;
8660}
8661_ACEOF
8662rm -f conftest.$ac_objext
8663if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008664 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008665 ac_status=$?
8666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8667 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008668 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008669 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8670 (eval $ac_try) 2>&5
8671 ac_status=$?
8672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8673 (exit $ac_status); }; }; then
8674
8675
8676cat >>confdefs.h <<\_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008677#define HAVE_UINTPTR_T 1
Martin v. Löwis11437992002-04-12 09:54:03 +00008678_ACEOF
8679
Martin v. Löwisc45929e2002-04-06 10:10:49 +00008680 have_uintptr_t=yes
8681
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008682else
Martin v. Löwis11437992002-04-12 09:54:03 +00008683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008684sed 's/^/| /' conftest.$ac_ext >&5
8685
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008686fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008687rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008688echo "$as_me:$LINENO: result: $have_uintptr_t" >&5
8689echo "${ECHO_T}$have_uintptr_t" >&6
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008690if test "$have_uintptr_t" = yes ; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008691echo "$as_me:$LINENO: checking for uintptr_t" >&5
8692echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6
8693if test "${ac_cv_type_uintptr_t+set}" = set; then
8694 echo $ECHO_N "(cached) $ECHO_C" >&6
8695else
8696 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008697#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008698/* confdefs.h. */
8699_ACEOF
8700cat confdefs.h >>conftest.$ac_ext
8701cat >>conftest.$ac_ext <<_ACEOF
8702/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008703$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008704int
8705main ()
8706{
8707if ((uintptr_t *) 0)
8708 return 0;
8709if (sizeof (uintptr_t))
8710 return 0;
8711 ;
8712 return 0;
8713}
8714_ACEOF
8715rm -f conftest.$ac_objext
8716if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008717 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008718 ac_status=$?
8719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8720 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008721 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008722 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8723 (eval $ac_try) 2>&5
8724 ac_status=$?
8725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8726 (exit $ac_status); }; }; then
8727 ac_cv_type_uintptr_t=yes
8728else
8729 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008730sed 's/^/| /' conftest.$ac_ext >&5
8731
Martin v. Löwis11437992002-04-12 09:54:03 +00008732ac_cv_type_uintptr_t=no
8733fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008734rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008735fi
8736echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
8737echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6
8738
8739echo "$as_me:$LINENO: checking size of uintptr_t" >&5
8740echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6
8741if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
8742 echo $ECHO_N "(cached) $ECHO_C" >&6
8743else
8744 if test "$ac_cv_type_uintptr_t" = yes; then
8745 # The cast to unsigned long works around a bug in the HP C Compiler
8746 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8747 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8748 # This bug is HP SR number 8606223364.
8749 if test "$cross_compiling" = yes; then
8750 # Depending upon the size, compute the lo and hi bounds.
8751cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008752#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008753/* confdefs.h. */
8754_ACEOF
8755cat confdefs.h >>conftest.$ac_ext
8756cat >>conftest.$ac_ext <<_ACEOF
8757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008758$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008759int
8760main ()
8761{
8762static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= 0)];
8763test_array [0] = 0
8764
8765 ;
8766 return 0;
8767}
8768_ACEOF
8769rm -f conftest.$ac_objext
8770if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008771 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008772 ac_status=$?
8773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8774 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008775 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008776 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8777 (eval $ac_try) 2>&5
8778 ac_status=$?
8779 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8780 (exit $ac_status); }; }; then
8781 ac_lo=0 ac_mid=0
8782 while :; do
8783 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008784#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008785/* confdefs.h. */
8786_ACEOF
8787cat confdefs.h >>conftest.$ac_ext
8788cat >>conftest.$ac_ext <<_ACEOF
8789/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008790$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008791int
8792main ()
8793{
8794static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8795test_array [0] = 0
8796
8797 ;
8798 return 0;
8799}
8800_ACEOF
8801rm -f conftest.$ac_objext
8802if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008803 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008804 ac_status=$?
8805 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8806 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008807 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008808 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8809 (eval $ac_try) 2>&5
8810 ac_status=$?
8811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8812 (exit $ac_status); }; }; then
8813 ac_hi=$ac_mid; break
8814else
8815 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008816sed 's/^/| /' conftest.$ac_ext >&5
8817
Martin v. Löwis11437992002-04-12 09:54:03 +00008818ac_lo=`expr $ac_mid + 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008819 if test $ac_lo -le $ac_mid; then
8820 ac_lo= ac_hi=
8821 break
8822 fi
8823 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008824fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008825rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 done
8827else
8828 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008829sed 's/^/| /' conftest.$ac_ext >&5
8830
Martin v. Löwis11437992002-04-12 09:54:03 +00008831cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008832#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008833/* confdefs.h. */
8834_ACEOF
8835cat confdefs.h >>conftest.$ac_ext
8836cat >>conftest.$ac_ext <<_ACEOF
8837/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008838$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008839int
8840main ()
8841{
8842static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) < 0)];
8843test_array [0] = 0
8844
8845 ;
8846 return 0;
8847}
8848_ACEOF
8849rm -f conftest.$ac_objext
8850if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008851 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008852 ac_status=$?
8853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8854 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008855 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8857 (eval $ac_try) 2>&5
8858 ac_status=$?
8859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8860 (exit $ac_status); }; }; then
8861 ac_hi=-1 ac_mid=-1
8862 while :; do
8863 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008864#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008865/* confdefs.h. */
8866_ACEOF
8867cat confdefs.h >>conftest.$ac_ext
8868cat >>conftest.$ac_ext <<_ACEOF
8869/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008870$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008871int
8872main ()
8873{
8874static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) >= $ac_mid)];
8875test_array [0] = 0
8876
8877 ;
8878 return 0;
8879}
8880_ACEOF
8881rm -f conftest.$ac_objext
8882if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008883 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008884 ac_status=$?
8885 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8886 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008887 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008888 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8889 (eval $ac_try) 2>&5
8890 ac_status=$?
8891 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8892 (exit $ac_status); }; }; then
8893 ac_lo=$ac_mid; break
8894else
8895 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008896sed 's/^/| /' conftest.$ac_ext >&5
8897
Martin v. Löwis11437992002-04-12 09:54:03 +00008898ac_hi=`expr '(' $ac_mid ')' - 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008899 if test $ac_mid -le $ac_hi; then
8900 ac_lo= ac_hi=
8901 break
8902 fi
8903 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008904fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008905rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008906 done
8907else
8908 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008909sed 's/^/| /' conftest.$ac_ext >&5
8910
Martin v. Löwis11437992002-04-12 09:54:03 +00008911ac_lo= ac_hi=
8912fi
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 +00008914fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008915rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008916# Binary search between lo and hi bounds.
8917while test "x$ac_lo" != "x$ac_hi"; do
8918 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8919 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008920#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008921/* confdefs.h. */
8922_ACEOF
8923cat confdefs.h >>conftest.$ac_ext
8924cat >>conftest.$ac_ext <<_ACEOF
8925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008926$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008927int
8928main ()
8929{
8930static int test_array [1 - 2 * !(((long) (sizeof (uintptr_t))) <= $ac_mid)];
8931test_array [0] = 0
8932
8933 ;
8934 return 0;
8935}
8936_ACEOF
8937rm -f conftest.$ac_objext
8938if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008939 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008940 ac_status=$?
8941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8942 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008943 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00008944 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
8945 (eval $ac_try) 2>&5
8946 ac_status=$?
8947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8948 (exit $ac_status); }; }; then
8949 ac_hi=$ac_mid
8950else
8951 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008952sed 's/^/| /' conftest.$ac_ext >&5
8953
Martin v. Löwis11437992002-04-12 09:54:03 +00008954ac_lo=`expr '(' $ac_mid ')' + 1`
8955fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008956rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008957done
8958case $ac_lo in
8959?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +00008960'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
8961See \`config.log' for more details." >&5
8962echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
8963See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008964 { (exit 1); exit 1; }; } ;;
8965esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008966else
8967 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +00008968 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
8969See \`config.log' for more details." >&5
8970echo "$as_me: error: cannot run test program while cross compiling
8971See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00008972 { (exit 1); exit 1; }; }
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008973else
Martin v. Löwis11437992002-04-12 09:54:03 +00008974 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00008975#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00008976/* confdefs.h. */
8977_ACEOF
8978cat confdefs.h >>conftest.$ac_ext
8979cat >>conftest.$ac_ext <<_ACEOF
8980/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008981$ac_includes_default
8982long longval () { return (long) (sizeof (uintptr_t)); }
8983unsigned long ulongval () { return (long) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008984#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008985#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008986int
8987main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +00008988{
Martin v. Löwis11437992002-04-12 09:54:03 +00008989
8990 FILE *f = fopen ("conftest.val", "w");
8991 if (! f)
8992 exit (1);
8993 if (((long) (sizeof (uintptr_t))) < 0)
8994 {
8995 long i = longval ();
8996 if (i != ((long) (sizeof (uintptr_t))))
8997 exit (1);
8998 fprintf (f, "%ld\n", i);
8999 }
9000 else
9001 {
9002 unsigned long i = ulongval ();
9003 if (i != ((long) (sizeof (uintptr_t))))
9004 exit (1);
9005 fprintf (f, "%lu\n", i);
9006 }
9007 exit (ferror (f) || fclose (f) != 0);
9008
9009 ;
9010 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009011}
Martin v. Löwis11437992002-04-12 09:54:03 +00009012_ACEOF
9013rm -f conftest$ac_exeext
9014if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9015 (eval $ac_link) 2>&5
9016 ac_status=$?
9017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9018 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9019 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9020 (eval $ac_try) 2>&5
9021 ac_status=$?
9022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9023 (exit $ac_status); }; }; then
9024 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009025else
Martin v. Löwis11437992002-04-12 09:54:03 +00009026 echo "$as_me: program exited with status $ac_status" >&5
9027echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009028sed 's/^/| /' conftest.$ac_ext >&5
9029
Martin v. Löwis11437992002-04-12 09:54:03 +00009030( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +00009031{ { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t), 77
9032See \`config.log' for more details." >&5
9033echo "$as_me: error: cannot compute sizeof (uintptr_t), 77
9034See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00009035 { (exit 1); exit 1; }; }
9036fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009037rm -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 +00009038fi
9039fi
9040rm -f conftest.val
9041else
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009042 ac_cv_sizeof_uintptr_t=0
9043fi
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009044fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009045echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
9046echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6
9047cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009048#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009049_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009050
Michael W. Hudson54241132001-12-07 15:38:26 +00009051
Barry Warsawbc7c7f92000-08-18 04:53:33 +00009052fi
9053
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009054# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009055echo "$as_me:$LINENO: checking size of off_t" >&5
9056echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
9057if test "${ac_cv_sizeof_off_t+set}" = set; then
9058 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009059else
9060 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009061 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009062else
Martin v. Löwis11437992002-04-12 09:54:03 +00009063 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009064#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009065/* confdefs.h. */
9066_ACEOF
9067cat confdefs.h >>conftest.$ac_ext
9068cat >>conftest.$ac_ext <<_ACEOF
9069/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009070#include <stdio.h>
9071#include <sys/types.h>
9072main()
9073{
9074 FILE *f=fopen("conftestval", "w");
9075 if (!f) exit(1);
9076 fprintf(f, "%d\n", sizeof(off_t));
9077 exit(0);
9078}
Martin v. Löwis11437992002-04-12 09:54:03 +00009079_ACEOF
9080rm -f conftest$ac_exeext
9081if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9082 (eval $ac_link) 2>&5
9083 ac_status=$?
9084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9085 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9086 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9087 (eval $ac_try) 2>&5
9088 ac_status=$?
9089 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9090 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009091 ac_cv_sizeof_off_t=`cat conftestval`
9092else
Martin v. Löwis11437992002-04-12 09:54:03 +00009093 echo "$as_me: program exited with status $ac_status" >&5
9094echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009095sed 's/^/| /' conftest.$ac_ext >&5
9096
Martin v. Löwis11437992002-04-12 09:54:03 +00009097( exit $ac_status )
9098ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009099fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009100rm -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 +00009101fi
9102
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009103fi
9104
Martin v. Löwis11437992002-04-12 09:54:03 +00009105echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
9106echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
9107
9108cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009109#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009110_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009111
Michael W. Hudson54241132001-12-07 15:38:26 +00009112
Martin v. Löwis11437992002-04-12 09:54:03 +00009113echo "$as_me:$LINENO: checking whether to enable large file support" >&5
9114echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6
Guido van Rossum96f2eb91999-04-10 16:02:18 +00009115if test "$have_long_long" = yes -a \
9116 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
9117 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009118
Martin v. Löwis11437992002-04-12 09:54:03 +00009119cat >>confdefs.h <<\_ACEOF
9120#define HAVE_LARGEFILE_SUPPORT 1
9121_ACEOF
9122
9123 echo "$as_me:$LINENO: result: yes" >&5
9124echo "${ECHO_T}yes" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009125else
Martin v. Löwis11437992002-04-12 09:54:03 +00009126 echo "$as_me:$LINENO: result: no" >&5
9127echo "${ECHO_T}no" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +00009128fi
9129
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009130# AC_CHECK_SIZEOF() doesn't include <time.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009131echo "$as_me:$LINENO: checking size of time_t" >&5
9132echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
9133if test "${ac_cv_sizeof_time_t+set}" = set; then
9134 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009135else
9136 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009137 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009138else
Martin v. Löwis11437992002-04-12 09:54:03 +00009139 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009140#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009141/* confdefs.h. */
9142_ACEOF
9143cat confdefs.h >>conftest.$ac_ext
9144cat >>conftest.$ac_ext <<_ACEOF
9145/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009146#include <stdio.h>
9147#include <time.h>
9148main()
9149{
9150 FILE *f=fopen("conftestval", "w");
9151 if (!f) exit(1);
9152 fprintf(f, "%d\n", sizeof(time_t));
9153 exit(0);
9154}
Martin v. Löwis11437992002-04-12 09:54:03 +00009155_ACEOF
9156rm -f conftest$ac_exeext
9157if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9158 (eval $ac_link) 2>&5
9159 ac_status=$?
9160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9161 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9163 (eval $ac_try) 2>&5
9164 ac_status=$?
9165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9166 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009167 ac_cv_sizeof_time_t=`cat conftestval`
9168else
Martin v. Löwis11437992002-04-12 09:54:03 +00009169 echo "$as_me: program exited with status $ac_status" >&5
9170echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009171sed 's/^/| /' conftest.$ac_ext >&5
9172
Martin v. Löwis11437992002-04-12 09:54:03 +00009173( exit $ac_status )
9174ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009175fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009176rm -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 +00009177fi
9178
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009179fi
9180
Martin v. Löwis11437992002-04-12 09:54:03 +00009181echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
9182echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
9183
9184cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009185#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009186_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +00009187
Michael W. Hudson54241132001-12-07 15:38:26 +00009188
9189
Trent Mick635f6fb2000-08-23 21:33:05 +00009190# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009191ac_save_cc="$CC"
9192if test "$ac_cv_kpthread" = "yes"
9193then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +00009194elif test "$ac_cv_kthread" = "yes"
9195then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00009196elif test "$ac_cv_pthread" = "yes"
9197then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009198fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009199echo "$as_me:$LINENO: checking for pthread_t" >&5
9200echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009201have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009202cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009203#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009204/* confdefs.h. */
9205_ACEOF
9206cat confdefs.h >>conftest.$ac_ext
9207cat >>conftest.$ac_ext <<_ACEOF
9208/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009209#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009210int
9211main ()
9212{
Guido van Rossum12580492000-09-24 16:47:19 +00009213pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009214 ;
9215 return 0;
9216}
9217_ACEOF
9218rm -f conftest.$ac_objext
9219if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009220 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009221 ac_status=$?
9222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9223 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009224 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009225 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9226 (eval $ac_try) 2>&5
9227 ac_status=$?
9228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9229 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009230 have_pthread_t=yes
9231else
Martin v. Löwis11437992002-04-12 09:54:03 +00009232 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009233sed 's/^/| /' conftest.$ac_ext >&5
9234
Trent Mick635f6fb2000-08-23 21:33:05 +00009235fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009236rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009237echo "$as_me:$LINENO: result: $have_pthread_t" >&5
9238echo "${ECHO_T}$have_pthread_t" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009239if test "$have_pthread_t" = yes ; then
9240 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Martin v. Löwis11437992002-04-12 09:54:03 +00009241 echo "$as_me:$LINENO: checking size of pthread_t" >&5
9242echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6
9243 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
9244 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +00009245else
9246 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00009247 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +00009248else
Martin v. Löwis11437992002-04-12 09:54:03 +00009249 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009250#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009251/* confdefs.h. */
9252_ACEOF
9253cat confdefs.h >>conftest.$ac_ext
9254cat >>conftest.$ac_ext <<_ACEOF
9255/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +00009256#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +00009257#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +00009258 main()
9259 {
9260 FILE *f=fopen("conftestval", "w");
9261 if (!f) exit(1);
9262 fprintf(f, "%d\n", sizeof(pthread_t));
9263 exit(0);
9264 }
Martin v. Löwis11437992002-04-12 09:54:03 +00009265_ACEOF
9266rm -f conftest$ac_exeext
9267if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
9268 (eval $ac_link) 2>&5
9269 ac_status=$?
9270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9271 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9273 (eval $ac_try) 2>&5
9274 ac_status=$?
9275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9276 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +00009277 ac_cv_sizeof_pthread_t=`cat conftestval`
9278else
Martin v. Löwis11437992002-04-12 09:54:03 +00009279 echo "$as_me: program exited with status $ac_status" >&5
9280echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009281sed 's/^/| /' conftest.$ac_ext >&5
9282
Martin v. Löwis11437992002-04-12 09:54:03 +00009283( exit $ac_status )
9284ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +00009285fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009286rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Trent Mick635f6fb2000-08-23 21:33:05 +00009287fi
9288
Trent Mick635f6fb2000-08-23 21:33:05 +00009289fi
9290
Martin v. Löwis11437992002-04-12 09:54:03 +00009291 echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
9292echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6
9293
9294cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009295#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +00009296_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +00009297
9298fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +00009299CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +00009300
Martin v. Löwis11437992002-04-12 09:54:03 +00009301echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
9302echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009303# Check whether --enable-toolbox-glue or --disable-toolbox-glue was given.
9304if test "${enable_toolbox_glue+set}" = set; then
9305 enableval="$enable_toolbox_glue"
Jack Jansene578a632001-08-15 01:27:14 +00009306
Martin v. Löwis11437992002-04-12 09:54:03 +00009307fi;
Jack Jansene578a632001-08-15 01:27:14 +00009308
9309if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +00009310then
Jack Jansene578a632001-08-15 01:27:14 +00009311 case $ac_sys_system/$ac_sys_release in
9312 Darwin/*)
9313 enable_toolbox_glue="yes";;
9314 *)
9315 enable_toolbox_glue="no";;
9316 esac
9317fi
9318case "$enable_toolbox_glue" in
9319yes)
Jack Jansen666b1e72001-10-31 12:11:48 +00009320 extra_frameworks="-framework CoreServices -framework Foundation"
Jack Jansene578a632001-08-15 01:27:14 +00009321 extra_machdep_objs="Python/mactoolboxglue.o"
Jack Jansen591cbed2001-08-15 13:55:15 +00009322 extra_undefs="-u __dummy -u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +00009323
9324cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009325#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00009326_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +00009327
9328 ;;
9329*)
9330 extra_frameworks=""
9331 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +00009332 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +00009333 ;;
9334esac
Martin v. Löwis11437992002-04-12 09:54:03 +00009335echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
9336echo "${ECHO_T}$enable_toolbox_glue" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00009337
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009338
9339case $ac_sys_system/$ac_sys_release in
Jack Jansen418c3b12001-11-14 10:59:57 +00009340 Darwin/1.3*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009341 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009342 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansenb36687a2004-07-16 08:43:47 +00009343 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009344 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +00009345 Darwin/*)
Jack Jansenea0c3822002-08-01 21:57:49 +00009346 LIBTOOL_CRUFT="-lcc_dynamic -arch_only ppc"
Jack Jansen418c3b12001-11-14 10:59:57 +00009347 LIBTOOL_CRUFT="$LIBTOOL_CRUFT $extra_frameworks"
Jack Jansenb36687a2004-07-16 08:43:47 +00009348 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009349 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009350esac
9351
Martin v. Löwis11437992002-04-12 09:54:03 +00009352echo "$as_me:$LINENO: checking for --enable-framework" >&5
9353echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009354if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009355then
Skip Montanarodecc6a42003-01-01 20:07:49 +00009356 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +00009357 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +00009358 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009359
Martin v. Löwis11437992002-04-12 09:54:03 +00009360cat >>confdefs.h <<\_ACEOF
9361#define WITH_NEXT_FRAMEWORK 1
9362_ACEOF
9363
9364 echo "$as_me:$LINENO: result: yes" >&5
9365echo "${ECHO_T}yes" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009366else
Martin v. Löwis11437992002-04-12 09:54:03 +00009367 echo "$as_me:$LINENO: result: no" >&5
9368echo "${ECHO_T}no" >&6
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009369fi
9370
Martin v. Löwis11437992002-04-12 09:54:03 +00009371echo "$as_me:$LINENO: checking for dyld" >&5
9372echo $ECHO_N "checking for dyld... $ECHO_C" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009373case $ac_sys_system/$ac_sys_release in
9374 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009375
Martin v. Löwis11437992002-04-12 09:54:03 +00009376cat >>confdefs.h <<\_ACEOF
9377#define WITH_DYLD 1
9378_ACEOF
9379
9380 echo "$as_me:$LINENO: result: always on for Darwin" >&5
9381echo "${ECHO_T}always on for Darwin" >&6
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009382 ;;
9383 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00009384 echo "$as_me:$LINENO: result: no" >&5
9385echo "${ECHO_T}no" >&6
Jack Jansene578a632001-08-15 01:27:14 +00009386 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +00009387esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009388
Guido van Rossum0a516c91994-09-12 10:58:40 +00009389# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +00009390
Michael W. Hudson54241132001-12-07 15:38:26 +00009391
9392
9393
9394
Guido van Rossum0a516c91994-09-12 10:58:40 +00009395# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +00009396# -- usually .so, .sl on HP-UX, .dll on Cygwin
Martin v. Löwis11437992002-04-12 09:54:03 +00009397echo "$as_me:$LINENO: checking SO" >&5
9398echo $ECHO_N "checking SO... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009399if test -z "$SO"
9400then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009401 case $ac_sys_system in
Guido van Rossum563e7081996-09-10 18:20:48 +00009402 hp*|HP*) SO=.sl;;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009403 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +00009404 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009405 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +00009406else
9407 # this might also be a termcap variable, see #610332
9408 echo
9409 echo '====================================================================='
9410 echo '+ +'
9411 echo '+ WARNING: You have set SO in your environment. +'
9412 echo '+ Do you really mean to change the extension for shared libraries? +'
9413 echo '+ Continuing in 10 seconds to let you to ponder. +'
9414 echo '+ +'
9415 echo '====================================================================='
9416 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +00009417fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009418echo "$as_me:$LINENO: result: $SO" >&5
9419echo "${ECHO_T}$SO" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009420# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +00009421# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009422# (Shared libraries in this instance are shared modules to be loaded into
9423# Python, as opposed to building Python itself as a shared library.)
Martin v. Löwis11437992002-04-12 09:54:03 +00009424echo "$as_me:$LINENO: checking LDSHARED" >&5
9425echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009426if test -z "$LDSHARED"
9427then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009428 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009429 AIX*)
9430 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +00009431 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009432 ;;
9433 BeOS*)
9434 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +00009435 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009436 ;;
Guido van Rossum07397971997-04-29 21:49:50 +00009437 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +00009438 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009439 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +00009440 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +00009441 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +00009442 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +00009443 fi ;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009444 hp*|HP*) LDSHARED="ld -b";;
Guido van Rossumda88dad1995-01-26 00:46:29 +00009445 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +00009446 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +00009447 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9448 if test "$enable_framework" ; then
9449 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009450 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9451 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +00009452 else
9453 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +00009454 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +00009455 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009456 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +00009457 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9458 if test "$enable_framework" ; then
9459 # Link against the framework. All externals should be defined.
Jack Jansenc8607b72003-12-08 01:10:12 +00009460 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9461 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009462 else
Michael W. Hudson594bc802002-03-07 09:59:15 +00009463 # No framework, use the Python app as bundle-loader
9464 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +00009465 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009466 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +00009467 Darwin/*)
9468 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
9469 # This allows an extension to be used in any Python
9470 if test ${MACOSX_DEPLOYMENT_TARGET-10.1} '>' 10.2
9471 then
9472 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
9473 BLDSHARED="$LDSHARED"
9474 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=$MACOSX_DEPLOYMENT_TARGET
9475 else
9476 LDSHARED='$(CC) $(LDFLAGS) -bundle'
9477 if test "$enable_framework" ; then
9478 # Link against the framework. All externals should be defined.
9479 BLDSHARED="$LDSHARED "'-Wl,-F. -framework $(PYTHONFRAMEWORK)'
9480 LDSHARED="$LDSHARED "'-Wl,-F$(PYTHONFRAMEWORKPREFIX) -framework $(PYTHONFRAMEWORK)'
9481 else
9482 # No framework, use the Python app as bundle-loader
9483 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
9484 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
9485 fi
9486 fi
9487 ;;
Martin v. Löwis3cba5c02002-09-16 17:50:59 +00009488 Linux*|GNU*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +00009489 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009490 OpenBSD*|FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +00009491 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +00009492 then
9493 LDSHARED="cc -shared ${LDFLAGS}"
9494 else
9495 LDSHARED="ld -Bshareable ${LDFLAGS}"
9496 fi;;
Martin v. Löwisd61888b2002-09-30 11:17:27 +00009497 NetBSD*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009498 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009499 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009500 then LDSHARED='$(CC) -shared'
9501 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +00009502 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +00009503 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +00009504 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00009505 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009506 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009507 *) LDSHARED="ld";;
9508 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009509fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009510echo "$as_me:$LINENO: result: $LDSHARED" >&5
9511echo "${ECHO_T}$LDSHARED" >&6
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009512BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +00009513# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009514# library (module) -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009515echo "$as_me:$LINENO: checking CCSHARED" >&5
9516echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009517if test -z "$CCSHARED"
9518then
Guido van Rossum07397971997-04-29 21:49:50 +00009519 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +00009520 SunOS*) if test "$GCC" = yes;
9521 then CCSHARED="-fPIC";
9522 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +00009523 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +00009524 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +00009525 else CCSHARED="+z";
9526 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009527 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009528 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis36546db2001-09-05 14:24:43 +00009529 FreeBSD*|NetBSD*|OpenBSD*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009530 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +00009531 if test "$GCC" = "yes"
9532 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +00009533 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +00009534 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009535 SCO_SV*)
9536 if test "$GCC" = "yes"
9537 then CCSHARED="-fPIC"
9538 else CCSHARED="-Kpic -belf"
9539 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +00009540 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009541 IRIX*/6*) case $CC in
9542 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +00009543 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009544 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009545 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009546 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009547fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009548echo "$as_me:$LINENO: result: $CCSHARED" >&5
9549echo "${ECHO_T}$CCSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009550# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009551# the python executable -- this is only needed for a few systems
Martin v. Löwis11437992002-04-12 09:54:03 +00009552echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
9553echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009554if test -z "$LINKFORSHARED"
9555then
Guido van Rossum07397971997-04-29 21:49:50 +00009556 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00009557 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009558 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00009559 LINKFORSHARED="-Wl,-E -Wl,+s";;
9560# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +00009561 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +00009562 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00009563 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +00009564 Darwin/*)
Jack Jansene578a632001-08-15 01:27:14 +00009565 # -u __dummy makes the linker aware of the objc runtime
9566 # in System.framework; otherwise, __objcInit (referenced in
9567 # crt1.o) gets erroneously defined as common, which breaks dynamic
9568 # loading of any modules which reference it in System.framework.
9569 # -u _PyMac_Error is needed to pull in the mac toolbox glue, which is
9570 # not used by the core itself but which needs to be in the core so
9571 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +00009572 # -prebind is no longer used, because it actually seems to give a
9573 # slowdown in stead of a speedup, maybe due to the large number of
9574 # dynamic loads Python does.
9575 LINKFORSHARED="$extra_undefs -framework System"
Jack Jansene578a632001-08-15 01:27:14 +00009576 if test "$enable_framework"
9577 then
Jack Jansenb36687a2004-07-16 08:43:47 +00009578 LINKFORSHARED="$LINKFORSHARED -Wl,-F. -framework "'$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +00009579 fi
9580 LINKFORSHARED="$LINKFORSHARED $extra_frameworks";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +00009581 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +00009582 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +00009583 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis11437992002-04-12 09:54:03 +00009584 FreeBSD*|NetBSD*|OpenBSD*)
Guido van Rossumdf693651999-01-07 21:50:41 +00009585 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
9586 then
9587 LINKFORSHARED="-Wl,--export-dynamic"
9588 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009589 SunOS/5*) case $CC in
9590 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +00009591 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +00009592 then
9593 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +00009594 fi;;
9595 esac;;
Jason Tishler30765592003-09-04 11:04:06 +00009596 CYGWIN*)
9597 if test $enable_shared = "no"
9598 then
9599 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
9600 fi;;
Guido van Rossum0a516c91994-09-12 10:58:40 +00009601 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +00009602fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009603echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
9604echo "${ECHO_T}$LINKFORSHARED" >&6
Guido van Rossum0a516c91994-09-12 10:58:40 +00009605
Michael W. Hudson54241132001-12-07 15:38:26 +00009606
Martin v. Löwis11437992002-04-12 09:54:03 +00009607echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
9608echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009609if test ! "$LIBRARY" = "$LDLIBRARY"
9610then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +00009611 case $ac_sys_system in
9612 CYGWIN*)
9613 # Cygwin needs CCSHARED when building extension DLLs
9614 # but not when building the interpreter DLL.
9615 CFLAGSFORSHARED='';;
9616 *)
9617 CFLAGSFORSHARED='$(CCSHARED)'
9618 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009619fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009620echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
9621echo "${ECHO_T}$CFLAGSFORSHARED" >&6
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00009622
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009623# SHLIBS are libraries (except -lc and -lm) to link to the python shared
9624# library (with --enable-shared).
9625# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009626# symbols, this must be set to $(LIBS) (expanded by make). We do this even
9627# if it is not required, since it creates a dependency of the shared library
9628# to LIBS. This, in turn, means that applications linking the shared libpython
9629# don't need to link LIBS explicitly. The default should be only changed
9630# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009631
9632echo "$as_me:$LINENO: checking SHLIBS" >&5
9633echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6
9634case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009635 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +00009636 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00009637esac
9638echo "$as_me:$LINENO: result: $SHLIBS" >&5
9639echo "${ECHO_T}$SHLIBS" >&6
9640
9641
Guido van Rossum627b2d71993-12-24 10:39:16 +00009642# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +00009643
9644echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
9645echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6
9646if test "${ac_cv_lib_dl_dlopen+set}" = set; then
9647 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009648else
Martin v. Löwis11437992002-04-12 09:54:03 +00009649 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009650LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009651cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009652#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009653/* confdefs.h. */
9654_ACEOF
9655cat confdefs.h >>conftest.$ac_ext
9656cat >>conftest.$ac_ext <<_ACEOF
9657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009658
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009659/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009660#ifdef __cplusplus
9661extern "C"
9662#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009663/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009664 builtin and then its argument prototype would still apply. */
9665char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009666int
9667main ()
9668{
9669dlopen ();
9670 ;
9671 return 0;
9672}
9673_ACEOF
9674rm -f conftest.$ac_objext conftest$ac_exeext
9675if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009676 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009677 ac_status=$?
9678 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9679 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009680 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009681 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9682 (eval $ac_try) 2>&5
9683 ac_status=$?
9684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9685 (exit $ac_status); }; }; then
9686 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009687else
Martin v. Löwis11437992002-04-12 09:54:03 +00009688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009689sed 's/^/| /' conftest.$ac_ext >&5
9690
Martin v. Löwis11437992002-04-12 09:54:03 +00009691ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009692fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009693rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009694LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009695fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009696echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
9697echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6
9698if test $ac_cv_lib_dl_dlopen = yes; then
9699 cat >>confdefs.h <<_ACEOF
9700#define HAVE_LIBDL 1
9701_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009702
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009703 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +00009704
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009705fi
9706 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +00009707
9708echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
9709echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6
9710if test "${ac_cv_lib_dld_shl_load+set}" = set; then
9711 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009712else
Martin v. Löwis11437992002-04-12 09:54:03 +00009713 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009714LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00009715cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009716#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009717/* confdefs.h. */
9718_ACEOF
9719cat confdefs.h >>conftest.$ac_ext
9720cat >>conftest.$ac_ext <<_ACEOF
9721/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009722
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009723/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009724#ifdef __cplusplus
9725extern "C"
9726#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00009727/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009728 builtin and then its argument prototype would still apply. */
9729char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009730int
9731main ()
9732{
9733shl_load ();
9734 ;
9735 return 0;
9736}
9737_ACEOF
9738rm -f conftest.$ac_objext conftest$ac_exeext
9739if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009740 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009741 ac_status=$?
9742 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9743 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009744 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009745 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9746 (eval $ac_try) 2>&5
9747 ac_status=$?
9748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9749 (exit $ac_status); }; }; then
9750 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009751else
Martin v. Löwis11437992002-04-12 09:54:03 +00009752 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009753sed 's/^/| /' conftest.$ac_ext >&5
9754
Martin v. Löwis11437992002-04-12 09:54:03 +00009755ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00009756fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009757rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009758LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +00009759fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009760echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
9761echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6
9762if test $ac_cv_lib_dld_shl_load = yes; then
9763 cat >>confdefs.h <<_ACEOF
9764#define HAVE_LIBDLD 1
9765_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00009766
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00009767 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009768
Guido van Rossum76be6ed1995-01-02 18:33:54 +00009769fi
9770 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +00009771
9772# only check for sem_ini if thread support is requested
9773if test "$with_threads" = "yes" -o -z "$with_threads"; then
9774 echo "$as_me:$LINENO: checking for library containing sem_init" >&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009775echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6
9776if test "${ac_cv_search_sem_init+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009777 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009778else
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009779 ac_func_search_save_LIBS=$LIBS
9780ac_cv_search_sem_init=no
Martin v. Löwis11437992002-04-12 09:54:03 +00009781cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009782#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009783/* confdefs.h. */
9784_ACEOF
9785cat confdefs.h >>conftest.$ac_ext
9786cat >>conftest.$ac_ext <<_ACEOF
9787/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009788
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009789/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009790#ifdef __cplusplus
9791extern "C"
9792#endif
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009793/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +00009794 builtin and then its argument prototype would still apply. */
9795char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +00009796int
9797main ()
9798{
9799sem_init ();
9800 ;
9801 return 0;
9802}
9803_ACEOF
9804rm -f conftest.$ac_objext conftest$ac_exeext
9805if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009806 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009807 ac_status=$?
9808 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9809 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009810 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009811 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9812 (eval $ac_try) 2>&5
9813 ac_status=$?
9814 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9815 (exit $ac_status); }; }; then
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009816 ac_cv_search_sem_init="none required"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009817else
Martin v. Löwis11437992002-04-12 09:54:03 +00009818 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009819sed 's/^/| /' conftest.$ac_ext >&5
9820
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009821fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009822rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009823if test "$ac_cv_search_sem_init" = no; then
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009824 for ac_lib in pthread rt posix4; do
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009825 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9826 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009827#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009828/* confdefs.h. */
9829_ACEOF
9830cat confdefs.h >>conftest.$ac_ext
9831cat >>conftest.$ac_ext <<_ACEOF
9832/* end confdefs.h. */
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009833
9834/* Override any gcc2 internal prototype to avoid an error. */
9835#ifdef __cplusplus
9836extern "C"
9837#endif
9838/* We use char because int might match the return type of a gcc2
9839 builtin and then its argument prototype would still apply. */
9840char sem_init ();
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009841int
9842main ()
9843{
9844sem_init ();
9845 ;
9846 return 0;
9847}
Martin v. Löwis11437992002-04-12 09:54:03 +00009848_ACEOF
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009849rm -f conftest.$ac_objext conftest$ac_exeext
9850if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009851 (eval $ac_link) 2>&5
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009852 ac_status=$?
9853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9854 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009855 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009856 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9857 (eval $ac_try) 2>&5
9858 ac_status=$?
9859 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9860 (exit $ac_status); }; }; then
9861 ac_cv_search_sem_init="-l$ac_lib"
9862break
9863else
9864 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009865sed 's/^/| /' conftest.$ac_ext >&5
9866
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009867fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009868rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +00009869 done
9870fi
9871LIBS=$ac_func_search_save_LIBS
9872fi
9873echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
9874echo "${ECHO_T}$ac_cv_search_sem_init" >&6
9875if test "$ac_cv_search_sem_init" != no; then
9876 test "$ac_cv_search_sem_init" = "none required" || LIBS="$ac_cv_search_sem_init $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009877
Martin v. Löwis41933dd2002-03-21 15:10:58 +00009878fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +00009879 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +00009880 # posix4 on Solaris 2.6
9881 # pthread (first!) on Linux
9882fi
9883
Martin v. Löwis19d17342003-06-14 21:03:05 +00009884# check if we need libintl for locale functions
9885echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
9886echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6
9887if test "${ac_cv_lib_intl_textdomain+set}" = set; then
9888 echo $ECHO_N "(cached) $ECHO_C" >&6
9889else
9890 ac_check_lib_save_LIBS=$LIBS
9891LIBS="-lintl $LIBS"
9892cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009893#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009894/* confdefs.h. */
9895_ACEOF
9896cat confdefs.h >>conftest.$ac_ext
9897cat >>conftest.$ac_ext <<_ACEOF
9898/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +00009899
9900/* Override any gcc2 internal prototype to avoid an error. */
9901#ifdef __cplusplus
9902extern "C"
9903#endif
9904/* We use char because int might match the return type of a gcc2
9905 builtin and then its argument prototype would still apply. */
9906char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +00009907int
9908main ()
9909{
9910textdomain ();
9911 ;
9912 return 0;
9913}
9914_ACEOF
9915rm -f conftest.$ac_objext conftest$ac_exeext
9916if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009917 (eval $ac_link) 2>&5
Martin v. Löwis19d17342003-06-14 21:03:05 +00009918 ac_status=$?
9919 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9920 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009921 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis19d17342003-06-14 21:03:05 +00009922 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9923 (eval $ac_try) 2>&5
9924 ac_status=$?
9925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9926 (exit $ac_status); }; }; then
9927 ac_cv_lib_intl_textdomain=yes
9928else
9929 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009930sed 's/^/| /' conftest.$ac_ext >&5
9931
Martin v. Löwis19d17342003-06-14 21:03:05 +00009932ac_cv_lib_intl_textdomain=no
9933fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009934rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +00009935LIBS=$ac_check_lib_save_LIBS
9936fi
9937echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
9938echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6
9939if test $ac_cv_lib_intl_textdomain = yes; then
9940
9941cat >>confdefs.h <<\_ACEOF
9942#define WITH_LIBINTL 1
9943_ACEOF
9944
9945fi
9946
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009947
9948# checks for system dependent C++ extensions support
9949case "$ac_sys_system" in
Martin v. Löwis11437992002-04-12 09:54:03 +00009950 AIX*) echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
9951echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6
9952 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009953#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +00009954/* confdefs.h. */
9955_ACEOF
9956cat confdefs.h >>conftest.$ac_ext
9957cat >>conftest.$ac_ext <<_ACEOF
9958/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009959#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00009960int
9961main ()
9962{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009963loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +00009964 ;
9965 return 0;
9966}
9967_ACEOF
9968rm -f conftest.$ac_objext conftest$ac_exeext
9969if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009970 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009971 ac_status=$?
9972 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9973 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009974 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +00009975 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
9976 (eval $ac_try) 2>&5
9977 ac_status=$?
9978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9979 (exit $ac_status); }; }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009980
Martin v. Löwis11437992002-04-12 09:54:03 +00009981cat >>confdefs.h <<\_ACEOF
9982#define AIX_GENUINE_CPLUSPLUS 1
9983_ACEOF
9984
9985 echo "$as_me:$LINENO: result: yes" >&5
9986echo "${ECHO_T}yes" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009987else
Martin v. Löwis11437992002-04-12 09:54:03 +00009988 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009989sed 's/^/| /' conftest.$ac_ext >&5
9990
Martin v. Löwis11437992002-04-12 09:54:03 +00009991echo "$as_me:$LINENO: result: no" >&5
9992echo "${ECHO_T}no" >&6
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009993fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00009994rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +00009995 *) ;;
9996esac
9997
Guido van Rossum70c7f481998-03-26 18:44:10 +00009998# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +00009999# BeOS' sockets are stashed in libnet.
Martin v. Löwis11437992002-04-12 09:54:03 +000010000echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
10001echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6
10002if test "${ac_cv_lib_nsl_t_open+set}" = set; then
10003 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010004else
Martin v. Löwis11437992002-04-12 09:54:03 +000010005 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010006LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010007cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010008#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010009/* confdefs.h. */
10010_ACEOF
10011cat confdefs.h >>conftest.$ac_ext
10012cat >>conftest.$ac_ext <<_ACEOF
10013/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010014
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010015/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010016#ifdef __cplusplus
10017extern "C"
10018#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010019/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010020 builtin and then its argument prototype would still apply. */
10021char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010022int
10023main ()
10024{
10025t_open ();
10026 ;
10027 return 0;
10028}
10029_ACEOF
10030rm -f conftest.$ac_objext conftest$ac_exeext
10031if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010032 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010033 ac_status=$?
10034 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10035 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010036 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010037 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10038 (eval $ac_try) 2>&5
10039 ac_status=$?
10040 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10041 (exit $ac_status); }; }; then
10042 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010043else
Martin v. Löwis11437992002-04-12 09:54:03 +000010044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010045sed 's/^/| /' conftest.$ac_ext >&5
10046
Martin v. Löwis11437992002-04-12 09:54:03 +000010047ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010048fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010049rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010050LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010051fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010052echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
10053echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6
10054if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010055 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000010056fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000010057 # SVR4
Martin v. Löwis11437992002-04-12 09:54:03 +000010058echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
10059echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
10060if test "${ac_cv_lib_socket_socket+set}" = set; then
10061 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010062else
Martin v. Löwis11437992002-04-12 09:54:03 +000010063 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000010064LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010065cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010066#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010067/* confdefs.h. */
10068_ACEOF
10069cat confdefs.h >>conftest.$ac_ext
10070cat >>conftest.$ac_ext <<_ACEOF
10071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010072
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010073/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010074#ifdef __cplusplus
10075extern "C"
10076#endif
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010077/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010078 builtin and then its argument prototype would still apply. */
10079char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010080int
10081main ()
10082{
10083socket ();
10084 ;
10085 return 0;
10086}
10087_ACEOF
10088rm -f conftest.$ac_objext conftest$ac_exeext
10089if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010090 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010091 ac_status=$?
10092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10093 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010094 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010095 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10096 (eval $ac_try) 2>&5
10097 ac_status=$?
10098 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10099 (exit $ac_status); }; }; then
10100 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010101else
Martin v. Löwis11437992002-04-12 09:54:03 +000010102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010103sed 's/^/| /' conftest.$ac_ext >&5
10104
Martin v. Löwis11437992002-04-12 09:54:03 +000010105ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010106fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010107rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010108LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010109fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010110echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
10111echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
10112if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000010113 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000010114fi
10115 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000010116
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000010117case "$ac_sys_system" in
10118BeOS*)
Martin v. Löwis11437992002-04-12 09:54:03 +000010119echo "$as_me:$LINENO: checking for socket in -lnet" >&5
10120echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6
10121if test "${ac_cv_lib_net_socket+set}" = set; then
10122 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010123else
Martin v. Löwis11437992002-04-12 09:54:03 +000010124 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010125LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000010126cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010127#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010128/* confdefs.h. */
10129_ACEOF
10130cat confdefs.h >>conftest.$ac_ext
10131cat >>conftest.$ac_ext <<_ACEOF
10132/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010133
Guido van Rossumad678af1998-10-02 14:42:15 +000010134/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010135#ifdef __cplusplus
10136extern "C"
10137#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010138/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010139 builtin and then its argument prototype would still apply. */
10140char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000010141int
10142main ()
10143{
10144socket ();
10145 ;
10146 return 0;
10147}
10148_ACEOF
10149rm -f conftest.$ac_objext conftest$ac_exeext
10150if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010151 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010152 ac_status=$?
10153 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10154 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010155 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010156 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10157 (eval $ac_try) 2>&5
10158 ac_status=$?
10159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10160 (exit $ac_status); }; }; then
10161 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010162else
Martin v. Löwis11437992002-04-12 09:54:03 +000010163 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010164sed 's/^/| /' conftest.$ac_ext >&5
10165
Martin v. Löwis11437992002-04-12 09:54:03 +000010166ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010167fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010168rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010169LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000010170fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010171echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
10172echo "${ECHO_T}$ac_cv_lib_net_socket" >&6
10173if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010174 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010175fi
10176 # BeOS
10177;;
10178esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000010179
Martin v. Löwis11437992002-04-12 09:54:03 +000010180echo "$as_me:$LINENO: checking for --with-libs" >&5
10181echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6
10182
Guido van Rossuma68acba1996-07-31 17:36:39 +000010183# Check whether --with-libs or --without-libs was given.
10184if test "${with_libs+set}" = set; then
10185 withval="$with_libs"
Martin v. Löwis11437992002-04-12 09:54:03 +000010186
10187echo "$as_me:$LINENO: result: $withval" >&5
10188echo "${ECHO_T}$withval" >&6
Guido van Rossuma68acba1996-07-31 17:36:39 +000010189LIBS="$withval $LIBS"
10190
10191else
Martin v. Löwis11437992002-04-12 09:54:03 +000010192 echo "$as_me:$LINENO: result: no" >&5
10193echo "${ECHO_T}no" >&6
10194fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000010195
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010196# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010197
10198
Martin v. Löwis11437992002-04-12 09:54:03 +000010199echo "$as_me:$LINENO: checking for --with-signal-module" >&5
10200echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6
10201
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010202# Check whether --with-signal-module or --without-signal-module was given.
10203if test "${with_signal_module+set}" = set; then
10204 withval="$with_signal_module"
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010205
Martin v. Löwis11437992002-04-12 09:54:03 +000010206fi;
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010207
10208if test -z "$with_signal_module"
10209then with_signal_module="yes"
10210fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010211echo "$as_me:$LINENO: result: $with_signal_module" >&5
10212echo "${ECHO_T}$with_signal_module" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000010213
10214if test "${with_signal_module}" = "yes"; then
10215 USE_SIGNAL_MODULE=""
10216 SIGNAL_OBJS=""
10217else
10218 USE_SIGNAL_MODULE="#"
10219 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
10220fi
10221
Guido van Rossum3d15bd82001-01-10 18:53:48 +000010222# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000010223
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010224USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000010225
Martin v. Löwis11437992002-04-12 09:54:03 +000010226echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
10227echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6
10228
Guido van Rossumec2f0731997-01-22 20:54:01 +000010229
10230# Check whether --with-dec-threads or --without-dec-threads was given.
10231if test "${with_dec_threads+set}" = set; then
10232 withval="$with_dec_threads"
Martin v. Löwis11437992002-04-12 09:54:03 +000010233
10234echo "$as_me:$LINENO: result: $withval" >&5
10235echo "${ECHO_T}$withval" >&6
Guido van Rossumec2f0731997-01-22 20:54:01 +000010236LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000010237if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000010238 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000010239fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000010240else
Martin v. Löwis11437992002-04-12 09:54:03 +000010241 echo "$as_me:$LINENO: result: no" >&5
10242echo "${ECHO_T}no" >&6
10243fi;
10244
10245# Templates for things AC_DEFINEd more than once.
10246# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000010247
10248
Martin v. Löwis11437992002-04-12 09:54:03 +000010249
10250
10251
10252
10253
10254echo "$as_me:$LINENO: checking for --with-threads" >&5
10255echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6
10256
Guido van Rossumec2f0731997-01-22 20:54:01 +000010257# Check whether --with-threads or --without-threads was given.
10258if test "${with_threads+set}" = set; then
10259 withval="$with_threads"
Guido van Rossumec2f0731997-01-22 20:54:01 +000010260
Martin v. Löwis11437992002-04-12 09:54:03 +000010261fi;
Guido van Rossumec2f0731997-01-22 20:54:01 +000010262
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010263# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000010264
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010265# Check whether --with-thread or --without-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000010266if test "${with_thread+set}" = set; then
10267 withval="$with_thread"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010268 with_threads=$with_thread
Martin v. Löwis11437992002-04-12 09:54:03 +000010269fi;
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010270
10271if test -z "$with_threads"
10272then with_threads="yes"
10273fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010274echo "$as_me:$LINENO: result: $with_threads" >&5
10275echo "${ECHO_T}$with_threads" >&6
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010276
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010277
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000010278if test "$with_threads" = "no"
10279then
10280 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010281elif test "$ac_cv_pthread_is_default" = yes
10282then
Martin v. Löwis11437992002-04-12 09:54:03 +000010283 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010284#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010285_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010286
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010287 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000010288 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010289#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010290_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000010291
10292 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000010293 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010294elif test "$ac_cv_kpthread" = "yes"
10295then
10296 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010297 if test "$ac_cv_cxx_thread" = "yes"; then
10298 CXX="$CXX -Kpthread"
10299 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010300 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010301#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010302_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000010303
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000010304 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010305 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010306elif test "$ac_cv_kthread" = "yes"
10307then
10308 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010309 if test "$ac_cv_cxx_thread" = "yes"; then
10310 CXX="$CXX -Kthread"
10311 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000010312 cat >>confdefs.h <<\_ACEOF
10313#define WITH_THREAD 1
10314_ACEOF
10315
10316 posix_threads=yes
10317 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010318elif test "$ac_cv_pthread" = "yes"
10319then
10320 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000010321 if test "$ac_cv_cxx_thread" = "yes"; then
10322 CXX="$CXX -pthread"
10323 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000010324 cat >>confdefs.h <<\_ACEOF
10325#define WITH_THREAD 1
10326_ACEOF
10327
10328 posix_threads=yes
10329 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000010330else
10331 if test ! -z "$with_threads" -a -d "$with_threads"
10332 then LDFLAGS="$LDFLAGS -L$with_threads"
10333 fi
10334 if test ! -z "$withval" -a -d "$withval"
10335 then LDFLAGS="$LDFLAGS -L$withval"
10336 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010337
10338 # According to the POSIX spec, a pthreads implementation must
10339 # define _POSIX_THREADS in unistd.h. Some apparently don't (which ones?)
Martin v. Löwis11437992002-04-12 09:54:03 +000010340 echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
10341echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6
10342 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010343#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010344/* confdefs.h. */
10345_ACEOF
10346cat confdefs.h >>conftest.$ac_ext
10347cat >>conftest.$ac_ext <<_ACEOF
10348/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010349
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010350#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000010351#ifdef _POSIX_THREADS
10352yes
10353#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000010354
10355_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010356if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000010357 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010358 unistd_defines_pthreads=yes
10359else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010360 unistd_defines_pthreads=no
10361fi
10362rm -f conftest*
10363
Martin v. Löwis11437992002-04-12 09:54:03 +000010364 echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
10365echo "${ECHO_T}$unistd_defines_pthreads" >&6
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010366
Martin v. Löwis11437992002-04-12 09:54:03 +000010367 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010368#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010369_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000010370
Martin v. Löwis11437992002-04-12 09:54:03 +000010371 if test "${ac_cv_header_cthreads_h+set}" = set; then
10372 echo "$as_me:$LINENO: checking for cthreads.h" >&5
10373echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10374if test "${ac_cv_header_cthreads_h+set}" = set; then
10375 echo $ECHO_N "(cached) $ECHO_C" >&6
10376fi
10377echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10378echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010379else
Martin v. Löwis11437992002-04-12 09:54:03 +000010380 # Is the header compilable?
10381echo "$as_me:$LINENO: checking cthreads.h usability" >&5
10382echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6
10383cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010384#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010385/* confdefs.h. */
10386_ACEOF
10387cat confdefs.h >>conftest.$ac_ext
10388cat >>conftest.$ac_ext <<_ACEOF
10389/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010390$ac_includes_default
10391#include <cthreads.h>
10392_ACEOF
10393rm -f conftest.$ac_objext
10394if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010395 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010396 ac_status=$?
10397 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10398 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010399 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010400 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10401 (eval $ac_try) 2>&5
10402 ac_status=$?
10403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10404 (exit $ac_status); }; }; then
10405 ac_header_compiler=yes
10406else
10407 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010408sed 's/^/| /' conftest.$ac_ext >&5
10409
Martin v. Löwis11437992002-04-12 09:54:03 +000010410ac_header_compiler=no
10411fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010412rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010413echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10414echo "${ECHO_T}$ac_header_compiler" >&6
10415
10416# Is the header present?
10417echo "$as_me:$LINENO: checking cthreads.h presence" >&5
10418echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6
10419cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010420#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010421/* confdefs.h. */
10422_ACEOF
10423cat confdefs.h >>conftest.$ac_ext
10424cat >>conftest.$ac_ext <<_ACEOF
10425/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010426#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010427_ACEOF
10428if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10429 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10430 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010431 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010432 rm -f conftest.er1
10433 cat conftest.err >&5
10434 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10435 (exit $ac_status); } >/dev/null; then
10436 if test -s conftest.err; then
10437 ac_cpp_err=$ac_c_preproc_warn_flag
10438 else
10439 ac_cpp_err=
10440 fi
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010441else
Martin v. Löwis11437992002-04-12 09:54:03 +000010442 ac_cpp_err=yes
10443fi
10444if test -z "$ac_cpp_err"; then
10445 ac_header_preproc=yes
10446else
10447 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010448sed 's/^/| /' conftest.$ac_ext >&5
10449
Martin v. Löwis11437992002-04-12 09:54:03 +000010450 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010451fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010452rm -f conftest.err conftest.$ac_ext
10453echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10454echo "${ECHO_T}$ac_header_preproc" >&6
10455
10456# So? What about this header?
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010457case $ac_header_compiler:$ac_header_preproc in
10458 yes:no )
Martin v. Löwis11437992002-04-12 09:54:03 +000010459 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10460echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000010461 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010462echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10463 (
10464 cat <<\_ASBOX
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010465## ------------------------------------ ##
10466## Report this to bug-autoconf@gnu.org. ##
10467## ------------------------------------ ##
10468_ASBOX
10469 ) |
10470 sed "s/^/$as_me: WARNING: /" >&2
10471 ;;
10472 no:yes )
10473 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
10474echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
10475 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
10476echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
10477 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
10478echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
10479 (
10480 cat <<\_ASBOX
10481## ------------------------------------ ##
10482## Report this to bug-autoconf@gnu.org. ##
10483## ------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000010484_ASBOX
10485 ) |
10486 sed "s/^/$as_me: WARNING: /" >&2
10487 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010488esac
10489echo "$as_me:$LINENO: checking for cthreads.h" >&5
10490echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6
10491if test "${ac_cv_header_cthreads_h+set}" = set; then
10492 echo $ECHO_N "(cached) $ECHO_C" >&6
10493else
10494 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010495fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010496echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
10497echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6
10498
10499fi
10500if test $ac_cv_header_cthreads_h = yes; then
10501 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010502#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010503_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010504
Martin v. Löwis11437992002-04-12 09:54:03 +000010505 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010506#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010507_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010508
Martin v. Löwis11437992002-04-12 09:54:03 +000010509
10510cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010511#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010512_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010513
10514 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010515 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010516else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010517
Martin v. Löwis11437992002-04-12 09:54:03 +000010518 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10519 echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10520echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10521if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10522 echo $ECHO_N "(cached) $ECHO_C" >&6
10523fi
10524echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10525echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010526else
Martin v. Löwis11437992002-04-12 09:54:03 +000010527 # Is the header compilable?
10528echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
10529echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6
10530cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010531#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010532/* confdefs.h. */
10533_ACEOF
10534cat confdefs.h >>conftest.$ac_ext
10535cat >>conftest.$ac_ext <<_ACEOF
10536/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010537$ac_includes_default
10538#include <mach/cthreads.h>
10539_ACEOF
10540rm -f conftest.$ac_objext
10541if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010542 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010543 ac_status=$?
10544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10545 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010546 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010547 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10548 (eval $ac_try) 2>&5
10549 ac_status=$?
10550 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10551 (exit $ac_status); }; }; then
10552 ac_header_compiler=yes
10553else
10554 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010555sed 's/^/| /' conftest.$ac_ext >&5
10556
Martin v. Löwis11437992002-04-12 09:54:03 +000010557ac_header_compiler=no
10558fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010559rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010560echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10561echo "${ECHO_T}$ac_header_compiler" >&6
10562
10563# Is the header present?
10564echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
10565echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6
10566cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010567#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010568/* confdefs.h. */
10569_ACEOF
10570cat confdefs.h >>conftest.$ac_ext
10571cat >>conftest.$ac_ext <<_ACEOF
10572/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010573#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010574_ACEOF
10575if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10576 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10577 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010578 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000010579 rm -f conftest.er1
10580 cat conftest.err >&5
10581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10582 (exit $ac_status); } >/dev/null; then
10583 if test -s conftest.err; then
10584 ac_cpp_err=$ac_c_preproc_warn_flag
10585 else
10586 ac_cpp_err=
10587 fi
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010588else
Martin v. Löwis11437992002-04-12 09:54:03 +000010589 ac_cpp_err=yes
10590fi
10591if test -z "$ac_cpp_err"; then
10592 ac_header_preproc=yes
10593else
10594 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010595sed 's/^/| /' conftest.$ac_ext >&5
10596
Martin v. Löwis11437992002-04-12 09:54:03 +000010597 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010598fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010599rm -f conftest.err conftest.$ac_ext
10600echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10601echo "${ECHO_T}$ac_header_preproc" >&6
10602
10603# So? What about this header?
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010604case $ac_header_compiler:$ac_header_preproc in
10605 yes:no )
Martin v. Löwis11437992002-04-12 09:54:03 +000010606 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10607echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000010608 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010609echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10610 (
10611 cat <<\_ASBOX
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010612## ------------------------------------ ##
10613## Report this to bug-autoconf@gnu.org. ##
10614## ------------------------------------ ##
10615_ASBOX
10616 ) |
10617 sed "s/^/$as_me: WARNING: /" >&2
10618 ;;
10619 no:yes )
10620 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
10621echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
10622 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
10623echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
10624 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
10625echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
10626 (
10627 cat <<\_ASBOX
10628## ------------------------------------ ##
10629## Report this to bug-autoconf@gnu.org. ##
10630## ------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000010631_ASBOX
10632 ) |
10633 sed "s/^/$as_me: WARNING: /" >&2
10634 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010635esac
10636echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
10637echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6
10638if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
10639 echo $ECHO_N "(cached) $ECHO_C" >&6
10640else
10641 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010642fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010643echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
10644echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6
10645
10646fi
10647if test $ac_cv_header_mach_cthreads_h = yes; then
10648 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010649#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010650_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010651
Martin v. Löwis11437992002-04-12 09:54:03 +000010652 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010653#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010654_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010655
Martin v. Löwis11437992002-04-12 09:54:03 +000010656
10657cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010658#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010659_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000010660
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010661 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010662else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000010663
Martin v. Löwis11437992002-04-12 09:54:03 +000010664 echo "$as_me:$LINENO: checking for --with-pth" >&5
10665echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6
10666
10667# Check whether --with-pth or --without-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010668if test "${with_pth+set}" = set; then
10669 withval="$with_pth"
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010670 echo "$as_me:$LINENO: result: $withval" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010671echo "${ECHO_T}$withval" >&6
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010672 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000010673#define WITH_THREAD 1
10674_ACEOF
10675
10676
10677cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010678#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010679_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010680
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010681 LIBS="-lpth $LIBS"
10682 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000010683else
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000010684 echo "$as_me:$LINENO: result: no" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010685echo "${ECHO_T}no" >&6
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010686
10687 # Just looking for pthread_create in libpthread is not enough:
10688 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
10689 # So we really have to include pthread.h, and then link.
10690 _libs=$LIBS
10691 LIBS="$LIBS -lpthread"
Martin v. Löwis11437992002-04-12 09:54:03 +000010692 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
10693echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6
10694 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010695#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010696/* confdefs.h. */
10697_ACEOF
10698cat confdefs.h >>conftest.$ac_ext
10699cat >>conftest.$ac_ext <<_ACEOF
10700/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010701#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000010702
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010703void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000010704int
10705main ()
10706{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010707
10708pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000010709 ;
10710 return 0;
10711}
10712_ACEOF
10713rm -f conftest.$ac_objext conftest$ac_exeext
10714if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010715 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010716 ac_status=$?
10717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10718 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010719 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10721 (eval $ac_try) 2>&5
10722 ac_status=$?
10723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10724 (exit $ac_status); }; }; then
10725
10726 echo "$as_me:$LINENO: result: yes" >&5
10727echo "${ECHO_T}yes" >&6
10728 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010729#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010730_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000010731
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010732 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010733 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000010734else
Martin v. Löwis11437992002-04-12 09:54:03 +000010735 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010736sed 's/^/| /' conftest.$ac_ext >&5
10737
Martin v. Löwis11437992002-04-12 09:54:03 +000010738
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000010739 LIBS=$_libs
Martin v. Löwis11437992002-04-12 09:54:03 +000010740 echo "$as_me:$LINENO: checking for pthread_detach" >&5
10741echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6
10742if test "${ac_cv_func_pthread_detach+set}" = set; then
10743 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000010744else
Martin v. Löwis11437992002-04-12 09:54:03 +000010745 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010746#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010747/* confdefs.h. */
10748_ACEOF
10749cat confdefs.h >>conftest.$ac_ext
10750cat >>conftest.$ac_ext <<_ACEOF
10751/* end confdefs.h. */
Guido van Rossumad678af1998-10-02 14:42:15 +000010752/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000010753 which can conflict with char pthread_detach (); below.
10754 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000010755 <limits.h> exists even on freestanding compilers. Under hpux,
10756 including <limits.h> includes <sys/time.h> and causes problems
10757 checking for functions defined therein. */
10758#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000010759# include <limits.h>
10760#else
10761# include <assert.h>
10762#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010763/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010764#ifdef __cplusplus
10765extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000010766{
Martin v. Löwis11437992002-04-12 09:54:03 +000010767#endif
Guido van Rossumad678af1998-10-02 14:42:15 +000010768/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000010769 builtin and then its argument prototype would still apply. */
10770char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000010771/* The GNU C library defines this for functions which it implements
10772 to always fail with ENOSYS. Some functions are actually named
10773 something starting with __ and the normal name is an alias. */
Guido van Rossumea516321998-12-17 18:08:55 +000010774#if defined (__stub_pthread_detach) || defined (__stub___pthread_detach)
Guido van Rossumad678af1998-10-02 14:42:15 +000010775choke me
10776#else
Skip Montanaro6dead952003-09-25 14:50:04 +000010777char (*f) () = pthread_detach;
10778#endif
10779#ifdef __cplusplus
10780}
Guido van Rossumad678af1998-10-02 14:42:15 +000010781#endif
10782
Skip Montanaro6dead952003-09-25 14:50:04 +000010783int
10784main ()
10785{
10786return f != pthread_detach;
Martin v. Löwis11437992002-04-12 09:54:03 +000010787 ;
10788 return 0;
10789}
10790_ACEOF
10791rm -f conftest.$ac_objext conftest$ac_exeext
10792if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010793 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010794 ac_status=$?
10795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10796 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010797 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010798 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10799 (eval $ac_try) 2>&5
10800 ac_status=$?
10801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10802 (exit $ac_status); }; }; then
10803 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000010804else
Martin v. Löwis11437992002-04-12 09:54:03 +000010805 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010806sed 's/^/| /' conftest.$ac_ext >&5
10807
Martin v. Löwis11437992002-04-12 09:54:03 +000010808ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000010809fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010810rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000010811fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010812echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
10813echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6
10814if test $ac_cv_func_pthread_detach = yes; then
10815 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010816#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000010817_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000010818
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000010819 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000010820 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000010821else
Guido van Rossumad678af1998-10-02 14:42:15 +000010822
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010823 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10824 echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10825echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10826if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10827 echo $ECHO_N "(cached) $ECHO_C" >&6
10828fi
10829echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10830echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10831else
10832 # Is the header compilable?
10833echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
10834echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6
10835cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010836#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010837/* confdefs.h. */
10838_ACEOF
10839cat confdefs.h >>conftest.$ac_ext
10840cat >>conftest.$ac_ext <<_ACEOF
10841/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010842$ac_includes_default
10843#include <atheos/threads.h>
10844_ACEOF
10845rm -f conftest.$ac_objext
10846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010847 (eval $ac_compile) 2>&5
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010848 ac_status=$?
10849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10850 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010851 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10853 (eval $ac_try) 2>&5
10854 ac_status=$?
10855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10856 (exit $ac_status); }; }; then
10857 ac_header_compiler=yes
10858else
10859 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010860sed 's/^/| /' conftest.$ac_ext >&5
10861
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010862ac_header_compiler=no
10863fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010864rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010865echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10866echo "${ECHO_T}$ac_header_compiler" >&6
10867
10868# Is the header present?
10869echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
10870echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6
10871cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010872#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010873/* confdefs.h. */
10874_ACEOF
10875cat confdefs.h >>conftest.$ac_ext
10876cat >>conftest.$ac_ext <<_ACEOF
10877/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010878#include <atheos/threads.h>
10879_ACEOF
10880if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
10881 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10882 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000010883 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010884 rm -f conftest.er1
10885 cat conftest.err >&5
10886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10887 (exit $ac_status); } >/dev/null; then
10888 if test -s conftest.err; then
10889 ac_cpp_err=$ac_c_preproc_warn_flag
10890 else
10891 ac_cpp_err=
10892 fi
10893else
10894 ac_cpp_err=yes
10895fi
10896if test -z "$ac_cpp_err"; then
10897 ac_header_preproc=yes
10898else
10899 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010900sed 's/^/| /' conftest.$ac_ext >&5
10901
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010902 ac_header_preproc=no
10903fi
10904rm -f conftest.err conftest.$ac_ext
10905echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10906echo "${ECHO_T}$ac_header_preproc" >&6
10907
10908# So? What about this header?
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010909case $ac_header_compiler:$ac_header_preproc in
10910 yes:no )
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010911 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
10912echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010913 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010914echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10915 (
10916 cat <<\_ASBOX
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010917## ------------------------------------ ##
10918## Report this to bug-autoconf@gnu.org. ##
10919## ------------------------------------ ##
10920_ASBOX
10921 ) |
10922 sed "s/^/$as_me: WARNING: /" >&2
10923 ;;
10924 no:yes )
10925 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
10926echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
10927 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
10928echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
10929 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
10930echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
10931 (
10932 cat <<\_ASBOX
10933## ------------------------------------ ##
10934## Report this to bug-autoconf@gnu.org. ##
10935## ------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000010936_ASBOX
10937 ) |
10938 sed "s/^/$as_me: WARNING: /" >&2
10939 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000010940esac
10941echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
10942echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6
10943if test "${ac_cv_header_atheos_threads_h+set}" = set; then
10944 echo $ECHO_N "(cached) $ECHO_C" >&6
10945else
10946 ac_cv_header_atheos_threads_h=$ac_header_preproc
10947fi
10948echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
10949echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6
10950
10951fi
10952if test $ac_cv_header_atheos_threads_h = yes; then
10953 cat >>confdefs.h <<\_ACEOF
10954#define WITH_THREAD 1
10955_ACEOF
10956
10957
10958cat >>confdefs.h <<\_ACEOF
10959#define ATHEOS_THREADS 1
10960_ACEOF
10961
10962 THREADOBJ="Python/thread.o"
10963else
10964
Martin v. Löwis11437992002-04-12 09:54:03 +000010965 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10966 echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
10967echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
10968if test "${ac_cv_header_kernel_OS_h+set}" = set; then
10969 echo $ECHO_N "(cached) $ECHO_C" >&6
10970fi
10971echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
10972echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000010973else
Martin v. Löwis11437992002-04-12 09:54:03 +000010974 # Is the header compilable?
10975echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
10976echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6
10977cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010978#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000010979/* confdefs.h. */
10980_ACEOF
10981cat confdefs.h >>conftest.$ac_ext
10982cat >>conftest.$ac_ext <<_ACEOF
10983/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010984$ac_includes_default
10985#include <kernel/OS.h>
10986_ACEOF
10987rm -f conftest.$ac_objext
10988if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010989 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010990 ac_status=$?
10991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10992 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000010993 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000010994 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
10995 (eval $ac_try) 2>&5
10996 ac_status=$?
10997 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10998 (exit $ac_status); }; }; then
10999 ac_header_compiler=yes
11000else
11001 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011002sed 's/^/| /' conftest.$ac_ext >&5
11003
Martin v. Löwis11437992002-04-12 09:54:03 +000011004ac_header_compiler=no
11005fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011006rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011007echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11008echo "${ECHO_T}$ac_header_compiler" >&6
11009
11010# Is the header present?
11011echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
11012echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6
11013cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011014#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011015/* confdefs.h. */
11016_ACEOF
11017cat confdefs.h >>conftest.$ac_ext
11018cat >>conftest.$ac_ext <<_ACEOF
11019/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011020#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011021_ACEOF
11022if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
11023 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11024 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000011025 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000011026 rm -f conftest.er1
11027 cat conftest.err >&5
11028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11029 (exit $ac_status); } >/dev/null; then
11030 if test -s conftest.err; then
11031 ac_cpp_err=$ac_c_preproc_warn_flag
11032 else
11033 ac_cpp_err=
11034 fi
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011035else
Martin v. Löwis11437992002-04-12 09:54:03 +000011036 ac_cpp_err=yes
11037fi
11038if test -z "$ac_cpp_err"; then
11039 ac_header_preproc=yes
11040else
11041 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011042sed 's/^/| /' conftest.$ac_ext >&5
11043
Martin v. Löwis11437992002-04-12 09:54:03 +000011044 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011045fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011046rm -f conftest.err conftest.$ac_ext
11047echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11048echo "${ECHO_T}$ac_header_preproc" >&6
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011049
Martin v. Löwis11437992002-04-12 09:54:03 +000011050# So? What about this header?
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011051case $ac_header_compiler:$ac_header_preproc in
11052 yes:no )
Martin v. Löwis11437992002-04-12 09:54:03 +000011053 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
11054echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000011055 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011056echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
11057 (
11058 cat <<\_ASBOX
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011059## ------------------------------------ ##
11060## Report this to bug-autoconf@gnu.org. ##
11061## ------------------------------------ ##
11062_ASBOX
11063 ) |
11064 sed "s/^/$as_me: WARNING: /" >&2
11065 ;;
11066 no:yes )
11067 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
11068echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
11069 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
11070echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
11071 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
11072echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
11073 (
11074 cat <<\_ASBOX
11075## ------------------------------------ ##
11076## Report this to bug-autoconf@gnu.org. ##
11077## ------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000011078_ASBOX
11079 ) |
11080 sed "s/^/$as_me: WARNING: /" >&2
11081 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011082esac
11083echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
11084echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6
11085if test "${ac_cv_header_kernel_OS_h+set}" = set; then
11086 echo $ECHO_N "(cached) $ECHO_C" >&6
11087else
11088 ac_cv_header_kernel_OS_h=$ac_header_preproc
11089fi
11090echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
11091echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6
11092
11093fi
11094if test $ac_cv_header_kernel_OS_h = yes; then
11095 cat >>confdefs.h <<\_ACEOF
11096#define WITH_THREAD 1
11097_ACEOF
11098
11099
11100cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011101#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011102_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011103
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011104 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011105else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011106
Martin v. Löwis11437992002-04-12 09:54:03 +000011107 echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
11108echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6
11109if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
11110 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011111else
Martin v. Löwis11437992002-04-12 09:54:03 +000011112 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011113LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011114cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011115#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011116/* confdefs.h. */
11117_ACEOF
11118cat confdefs.h >>conftest.$ac_ext
11119cat >>conftest.$ac_ext <<_ACEOF
11120/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011121
Greg Steinadf63d62000-07-05 10:38:09 +000011122/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011123#ifdef __cplusplus
11124extern "C"
11125#endif
Greg Steinadf63d62000-07-05 10:38:09 +000011126/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011127 builtin and then its argument prototype would still apply. */
11128char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011129int
11130main ()
11131{
11132pthread_create ();
11133 ;
11134 return 0;
11135}
11136_ACEOF
11137rm -f conftest.$ac_objext conftest$ac_exeext
11138if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011139 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011140 ac_status=$?
11141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11142 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011143 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011144 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11145 (eval $ac_try) 2>&5
11146 ac_status=$?
11147 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11148 (exit $ac_status); }; }; then
11149 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000011150else
Martin v. Löwis11437992002-04-12 09:54:03 +000011151 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011152sed 's/^/| /' conftest.$ac_ext >&5
11153
Martin v. Löwis11437992002-04-12 09:54:03 +000011154ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000011155fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011156rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011157LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011158fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011159echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
11160echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6
11161if test $ac_cv_lib_pthreads_pthread_create = yes; then
11162 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011163#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011164_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000011165
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011166 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011167 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011168 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000011169else
Greg Steinadf63d62000-07-05 10:38:09 +000011170
Martin v. Löwis11437992002-04-12 09:54:03 +000011171 echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
11172echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6
11173if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
11174 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000011175else
Martin v. Löwis11437992002-04-12 09:54:03 +000011176 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000011177LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011178cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011179#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011180/* confdefs.h. */
11181_ACEOF
11182cat confdefs.h >>conftest.$ac_ext
11183cat >>conftest.$ac_ext <<_ACEOF
11184/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011185
Guido van Rossum49545951997-12-02 19:28:29 +000011186/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011187#ifdef __cplusplus
11188extern "C"
11189#endif
Guido van Rossum49545951997-12-02 19:28:29 +000011190/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011191 builtin and then its argument prototype would still apply. */
11192char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011193int
11194main ()
11195{
11196pthread_create ();
11197 ;
11198 return 0;
11199}
11200_ACEOF
11201rm -f conftest.$ac_objext conftest$ac_exeext
11202if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011203 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011204 ac_status=$?
11205 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11206 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011207 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011208 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11209 (eval $ac_try) 2>&5
11210 ac_status=$?
11211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11212 (exit $ac_status); }; }; then
11213 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000011214else
Martin v. Löwis11437992002-04-12 09:54:03 +000011215 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011216sed 's/^/| /' conftest.$ac_ext >&5
11217
Martin v. Löwis11437992002-04-12 09:54:03 +000011218ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000011219fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011220rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011221LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000011222fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011223echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
11224echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6
11225if test $ac_cv_lib_c_r_pthread_create = yes; then
11226 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011227#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011228_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000011229
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011230 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011231 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011232 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011233else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011234
Martin v. Löwis11437992002-04-12 09:54:03 +000011235 echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
11236echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6
11237if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
11238 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011239else
Martin v. Löwis11437992002-04-12 09:54:03 +000011240 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011241LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011242cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011243#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011244/* confdefs.h. */
11245_ACEOF
11246cat confdefs.h >>conftest.$ac_ext
11247cat >>conftest.$ac_ext <<_ACEOF
11248/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011249
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011250/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011251#ifdef __cplusplus
11252extern "C"
11253#endif
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011254/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011255 builtin and then its argument prototype would still apply. */
11256char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011257int
11258main ()
11259{
11260__pthread_create_system ();
11261 ;
11262 return 0;
11263}
11264_ACEOF
11265rm -f conftest.$ac_objext conftest$ac_exeext
11266if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011267 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011268 ac_status=$?
11269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11270 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011271 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011272 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11273 (eval $ac_try) 2>&5
11274 ac_status=$?
11275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11276 (exit $ac_status); }; }; then
11277 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011278else
Martin v. Löwis11437992002-04-12 09:54:03 +000011279 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011280sed 's/^/| /' conftest.$ac_ext >&5
11281
Martin v. Löwis11437992002-04-12 09:54:03 +000011282ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011283fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011284rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011285LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011286fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011287echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
11288echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6
11289if test $ac_cv_lib_pthread___pthread_create_system = yes; then
11290 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011291#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011292_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011293
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011294 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011295 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011296 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011297else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000011298
Martin v. Löwis11437992002-04-12 09:54:03 +000011299 echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
11300echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6
11301if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
11302 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000011303else
Martin v. Löwis11437992002-04-12 09:54:03 +000011304 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011305LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011306cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011307#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011308/* confdefs.h. */
11309_ACEOF
11310cat confdefs.h >>conftest.$ac_ext
11311cat >>conftest.$ac_ext <<_ACEOF
11312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011313
Guido van Rossumb93a8621998-05-07 13:27:32 +000011314/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011315#ifdef __cplusplus
11316extern "C"
11317#endif
Guido van Rossumb93a8621998-05-07 13:27:32 +000011318/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011319 builtin and then its argument prototype would still apply. */
11320char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011321int
11322main ()
11323{
11324pthread_create ();
11325 ;
11326 return 0;
11327}
11328_ACEOF
11329rm -f conftest.$ac_objext conftest$ac_exeext
11330if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011331 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011332 ac_status=$?
11333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11334 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011335 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011336 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11337 (eval $ac_try) 2>&5
11338 ac_status=$?
11339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11340 (exit $ac_status); }; }; then
11341 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000011342else
Martin v. Löwis11437992002-04-12 09:54:03 +000011343 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011344sed 's/^/| /' conftest.$ac_ext >&5
11345
Martin v. Löwis11437992002-04-12 09:54:03 +000011346ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000011347fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011348rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011349LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000011350fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011351echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
11352echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6
11353if test $ac_cv_lib_cma_pthread_create = yes; then
11354 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011355#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011356_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000011357
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000011358 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000011359 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011360 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000011361else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000011362
Martin v. Löwis130fb172001-07-19 11:00:41 +000011363 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000011364fi
11365
Guido van Rossum627b2d71993-12-24 10:39:16 +000011366
Guido van Rossum7b3853f1996-07-30 18:09:35 +000011367fi
11368
Guido van Rossum0be3e491997-05-22 20:33:33 +000011369fi
11370
Guido van Rossum49545951997-12-02 19:28:29 +000011371fi
11372
Guido van Rossumb93a8621998-05-07 13:27:32 +000011373fi
11374
Guido van Rossum07bd90e2000-05-08 13:41:38 +000011375
Michael W. Hudson54241132001-12-07 15:38:26 +000011376fi
11377
Martin v. Löwisf90ae202002-06-11 06:22:31 +000011378
11379fi
11380
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011381fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011382rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011383fi;
11384fi
11385
11386
11387fi
11388
Martin v. Löwisa6e97582002-01-01 18:41:33 +000011389
Michael W. Hudson54241132001-12-07 15:38:26 +000011390
Martin v. Löwis11437992002-04-12 09:54:03 +000011391 echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
11392echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6
11393if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
11394 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011395else
Martin v. Löwis11437992002-04-12 09:54:03 +000011396 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011397LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011398cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011399#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011400/* confdefs.h. */
11401_ACEOF
11402cat confdefs.h >>conftest.$ac_ext
11403cat >>conftest.$ac_ext <<_ACEOF
11404/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011405
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011406/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011407#ifdef __cplusplus
11408extern "C"
11409#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011410/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011411 builtin and then its argument prototype would still apply. */
11412char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011413int
11414main ()
11415{
11416usconfig ();
11417 ;
11418 return 0;
11419}
11420_ACEOF
11421rm -f conftest.$ac_objext conftest$ac_exeext
11422if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011423 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011424 ac_status=$?
11425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11426 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011427 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011428 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11429 (eval $ac_try) 2>&5
11430 ac_status=$?
11431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11432 (exit $ac_status); }; }; then
11433 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011434else
Martin v. Löwis11437992002-04-12 09:54:03 +000011435 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011436sed 's/^/| /' conftest.$ac_ext >&5
11437
Martin v. Löwis11437992002-04-12 09:54:03 +000011438ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011439fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011440rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011441LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011442fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011443echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
11444echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6
11445if test $ac_cv_lib_mpc_usconfig = yes; then
11446 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011447#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011448_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011449
Martin v. Löwis130fb172001-07-19 11:00:41 +000011450 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011451 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000011452 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011453fi
11454
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011455
Neal Norwitza978ab02002-11-02 16:58:05 +000011456 if test "$posix_threads" != "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011457 echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
11458echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6
11459if test "${ac_cv_lib_thread_thr_create+set}" = set; then
11460 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011461else
Martin v. Löwis11437992002-04-12 09:54:03 +000011462 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000011463LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000011464cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011465#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011466/* confdefs.h. */
11467_ACEOF
11468cat confdefs.h >>conftest.$ac_ext
11469cat >>conftest.$ac_ext <<_ACEOF
11470/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011471
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011472/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011473#ifdef __cplusplus
11474extern "C"
11475#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000011476/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000011477 builtin and then its argument prototype would still apply. */
11478char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000011479int
11480main ()
11481{
11482thr_create ();
11483 ;
11484 return 0;
11485}
11486_ACEOF
11487rm -f conftest.$ac_objext conftest$ac_exeext
11488if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011489 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011490 ac_status=$?
11491 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11492 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011493 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011494 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11495 (eval $ac_try) 2>&5
11496 ac_status=$?
11497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11498 (exit $ac_status); }; }; then
11499 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011500else
Martin v. Löwis11437992002-04-12 09:54:03 +000011501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011502sed 's/^/| /' conftest.$ac_ext >&5
11503
Martin v. Löwis11437992002-04-12 09:54:03 +000011504ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000011505fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011506rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011507LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011508fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011509echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
11510echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6
11511if test $ac_cv_lib_thread_thr_create = yes; then
11512 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000011513#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011514_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000011515
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011516 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000011517 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011518 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000011519fi
11520
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000011521 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000011522
Martin v. Löwis130fb172001-07-19 11:00:41 +000011523 if test "$USE_THREAD_MODULE" != "#"
11524 then
11525 # If the above checks didn't disable threads, (at least) OSF1
11526 # needs this '-threads' argument during linking.
11527 case $ac_sys_system in
11528 OSF1) LDLAST=-threads;;
11529 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000011530 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011531fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011532
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011533if test "$posix_threads" = "yes"; then
11534 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011535
11536cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011537#define _POSIX_THREADS 1
11538_ACEOF
11539
11540 fi
11541
11542 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
11543 case $ac_sys_system/$ac_sys_release in
11544 SunOS/5.6)
11545cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011546#define HAVE_PTHREAD_DESTRUCTOR 1
11547_ACEOF
11548
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011549 ;;
11550 SunOS/5.8)
11551cat >>confdefs.h <<\_ACEOF
11552#define HAVE_BROKEN_POSIX_SEMAPHORES 1
11553_ACEOF
11554
11555 ;;
11556 esac
11557
11558 echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
11559echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6
11560 if test "${ac_cv_pthread_system_supported+set}" = set; then
11561 echo $ECHO_N "(cached) $ECHO_C" >&6
11562else
11563 if test "$cross_compiling" = yes; then
11564 ac_cv_pthread_system_supported=no
11565else
11566 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011567#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011568/* confdefs.h. */
11569_ACEOF
11570cat confdefs.h >>conftest.$ac_ext
11571cat >>conftest.$ac_ext <<_ACEOF
11572/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011573#include <pthread.h>
11574 void *foo(void *parm) {
11575 return NULL;
11576 }
11577 main() {
11578 pthread_attr_t attr;
11579 pthread_t id;
11580 if (pthread_attr_init(&attr)) exit(-1);
11581 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
11582 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
11583 exit(0);
11584 }
11585_ACEOF
11586rm -f conftest$ac_exeext
11587if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11588 (eval $ac_link) 2>&5
11589 ac_status=$?
11590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11591 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11592 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11593 (eval $ac_try) 2>&5
11594 ac_status=$?
11595 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11596 (exit $ac_status); }; }; then
11597 ac_cv_pthread_system_supported=yes
11598else
11599 echo "$as_me: program exited with status $ac_status" >&5
11600echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011601sed 's/^/| /' conftest.$ac_ext >&5
11602
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011603( exit $ac_status )
11604ac_cv_pthread_system_supported=no
11605fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011606rm -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 +000011607fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000011608
Guido van Rossum627b2d71993-12-24 10:39:16 +000011609fi
11610
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011611 echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
11612echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6
11613 if test "$ac_cv_pthread_system_supported" = "yes"; then
11614
11615cat >>confdefs.h <<\_ACEOF
11616#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
11617_ACEOF
11618
11619 fi
11620
11621for ac_func in pthread_sigmask
11622do
11623as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
11624echo "$as_me:$LINENO: checking for $ac_func" >&5
11625echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
11626if eval "test \"\${$as_ac_var+set}\" = set"; then
11627 echo $ECHO_N "(cached) $ECHO_C" >&6
11628else
11629 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011630#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011631/* confdefs.h. */
11632_ACEOF
11633cat confdefs.h >>conftest.$ac_ext
11634cat >>conftest.$ac_ext <<_ACEOF
11635/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011636/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000011637 which can conflict with char $ac_func (); below.
11638 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000011639 <limits.h> exists even on freestanding compilers. Under hpux,
11640 including <limits.h> includes <sys/time.h> and causes problems
11641 checking for functions defined therein. */
11642#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000011643# include <limits.h>
11644#else
11645# include <assert.h>
11646#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011647/* Override any gcc2 internal prototype to avoid an error. */
11648#ifdef __cplusplus
11649extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000011650{
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011651#endif
11652/* We use char because int might match the return type of a gcc2
11653 builtin and then its argument prototype would still apply. */
11654char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011655/* The GNU C library defines this for functions which it implements
11656 to always fail with ENOSYS. Some functions are actually named
11657 something starting with __ and the normal name is an alias. */
11658#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11659choke me
11660#else
Skip Montanaro6dead952003-09-25 14:50:04 +000011661char (*f) () = $ac_func;
11662#endif
11663#ifdef __cplusplus
11664}
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011665#endif
11666
Skip Montanaro6dead952003-09-25 14:50:04 +000011667int
11668main ()
11669{
11670return f != $ac_func;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011671 ;
11672 return 0;
11673}
11674_ACEOF
11675rm -f conftest.$ac_objext conftest$ac_exeext
11676if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011677 (eval $ac_link) 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011678 ac_status=$?
11679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11680 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011681 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011682 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11683 (eval $ac_try) 2>&5
11684 ac_status=$?
11685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11686 (exit $ac_status); }; }; then
11687 eval "$as_ac_var=yes"
11688else
11689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011690sed 's/^/| /' conftest.$ac_ext >&5
11691
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011692eval "$as_ac_var=no"
11693fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011694rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011695fi
11696echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
11697echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
11698if test `eval echo '${'$as_ac_var'}'` = yes; then
11699 cat >>confdefs.h <<_ACEOF
11700#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
11701_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000011702 case $ac_sys_system in
11703 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011704
Jason Tishlerfac083d2003-07-22 15:20:49 +000011705cat >>confdefs.h <<\_ACEOF
11706#define HAVE_BROKEN_PTHREAD_SIGMASK 1
11707_ACEOF
11708
11709 ;;
11710 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000011711fi
11712done
11713
11714fi
11715
11716
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011717# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000011718
11719
11720echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
11721echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011722# Check whether --enable-ipv6 or --disable-ipv6 was given.
11723if test "${enable_ipv6+set}" = set; then
11724 enableval="$enable_ipv6"
11725 case "$enableval" in
11726 no)
Martin v. Löwis11437992002-04-12 09:54:03 +000011727 echo "$as_me:$LINENO: result: no" >&5
11728echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011729 ipv6=no
11730 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011731 *) echo "$as_me:$LINENO: result: yes" >&5
11732echo "${ECHO_T}yes" >&6
11733 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011734#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011735_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011736
11737 ipv6=yes
11738 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011739 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011740else
Martin v. Löwis11437992002-04-12 09:54:03 +000011741
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011742 if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011743 echo "$as_me:$LINENO: result: no" >&5
11744echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011745 ipv6=no
11746
11747else
Martin v. Löwis11437992002-04-12 09:54:03 +000011748 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011749#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011750/* confdefs.h. */
11751_ACEOF
11752cat confdefs.h >>conftest.$ac_ext
11753cat >>conftest.$ac_ext <<_ACEOF
11754/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011755 /* AF_INET6 available check */
11756#include <sys/types.h>
11757#include <sys/socket.h>
11758main()
11759{
11760 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
11761 exit(1);
11762 else
11763 exit(0);
11764}
11765
Martin v. Löwis11437992002-04-12 09:54:03 +000011766_ACEOF
11767rm -f conftest$ac_exeext
11768if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
11769 (eval $ac_link) 2>&5
11770 ac_status=$?
11771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11772 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11773 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11774 (eval $ac_try) 2>&5
11775 ac_status=$?
11776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11777 (exit $ac_status); }; }; then
11778 echo "$as_me:$LINENO: result: yes" >&5
11779echo "${ECHO_T}yes" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011780 ipv6=yes
11781else
Martin v. Löwis11437992002-04-12 09:54:03 +000011782 echo "$as_me: program exited with status $ac_status" >&5
11783echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011784sed 's/^/| /' conftest.$ac_ext >&5
11785
Martin v. Löwis11437992002-04-12 09:54:03 +000011786( exit $ac_status )
11787echo "$as_me:$LINENO: result: no" >&5
11788echo "${ECHO_T}no" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011789 ipv6=no
11790fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011791rm -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 +000011792fi
11793
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011794if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011795 echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
11796echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6
11797 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011798#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011799/* confdefs.h. */
11800_ACEOF
11801cat confdefs.h >>conftest.$ac_ext
11802cat >>conftest.$ac_ext <<_ACEOF
11803/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011804#include <sys/types.h>
11805#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011806int
11807main ()
11808{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011809struct sockaddr_in6 x;
11810x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000011811 ;
11812 return 0;
11813}
11814_ACEOF
11815rm -f conftest.$ac_objext
11816if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011817 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011818 ac_status=$?
11819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11820 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011821 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000011822 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
11823 (eval $ac_try) 2>&5
11824 ac_status=$?
11825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11826 (exit $ac_status); }; }; then
11827 echo "$as_me:$LINENO: result: yes" >&5
11828echo "${ECHO_T}yes" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011829 ipv6=yes
11830else
Martin v. Löwis11437992002-04-12 09:54:03 +000011831 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011832sed 's/^/| /' conftest.$ac_ext >&5
11833
Martin v. Löwis11437992002-04-12 09:54:03 +000011834echo "$as_me:$LINENO: result: no" >&5
11835echo "${ECHO_T}no" >&6
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011836 ipv6=no
11837fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011838rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011839fi
11840
11841if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011842 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011843#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011844_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000011845
11846fi
11847
Martin v. Löwis11437992002-04-12 09:54:03 +000011848fi;
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011849
11850ipv6type=unknown
11851ipv6lib=none
11852ipv6trylibc=no
11853
11854if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011855 echo "$as_me:$LINENO: checking ipv6 stack type" >&5
11856echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
Guido van Rossumb8552162001-09-05 14:58:11 +000011857 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
11858 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011859 case $i in
11860 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000011861 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011862#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011863/* confdefs.h. */
11864_ACEOF
11865cat confdefs.h >>conftest.$ac_ext
11866cat >>conftest.$ac_ext <<_ACEOF
11867/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011868
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011869#include <netinet/in.h>
11870#ifdef IPV6_INRIA_VERSION
11871yes
11872#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011873_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011874if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011875 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011876 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011877fi
11878rm -f conftest*
11879
11880 ;;
11881 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000011882 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011883#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011884/* confdefs.h. */
11885_ACEOF
11886cat confdefs.h >>conftest.$ac_ext
11887cat >>conftest.$ac_ext <<_ACEOF
11888/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011889
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011890#include <netinet/in.h>
11891#ifdef __KAME__
11892yes
11893#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011894_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011895if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011896 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011897 ipv6type=$i;
11898 ipv6lib=inet6
11899 ipv6libdir=/usr/local/v6/lib
11900 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011901fi
11902rm -f conftest*
11903
11904 ;;
11905 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000011906 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011907#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011908/* confdefs.h. */
11909_ACEOF
11910cat confdefs.h >>conftest.$ac_ext
11911cat >>conftest.$ac_ext <<_ACEOF
11912/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011913
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011914#include <features.h>
11915#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
11916yes
11917#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011918_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011919if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011920 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011921 ipv6type=$i;
11922 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011923fi
11924rm -f conftest*
11925
11926 ;;
11927 linux-inet6)
11928 if test -d /usr/inet6; then
11929 ipv6type=$i
11930 ipv6lib=inet6
11931 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000011932 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011933 fi
11934 ;;
11935 solaris)
11936 if test -f /etc/netconfig; then
11937 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
11938 ipv6type=$i
11939 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011940 fi
11941 fi
11942 ;;
11943 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000011944 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011945#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011946/* confdefs.h. */
11947_ACEOF
11948cat confdefs.h >>conftest.$ac_ext
11949cat >>conftest.$ac_ext <<_ACEOF
11950/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011951
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011952#include <sys/param.h>
11953#ifdef _TOSHIBA_INET6
11954yes
11955#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011956_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011957if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011958 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011959 ipv6type=$i;
11960 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000011961 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011962fi
11963rm -f conftest*
11964
11965 ;;
11966 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000011967 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011968#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011969/* confdefs.h. */
11970_ACEOF
11971cat confdefs.h >>conftest.$ac_ext
11972cat >>conftest.$ac_ext <<_ACEOF
11973/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011974
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011975#include </usr/local/v6/include/sys/v6config.h>
11976#ifdef __V6D__
11977yes
11978#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000011979_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011980if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000011981 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011982 ipv6type=$i;
11983 ipv6lib=v6;
11984 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000011985 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011986fi
11987rm -f conftest*
11988
11989 ;;
11990 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000011991 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000011992#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000011993/* confdefs.h. */
11994_ACEOF
11995cat confdefs.h >>conftest.$ac_ext
11996cat >>conftest.$ac_ext <<_ACEOF
11997/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000011998
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000011999#include <sys/param.h>
12000#ifdef _ZETA_MINAMI_INET6
12001yes
12002#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000012003_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012004if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000012005 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012006 ipv6type=$i;
12007 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000012008 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012009fi
12010rm -f conftest*
12011
12012 ;;
12013 esac
12014 if test "$ipv6type" != "unknown"; then
12015 break
12016 fi
12017 done
Martin v. Löwis11437992002-04-12 09:54:03 +000012018 echo "$as_me:$LINENO: result: $ipv6type" >&5
12019echo "${ECHO_T}$ipv6type" >&6
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000012020fi
12021
12022if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
12023 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
12024 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
12025 echo "using lib$ipv6lib"
12026 else
12027 if test $ipv6trylibc = "yes"; then
12028 echo "using libc"
12029 else
12030 echo 'Fatal: no $ipv6lib library found. cannot continue.'
12031 echo "You need to fetch lib$ipv6lib.a from appropriate"
12032 echo 'ipv6 kit and compile beforehand.'
12033 exit 1
12034 fi
12035 fi
12036fi
12037
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000012038# Check for --with-doc-strings
12039echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
12040echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6
12041
12042# Check whether --with-doc-strings or --without-doc-strings was given.
12043if test "${with_doc_strings+set}" = set; then
12044 withval="$with_doc_strings"
12045
12046fi;
12047
12048if test -z "$with_doc_strings"
12049then with_doc_strings="yes"
12050fi
12051if test "$with_doc_strings" != "no"
12052then
12053
12054cat >>confdefs.h <<\_ACEOF
12055#define WITH_DOC_STRINGS 1
12056_ACEOF
12057
12058fi
12059echo "$as_me:$LINENO: result: $with_doc_strings" >&5
12060echo "${ECHO_T}$with_doc_strings" >&6
12061
Neil Schemenauera35c6882001-02-27 04:45:05 +000012062# Check for Python-specific malloc support
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000012063echo "$as_me:$LINENO: checking for --with-tsc" >&5
12064echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6
12065
12066# Check whether --with-tsc or --without-tsc was given.
12067if test "${with_tsc+set}" = set; then
12068 withval="$with_tsc"
12069
12070if test "$withval" != no
12071then
12072
12073cat >>confdefs.h <<\_ACEOF
12074#define WITH_TSC 1
12075_ACEOF
12076
12077 echo "$as_me:$LINENO: result: yes" >&5
12078echo "${ECHO_T}yes" >&6
12079else echo "$as_me:$LINENO: result: no" >&5
12080echo "${ECHO_T}no" >&6
12081fi
12082else
12083 echo "$as_me:$LINENO: result: no" >&5
12084echo "${ECHO_T}no" >&6
12085fi;
12086
12087# Check for Python-specific malloc support
Martin v. Löwis11437992002-04-12 09:54:03 +000012088echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
12089echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6
12090
Neil Schemenauera35c6882001-02-27 04:45:05 +000012091# Check whether --with-pymalloc or --without-pymalloc was given.
12092if test "${with_pymalloc+set}" = set; then
12093 withval="$with_pymalloc"
Michael W. Hudson54241132001-12-07 15:38:26 +000012094
Martin v. Löwis11437992002-04-12 09:54:03 +000012095fi;
Neil Schemenauera35c6882001-02-27 04:45:05 +000012096
Neil Schemenauer16c22972002-03-22 15:34:49 +000012097if test -z "$with_pymalloc"
12098then with_pymalloc="yes"
12099fi
12100if test "$with_pymalloc" != "no"
12101then
Martin v. Löwis11437992002-04-12 09:54:03 +000012102
12103cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012104#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012105_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000012106
12107fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012108echo "$as_me:$LINENO: result: $with_pymalloc" >&5
12109echo "${ECHO_T}$with_pymalloc" >&6
Neil Schemenauer16c22972002-03-22 15:34:49 +000012110
Barry Warsawef82cd72000-06-30 16:21:01 +000012111# Check for --with-wctype-functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012112echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
12113echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6
12114
Barry Warsawef82cd72000-06-30 16:21:01 +000012115# Check whether --with-wctype-functions or --without-wctype-functions was given.
12116if test "${with_wctype_functions+set}" = set; then
12117 withval="$with_wctype_functions"
Martin v. Löwis11437992002-04-12 09:54:03 +000012118
Barry Warsawef82cd72000-06-30 16:21:01 +000012119if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000012120then
12121
12122cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000012123#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012124_ACEOF
12125
12126 echo "$as_me:$LINENO: result: yes" >&5
12127echo "${ECHO_T}yes" >&6
12128else echo "$as_me:$LINENO: result: no" >&5
12129echo "${ECHO_T}no" >&6
Barry Warsawef82cd72000-06-30 16:21:01 +000012130fi
12131else
Martin v. Löwis11437992002-04-12 09:54:03 +000012132 echo "$as_me:$LINENO: result: no" >&5
12133echo "${ECHO_T}no" >&6
12134fi;
Barry Warsawef82cd72000-06-30 16:21:01 +000012135
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012136# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000012137
Guido van Rossum98935bf2001-09-05 19:13:16 +000012138DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000012139
Guido van Rossume97ee181999-12-20 21:27:22 +000012140# the dlopen() function means we might want to use dynload_shlib.o. some
12141# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012142
Thomas Wouters3a584202000-08-05 23:28:51 +000012143for ac_func in dlopen
12144do
Martin v. Löwis11437992002-04-12 09:54:03 +000012145as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12146echo "$as_me:$LINENO: checking for $ac_func" >&5
12147echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12148if eval "test \"\${$as_ac_var+set}\" = set"; then
12149 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012150else
Martin v. Löwis11437992002-04-12 09:54:03 +000012151 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012152#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012153/* confdefs.h. */
12154_ACEOF
12155cat confdefs.h >>conftest.$ac_ext
12156cat >>conftest.$ac_ext <<_ACEOF
12157/* end confdefs.h. */
Guido van Rossume97ee181999-12-20 21:27:22 +000012158/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012159 which can conflict with char $ac_func (); below.
12160 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012161 <limits.h> exists even on freestanding compilers. Under hpux,
12162 including <limits.h> includes <sys/time.h> and causes problems
12163 checking for functions defined therein. */
12164#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012165# include <limits.h>
12166#else
12167# include <assert.h>
12168#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012169/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012170#ifdef __cplusplus
12171extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012172{
Martin v. Löwis11437992002-04-12 09:54:03 +000012173#endif
Guido van Rossume97ee181999-12-20 21:27:22 +000012174/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012175 builtin and then its argument prototype would still apply. */
12176char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000012177/* The GNU C library defines this for functions which it implements
12178 to always fail with ENOSYS. Some functions are actually named
12179 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000012180#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossume97ee181999-12-20 21:27:22 +000012181choke me
12182#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012183char (*f) () = $ac_func;
12184#endif
12185#ifdef __cplusplus
12186}
Guido van Rossume97ee181999-12-20 21:27:22 +000012187#endif
12188
Skip Montanaro6dead952003-09-25 14:50:04 +000012189int
12190main ()
12191{
12192return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012193 ;
12194 return 0;
12195}
12196_ACEOF
12197rm -f conftest.$ac_objext conftest$ac_exeext
12198if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012199 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012200 ac_status=$?
12201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12202 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012203 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012204 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12205 (eval $ac_try) 2>&5
12206 ac_status=$?
12207 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12208 (exit $ac_status); }; }; then
12209 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012210else
Martin v. Löwis11437992002-04-12 09:54:03 +000012211 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012212sed 's/^/| /' conftest.$ac_ext >&5
12213
Martin v. Löwis11437992002-04-12 09:54:03 +000012214eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012215fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012216rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012217fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012218echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12219echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12220if test `eval echo '${'$as_ac_var'}'` = yes; then
12221 cat >>confdefs.h <<_ACEOF
12222#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12223_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012224
Guido van Rossume97ee181999-12-20 21:27:22 +000012225fi
Thomas Wouters3a584202000-08-05 23:28:51 +000012226done
Guido van Rossume97ee181999-12-20 21:27:22 +000012227
Michael W. Hudson54241132001-12-07 15:38:26 +000012228
Guido van Rossume97ee181999-12-20 21:27:22 +000012229# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
12230# loading of modules.
12231
Martin v. Löwis11437992002-04-12 09:54:03 +000012232echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
12233echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012234if test -z "$DYNLOADFILE"
12235then
12236 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000012237 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
12238 if test "$ac_cv_func_dlopen" = yes
12239 then DYNLOADFILE="dynload_shlib.o"
12240 else DYNLOADFILE="dynload_aix.o"
12241 fi
12242 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000012243 BeOS*) DYNLOADFILE="dynload_beos.o";;
12244 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Jack Jansene578a632001-08-15 01:27:14 +000012245 Darwin/*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000012246 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000012247 *)
12248 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
12249 # out any dynamic loading
12250 if test "$ac_cv_func_dlopen" = yes
12251 then DYNLOADFILE="dynload_shlib.o"
12252 else DYNLOADFILE="dynload_stub.o"
12253 fi
12254 ;;
12255 esac
12256fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012257echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
12258echo "${ECHO_T}$DYNLOADFILE" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000012259if test "$DYNLOADFILE" != "dynload_stub.o"
12260then
Martin v. Löwis11437992002-04-12 09:54:03 +000012261
12262cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012263#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000012264_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000012265
12266fi
12267
Neil Schemenauer4e425612001-06-19 15:44:15 +000012268# MACHDEP_OBJS can be set to platform-specific object files needed by Python
12269
Michael W. Hudson54241132001-12-07 15:38:26 +000012270
Martin v. Löwis11437992002-04-12 09:54:03 +000012271echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
12272echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012273if test -z "$MACHDEP_OBJS"
12274then
Jack Jansene578a632001-08-15 01:27:14 +000012275 MACHDEP_OBJS=$extra_machdep_objs
12276else
12277 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000012278fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012279echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
12280echo "${ECHO_T}MACHDEP_OBJS" >&6
Neil Schemenauer4e425612001-06-19 15:44:15 +000012281
Guido van Rossum627b2d71993-12-24 10:39:16 +000012282# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000012283
12284
12285
12286
12287
12288
12289
12290
12291
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
Martin v. Löwisd5843682002-11-21 20:41:28 +000012354for ac_func in alarm chown clock confstr ctermid execv \
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012355 fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012356 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis49ee14d2003-11-10 06:35:36 +000012357 getpriority getpwent getsid getwd \
Martin v. Löwise9416172003-05-03 10:12:45 +000012358 kill killpg lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000012359 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000012360 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000012361 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000012362 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000012363 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000012364 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis438b5342002-12-27 10:16:42 +000012365 truncate uname unsetenv utimes waitpid wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000012366do
Martin v. Löwis11437992002-04-12 09:54:03 +000012367as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12368echo "$as_me:$LINENO: checking for $ac_func" >&5
12369echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12370if eval "test \"\${$as_ac_var+set}\" = set"; then
12371 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012372else
Martin v. Löwis11437992002-04-12 09:54:03 +000012373 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012374#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012375/* confdefs.h. */
12376_ACEOF
12377cat confdefs.h >>conftest.$ac_ext
12378cat >>conftest.$ac_ext <<_ACEOF
12379/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012380/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000012381 which can conflict with char $ac_func (); below.
12382 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000012383 <limits.h> exists even on freestanding compilers. Under hpux,
12384 including <limits.h> includes <sys/time.h> and causes problems
12385 checking for functions defined therein. */
12386#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000012387# include <limits.h>
12388#else
12389# include <assert.h>
12390#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000012391/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012392#ifdef __cplusplus
12393extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000012394{
Martin v. Löwis11437992002-04-12 09:54:03 +000012395#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000012396/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000012397 builtin and then its argument prototype would still apply. */
12398char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000012399/* The GNU C library defines this for functions which it implements
12400 to always fail with ENOSYS. Some functions are actually named
12401 something starting with __ and the normal name is an alias. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012402#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000012403choke me
12404#else
Skip Montanaro6dead952003-09-25 14:50:04 +000012405char (*f) () = $ac_func;
12406#endif
12407#ifdef __cplusplus
12408}
Guido van Rossum627b2d71993-12-24 10:39:16 +000012409#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000012410
Skip Montanaro6dead952003-09-25 14:50:04 +000012411int
12412main ()
12413{
12414return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000012415 ;
12416 return 0;
12417}
12418_ACEOF
12419rm -f conftest.$ac_objext conftest$ac_exeext
12420if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012421 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012422 ac_status=$?
12423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12424 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012425 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000012426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12427 (eval $ac_try) 2>&5
12428 ac_status=$?
12429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12430 (exit $ac_status); }; }; then
12431 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000012432else
Martin v. Löwis11437992002-04-12 09:54:03 +000012433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012434sed 's/^/| /' conftest.$ac_ext >&5
12435
Martin v. Löwis11437992002-04-12 09:54:03 +000012436eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000012437fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012438rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000012439fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012440echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
12441echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
12442if test `eval echo '${'$as_ac_var'}'` = yes; then
12443 cat >>confdefs.h <<_ACEOF
12444#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12445_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000012446
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000012447fi
12448done
12449
Michael W. Hudson54241132001-12-07 15:38:26 +000012450
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012451# For some functions, having a definition is not sufficient, since
12452# we want to take their address.
12453echo "$as_me:$LINENO: checking for chroot" >&5
12454echo $ECHO_N "checking for chroot... $ECHO_C" >&6
12455cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012456#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012457/* confdefs.h. */
12458_ACEOF
12459cat confdefs.h >>conftest.$ac_ext
12460cat >>conftest.$ac_ext <<_ACEOF
12461/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012462#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012463int
12464main ()
12465{
12466void *x=chroot
12467 ;
12468 return 0;
12469}
12470_ACEOF
12471rm -f conftest.$ac_objext
12472if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012473 (eval $ac_compile) 2>&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012474 ac_status=$?
12475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12476 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012477 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12479 (eval $ac_try) 2>&5
12480 ac_status=$?
12481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12482 (exit $ac_status); }; }; then
12483
12484cat >>confdefs.h <<\_ACEOF
12485#define HAVE_CHROOT 1
12486_ACEOF
12487
12488 echo "$as_me:$LINENO: result: yes" >&5
12489echo "${ECHO_T}yes" >&6
12490else
12491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012492sed 's/^/| /' conftest.$ac_ext >&5
12493
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012494echo "$as_me:$LINENO: result: no" >&5
12495echo "${ECHO_T}no" >&6
12496
12497fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012498rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012499echo "$as_me:$LINENO: checking for link" >&5
12500echo $ECHO_N "checking for link... $ECHO_C" >&6
12501cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012502#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012503/* confdefs.h. */
12504_ACEOF
12505cat confdefs.h >>conftest.$ac_ext
12506cat >>conftest.$ac_ext <<_ACEOF
12507/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012508#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012509int
12510main ()
12511{
12512void *x=link
12513 ;
12514 return 0;
12515}
12516_ACEOF
12517rm -f conftest.$ac_objext
12518if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012519 (eval $ac_compile) 2>&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012520 ac_status=$?
12521 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12522 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012523 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012524 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12525 (eval $ac_try) 2>&5
12526 ac_status=$?
12527 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12528 (exit $ac_status); }; }; then
12529
12530cat >>confdefs.h <<\_ACEOF
12531#define HAVE_LINK 1
12532_ACEOF
12533
12534 echo "$as_me:$LINENO: result: yes" >&5
12535echo "${ECHO_T}yes" >&6
12536else
12537 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012538sed 's/^/| /' conftest.$ac_ext >&5
12539
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012540echo "$as_me:$LINENO: result: no" >&5
12541echo "${ECHO_T}no" >&6
12542
12543fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012544rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012545echo "$as_me:$LINENO: checking for symlink" >&5
12546echo $ECHO_N "checking for symlink... $ECHO_C" >&6
12547cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012548#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012549/* confdefs.h. */
12550_ACEOF
12551cat confdefs.h >>conftest.$ac_ext
12552cat >>conftest.$ac_ext <<_ACEOF
12553/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012554#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012555int
12556main ()
12557{
12558void *x=symlink
12559 ;
12560 return 0;
12561}
12562_ACEOF
12563rm -f conftest.$ac_objext
12564if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012565 (eval $ac_compile) 2>&5
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012566 ac_status=$?
12567 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12568 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012569 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012570 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12571 (eval $ac_try) 2>&5
12572 ac_status=$?
12573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12574 (exit $ac_status); }; }; then
12575
12576cat >>confdefs.h <<\_ACEOF
12577#define HAVE_SYMLINK 1
12578_ACEOF
12579
12580 echo "$as_me:$LINENO: result: yes" >&5
12581echo "${ECHO_T}yes" >&6
12582else
12583 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012584sed 's/^/| /' conftest.$ac_ext >&5
12585
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012586echo "$as_me:$LINENO: result: no" >&5
12587echo "${ECHO_T}no" >&6
12588
12589fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012590rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012591echo "$as_me:$LINENO: checking for fchdir" >&5
12592echo $ECHO_N "checking for fchdir... $ECHO_C" >&6
12593cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012594#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012595/* confdefs.h. */
12596_ACEOF
12597cat confdefs.h >>conftest.$ac_ext
12598cat >>conftest.$ac_ext <<_ACEOF
12599/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012600#include <unistd.h>
12601int
12602main ()
12603{
12604void *x=fchdir
12605 ;
12606 return 0;
12607}
12608_ACEOF
12609rm -f conftest.$ac_objext
12610if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012611 (eval $ac_compile) 2>&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012612 ac_status=$?
12613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12614 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012615 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012616 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12617 (eval $ac_try) 2>&5
12618 ac_status=$?
12619 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12620 (exit $ac_status); }; }; then
12621
12622cat >>confdefs.h <<\_ACEOF
12623#define HAVE_FCHDIR 1
12624_ACEOF
12625
12626 echo "$as_me:$LINENO: result: yes" >&5
12627echo "${ECHO_T}yes" >&6
12628else
12629 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012630sed 's/^/| /' conftest.$ac_ext >&5
12631
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012632echo "$as_me:$LINENO: result: no" >&5
12633echo "${ECHO_T}no" >&6
12634
12635fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012636rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012637echo "$as_me:$LINENO: checking for fsync" >&5
12638echo $ECHO_N "checking for fsync... $ECHO_C" >&6
12639cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012640#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012641/* confdefs.h. */
12642_ACEOF
12643cat confdefs.h >>conftest.$ac_ext
12644cat >>conftest.$ac_ext <<_ACEOF
12645/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012646#include <unistd.h>
12647int
12648main ()
12649{
12650void *x=fsync
12651 ;
12652 return 0;
12653}
12654_ACEOF
12655rm -f conftest.$ac_objext
12656if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012657 (eval $ac_compile) 2>&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012658 ac_status=$?
12659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12660 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012661 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012662 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12663 (eval $ac_try) 2>&5
12664 ac_status=$?
12665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12666 (exit $ac_status); }; }; then
12667
12668cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012669#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012670_ACEOF
12671
12672 echo "$as_me:$LINENO: result: yes" >&5
12673echo "${ECHO_T}yes" >&6
12674else
12675 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012676sed 's/^/| /' conftest.$ac_ext >&5
12677
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012678echo "$as_me:$LINENO: result: no" >&5
12679echo "${ECHO_T}no" >&6
12680
12681fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012682rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012683echo "$as_me:$LINENO: checking for fdatasync" >&5
12684echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6
12685cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012686#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012687/* confdefs.h. */
12688_ACEOF
12689cat confdefs.h >>conftest.$ac_ext
12690cat >>conftest.$ac_ext <<_ACEOF
12691/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012692#include <unistd.h>
12693int
12694main ()
12695{
12696void *x=fdatasync
12697 ;
12698 return 0;
12699}
12700_ACEOF
12701rm -f conftest.$ac_objext
12702if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012703 (eval $ac_compile) 2>&5
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012704 ac_status=$?
12705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12706 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012707 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012708 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12709 (eval $ac_try) 2>&5
12710 ac_status=$?
12711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12712 (exit $ac_status); }; }; then
12713
12714cat >>confdefs.h <<\_ACEOF
12715#define HAVE_FDATASYNC 1
12716_ACEOF
12717
12718 echo "$as_me:$LINENO: result: yes" >&5
12719echo "${ECHO_T}yes" >&6
12720else
12721 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012722sed 's/^/| /' conftest.$ac_ext >&5
12723
Martin v. Löwisa64988c2003-09-20 15:30:20 +000012724echo "$as_me:$LINENO: result: no" >&5
12725echo "${ECHO_T}no" >&6
12726
12727fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012728rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000012729
Martin v. Löwisd5843682002-11-21 20:41:28 +000012730# On some systems (eg. FreeBSD 5), we would find a definition of the
12731# functions ctermid_r, setgroups in the library, but no prototype
12732# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
12733# address to avoid compiler warnings and potential miscompilations
12734# because of the missing prototypes.
12735
12736echo "$as_me:$LINENO: checking for ctermid_r" >&5
12737echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6
12738cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012739#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012740/* confdefs.h. */
12741_ACEOF
12742cat confdefs.h >>conftest.$ac_ext
12743cat >>conftest.$ac_ext <<_ACEOF
12744/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000012745
12746#include "confdefs.h"
12747#include <stdio.h>
12748
Martin v. Löwisd5843682002-11-21 20:41:28 +000012749int
12750main ()
12751{
12752void* p = ctermid_r
12753 ;
12754 return 0;
12755}
12756_ACEOF
12757rm -f conftest.$ac_objext
12758if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012759 (eval $ac_compile) 2>&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000012760 ac_status=$?
12761 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12762 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012763 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000012764 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12765 (eval $ac_try) 2>&5
12766 ac_status=$?
12767 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12768 (exit $ac_status); }; }; then
12769
12770cat >>confdefs.h <<\_ACEOF
12771#define HAVE_CTERMID_R 1
12772_ACEOF
12773
12774 echo "$as_me:$LINENO: result: yes" >&5
12775echo "${ECHO_T}yes" >&6
12776else
12777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012778sed 's/^/| /' conftest.$ac_ext >&5
12779
Martin v. Löwisd5843682002-11-21 20:41:28 +000012780echo "$as_me:$LINENO: result: no" >&5
12781echo "${ECHO_T}no" >&6
12782
12783fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012784rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000012785
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012786echo "$as_me:$LINENO: checking for flock" >&5
12787echo $ECHO_N "checking for flock... $ECHO_C" >&6
12788cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012789#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012790/* confdefs.h. */
12791_ACEOF
12792cat confdefs.h >>conftest.$ac_ext
12793cat >>conftest.$ac_ext <<_ACEOF
12794/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012795
12796#include "confdefs.h"
12797#include <sys/file.h>
12798
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012799int
12800main ()
12801{
12802void* p = flock
12803 ;
12804 return 0;
12805}
12806_ACEOF
12807rm -f conftest.$ac_objext
12808if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012809 (eval $ac_compile) 2>&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012810 ac_status=$?
12811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12812 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012813 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012814 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12815 (eval $ac_try) 2>&5
12816 ac_status=$?
12817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12818 (exit $ac_status); }; }; then
12819
12820cat >>confdefs.h <<\_ACEOF
12821#define HAVE_FLOCK 1
12822_ACEOF
12823
12824 echo "$as_me:$LINENO: result: yes" >&5
12825echo "${ECHO_T}yes" >&6
12826else
12827 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012828sed 's/^/| /' conftest.$ac_ext >&5
12829
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012830echo "$as_me:$LINENO: result: no" >&5
12831echo "${ECHO_T}no" >&6
12832
12833fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012834rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012835
12836echo "$as_me:$LINENO: checking for getpagesize" >&5
12837echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6
12838cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012839#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012840/* confdefs.h. */
12841_ACEOF
12842cat confdefs.h >>conftest.$ac_ext
12843cat >>conftest.$ac_ext <<_ACEOF
12844/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012845
12846#include "confdefs.h"
12847#include <unistd.h>
12848
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012849int
12850main ()
12851{
12852void* p = getpagesize
12853 ;
12854 return 0;
12855}
12856_ACEOF
12857rm -f conftest.$ac_objext
12858if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012859 (eval $ac_compile) 2>&5
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012860 ac_status=$?
12861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12862 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012863 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12865 (eval $ac_try) 2>&5
12866 ac_status=$?
12867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12868 (exit $ac_status); }; }; then
12869
12870cat >>confdefs.h <<\_ACEOF
12871#define HAVE_GETPAGESIZE 1
12872_ACEOF
12873
12874 echo "$as_me:$LINENO: result: yes" >&5
12875echo "${ECHO_T}yes" >&6
12876else
12877 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012878sed 's/^/| /' conftest.$ac_ext >&5
12879
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012880echo "$as_me:$LINENO: result: no" >&5
12881echo "${ECHO_T}no" >&6
12882
12883fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012884rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000012885
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012886for ac_prog in true
12887do
12888 # Extract the first word of "$ac_prog", so it can be a program name with args.
12889set dummy $ac_prog; ac_word=$2
12890echo "$as_me:$LINENO: checking for $ac_word" >&5
12891echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12892if test "${ac_cv_prog_TRUE+set}" = set; then
12893 echo $ECHO_N "(cached) $ECHO_C" >&6
12894else
12895 if test -n "$TRUE"; then
12896 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
12897else
12898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12899for as_dir in $PATH
12900do
12901 IFS=$as_save_IFS
12902 test -z "$as_dir" && as_dir=.
12903 for ac_exec_ext in '' $ac_executable_extensions; do
12904 if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12905 ac_cv_prog_TRUE="$ac_prog"
12906 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
12907 break 2
12908 fi
12909done
12910done
12911
12912fi
12913fi
12914TRUE=$ac_cv_prog_TRUE
12915if test -n "$TRUE"; then
12916 echo "$as_me:$LINENO: result: $TRUE" >&5
12917echo "${ECHO_T}$TRUE" >&6
12918else
12919 echo "$as_me:$LINENO: result: no" >&5
12920echo "${ECHO_T}no" >&6
12921fi
12922
12923 test -n "$TRUE" && break
12924done
12925test -n "$TRUE" || TRUE="/bin/true"
12926
12927
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012928echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
12929echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6
12930if test "${ac_cv_lib_c_inet_aton+set}" = set; then
12931 echo $ECHO_N "(cached) $ECHO_C" >&6
12932else
12933 ac_check_lib_save_LIBS=$LIBS
12934LIBS="-lc $LIBS"
12935cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012936#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012937/* confdefs.h. */
12938_ACEOF
12939cat confdefs.h >>conftest.$ac_ext
12940cat >>conftest.$ac_ext <<_ACEOF
12941/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012942
12943/* Override any gcc2 internal prototype to avoid an error. */
12944#ifdef __cplusplus
12945extern "C"
12946#endif
12947/* We use char because int might match the return type of a gcc2
12948 builtin and then its argument prototype would still apply. */
12949char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012950int
12951main ()
12952{
12953inet_aton ();
12954 ;
12955 return 0;
12956}
12957_ACEOF
12958rm -f conftest.$ac_objext conftest$ac_exeext
12959if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012960 (eval $ac_link) 2>&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012961 ac_status=$?
12962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12963 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012964 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012965 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
12966 (eval $ac_try) 2>&5
12967 ac_status=$?
12968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12969 (exit $ac_status); }; }; then
12970 ac_cv_lib_c_inet_aton=yes
12971else
12972 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012973sed 's/^/| /' conftest.$ac_ext >&5
12974
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012975ac_cv_lib_c_inet_aton=no
12976fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012977rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012978LIBS=$ac_check_lib_save_LIBS
12979fi
12980echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
12981echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6
12982if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012983 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000012984else
12985
12986echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
12987echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6
12988if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
12989 echo $ECHO_N "(cached) $ECHO_C" >&6
12990else
12991 ac_check_lib_save_LIBS=$LIBS
12992LIBS="-lresolv $LIBS"
12993cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000012994#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000012995/* confdefs.h. */
12996_ACEOF
12997cat confdefs.h >>conftest.$ac_ext
12998cat >>conftest.$ac_ext <<_ACEOF
12999/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013000
13001/* Override any gcc2 internal prototype to avoid an error. */
13002#ifdef __cplusplus
13003extern "C"
13004#endif
13005/* We use char because int might match the return type of a gcc2
13006 builtin and then its argument prototype would still apply. */
13007char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013008int
13009main ()
13010{
13011inet_aton ();
13012 ;
13013 return 0;
13014}
13015_ACEOF
13016rm -f conftest.$ac_objext conftest$ac_exeext
13017if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013018 (eval $ac_link) 2>&5
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013019 ac_status=$?
13020 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13021 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013022 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013023 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13024 (eval $ac_try) 2>&5
13025 ac_status=$?
13026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13027 (exit $ac_status); }; }; then
13028 ac_cv_lib_resolv_inet_aton=yes
13029else
13030 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013031sed 's/^/| /' conftest.$ac_ext >&5
13032
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013033ac_cv_lib_resolv_inet_aton=no
13034fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013035rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013036LIBS=$ac_check_lib_save_LIBS
13037fi
13038echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
13039echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6
13040if test $ac_cv_lib_resolv_inet_aton = yes; then
13041 cat >>confdefs.h <<_ACEOF
13042#define HAVE_LIBRESOLV 1
13043_ACEOF
13044
13045 LIBS="-lresolv $LIBS"
13046
13047fi
13048
13049
13050fi
13051
13052
Martin v. Löwise9416172003-05-03 10:12:45 +000013053echo "$as_me:$LINENO: checking for hstrerror" >&5
13054echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6
13055cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013056#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013057/* confdefs.h. */
13058_ACEOF
13059cat confdefs.h >>conftest.$ac_ext
13060cat >>conftest.$ac_ext <<_ACEOF
13061/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013062
13063#include "confdefs.h"
13064#include <netdb.h>
13065
Martin v. Löwise9416172003-05-03 10:12:45 +000013066int
13067main ()
13068{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013069void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013070 ;
13071 return 0;
13072}
13073_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013074rm -f conftest.$ac_objext conftest$ac_exeext
13075if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013076 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013077 ac_status=$?
13078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13079 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013080 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013081 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13082 (eval $ac_try) 2>&5
13083 ac_status=$?
13084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13085 (exit $ac_status); }; }; then
13086
13087cat >>confdefs.h <<\_ACEOF
13088#define HAVE_HSTRERROR 1
13089_ACEOF
13090
13091 echo "$as_me:$LINENO: result: yes" >&5
13092echo "${ECHO_T}yes" >&6
13093else
13094 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013095sed 's/^/| /' conftest.$ac_ext >&5
13096
Martin v. Löwise9416172003-05-03 10:12:45 +000013097echo "$as_me:$LINENO: result: no" >&5
13098echo "${ECHO_T}no" >&6
13099
13100fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013101rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013102
13103echo "$as_me:$LINENO: checking for inet_aton" >&5
13104echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6
13105cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013106#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013107/* confdefs.h. */
13108_ACEOF
13109cat confdefs.h >>conftest.$ac_ext
13110cat >>conftest.$ac_ext <<_ACEOF
13111/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013112
13113#include "confdefs.h"
13114#include <sys/socket.h>
13115#include <netinet/in.h>
13116#include <arpa/inet.h>
13117
Martin v. Löwise9416172003-05-03 10:12:45 +000013118int
13119main ()
13120{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013121void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000013122 ;
13123 return 0;
13124}
13125_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000013126rm -f conftest.$ac_objext conftest$ac_exeext
13127if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013128 (eval $ac_link) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013129 ac_status=$?
13130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13131 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013132 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13134 (eval $ac_try) 2>&5
13135 ac_status=$?
13136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13137 (exit $ac_status); }; }; then
13138
13139cat >>confdefs.h <<\_ACEOF
13140#define HAVE_INET_ATON 1
13141_ACEOF
13142
13143 echo "$as_me:$LINENO: result: yes" >&5
13144echo "${ECHO_T}yes" >&6
13145else
13146 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013147sed 's/^/| /' conftest.$ac_ext >&5
13148
Martin v. Löwise9416172003-05-03 10:12:45 +000013149echo "$as_me:$LINENO: result: no" >&5
13150echo "${ECHO_T}no" >&6
13151
13152fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013153rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013154
13155echo "$as_me:$LINENO: checking for inet_pton" >&5
13156echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6
13157cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013158#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013159/* confdefs.h. */
13160_ACEOF
13161cat confdefs.h >>conftest.$ac_ext
13162cat >>conftest.$ac_ext <<_ACEOF
13163/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000013164
13165#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013166#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000013167#include <sys/socket.h>
13168#include <netinet/in.h>
13169#include <arpa/inet.h>
13170
Martin v. Löwise9416172003-05-03 10:12:45 +000013171int
13172main ()
13173{
13174void* p = inet_pton
13175 ;
13176 return 0;
13177}
13178_ACEOF
13179rm -f conftest.$ac_objext
13180if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013181 (eval $ac_compile) 2>&5
Martin v. Löwise9416172003-05-03 10:12:45 +000013182 ac_status=$?
13183 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13184 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013185 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwise9416172003-05-03 10:12:45 +000013186 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13187 (eval $ac_try) 2>&5
13188 ac_status=$?
13189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13190 (exit $ac_status); }; }; then
13191
13192cat >>confdefs.h <<\_ACEOF
13193#define HAVE_INET_PTON 1
13194_ACEOF
13195
13196 echo "$as_me:$LINENO: result: yes" >&5
13197echo "${ECHO_T}yes" >&6
13198else
13199 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013200sed 's/^/| /' conftest.$ac_ext >&5
13201
Martin v. Löwise9416172003-05-03 10:12:45 +000013202echo "$as_me:$LINENO: result: no" >&5
13203echo "${ECHO_T}no" >&6
13204
13205fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013206rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000013207
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013208# On some systems, setgroups is in unistd.h, on others, in grp.h
Martin v. Löwisd5843682002-11-21 20:41:28 +000013209echo "$as_me:$LINENO: checking for setgroups" >&5
13210echo $ECHO_N "checking for setgroups... $ECHO_C" >&6
13211cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013212#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013213/* confdefs.h. */
13214_ACEOF
13215cat confdefs.h >>conftest.$ac_ext
13216cat >>conftest.$ac_ext <<_ACEOF
13217/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000013218
13219#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000013220#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000013221#ifdef HAVE_GRP_H
13222#include <grp.h>
13223#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000013224
Martin v. Löwisd5843682002-11-21 20:41:28 +000013225int
13226main ()
13227{
13228void* p = setgroups
13229 ;
13230 return 0;
13231}
13232_ACEOF
13233rm -f conftest.$ac_objext
13234if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013235 (eval $ac_compile) 2>&5
Martin v. Löwisd5843682002-11-21 20:41:28 +000013236 ac_status=$?
13237 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13238 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013239 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisd5843682002-11-21 20:41:28 +000013240 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13241 (eval $ac_try) 2>&5
13242 ac_status=$?
13243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13244 (exit $ac_status); }; }; then
13245
13246cat >>confdefs.h <<\_ACEOF
13247#define HAVE_SETGROUPS 1
13248_ACEOF
13249
13250 echo "$as_me:$LINENO: result: yes" >&5
13251echo "${ECHO_T}yes" >&6
13252else
13253 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013254sed 's/^/| /' conftest.$ac_ext >&5
13255
Martin v. Löwisd5843682002-11-21 20:41:28 +000013256echo "$as_me:$LINENO: result: no" >&5
13257echo "${ECHO_T}no" >&6
13258
13259fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013260rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000013261
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013262# check for openpty and forkpty
13263
Martin v. Löwis11437992002-04-12 09:54:03 +000013264
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013265for ac_func in openpty
13266do
Martin v. Löwis11437992002-04-12 09:54:03 +000013267as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13268echo "$as_me:$LINENO: checking for $ac_func" >&5
13269echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13270if eval "test \"\${$as_ac_var+set}\" = set"; then
13271 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013272else
Martin v. Löwis11437992002-04-12 09:54:03 +000013273 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013274#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013275/* confdefs.h. */
13276_ACEOF
13277cat confdefs.h >>conftest.$ac_ext
13278cat >>conftest.$ac_ext <<_ACEOF
13279/* end confdefs.h. */
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013280/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013281 which can conflict with char $ac_func (); below.
13282 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013283 <limits.h> exists even on freestanding compilers. Under hpux,
13284 including <limits.h> includes <sys/time.h> and causes problems
13285 checking for functions defined therein. */
13286#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013287# include <limits.h>
13288#else
13289# include <assert.h>
13290#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013291/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013292#ifdef __cplusplus
13293extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013294{
Martin v. Löwis11437992002-04-12 09:54:03 +000013295#endif
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013296/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013297 builtin and then its argument prototype would still apply. */
13298char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013299/* The GNU C library defines this for functions which it implements
13300 to always fail with ENOSYS. Some functions are actually named
13301 something starting with __ and the normal name is an alias. */
13302#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13303choke me
13304#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013305char (*f) () = $ac_func;
13306#endif
13307#ifdef __cplusplus
13308}
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013309#endif
13310
Skip Montanaro6dead952003-09-25 14:50:04 +000013311int
13312main ()
13313{
13314return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013315 ;
13316 return 0;
13317}
13318_ACEOF
13319rm -f conftest.$ac_objext conftest$ac_exeext
13320if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013321 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013322 ac_status=$?
13323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13324 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013325 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013326 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13327 (eval $ac_try) 2>&5
13328 ac_status=$?
13329 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13330 (exit $ac_status); }; }; then
13331 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013332else
Martin v. Löwis11437992002-04-12 09:54:03 +000013333 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013334sed 's/^/| /' conftest.$ac_ext >&5
13335
Martin v. Löwis11437992002-04-12 09:54:03 +000013336eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013337fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013338rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013339fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013340echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13341echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13342if test `eval echo '${'$as_ac_var'}'` = yes; then
13343 cat >>confdefs.h <<_ACEOF
13344#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13345_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013346
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000013347else
Martin v. Löwis11437992002-04-12 09:54:03 +000013348 echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
13349echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13350if test "${ac_cv_lib_util_openpty+set}" = set; then
13351 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013352else
Martin v. Löwis11437992002-04-12 09:54:03 +000013353 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013354LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013355cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013356#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013357/* confdefs.h. */
13358_ACEOF
13359cat confdefs.h >>conftest.$ac_ext
13360cat >>conftest.$ac_ext <<_ACEOF
13361/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013362
Fred Drake8cef4cf2000-06-28 16:40:38 +000013363/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013364#ifdef __cplusplus
13365extern "C"
13366#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013367/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013368 builtin and then its argument prototype would still apply. */
13369char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013370int
13371main ()
13372{
13373openpty ();
13374 ;
13375 return 0;
13376}
13377_ACEOF
13378rm -f conftest.$ac_objext conftest$ac_exeext
13379if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013380 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013381 ac_status=$?
13382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13383 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013384 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013385 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13386 (eval $ac_try) 2>&5
13387 ac_status=$?
13388 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13389 (exit $ac_status); }; }; then
13390 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013391else
Martin v. Löwis11437992002-04-12 09:54:03 +000013392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013393sed 's/^/| /' conftest.$ac_ext >&5
13394
Martin v. Löwis11437992002-04-12 09:54:03 +000013395ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013396fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013397rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013398LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013399fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013400echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
13401echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
13402if test $ac_cv_lib_util_openpty = yes; then
13403 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013404#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013405_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013406 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013407fi
13408
13409fi
13410done
13411
Martin v. Löwis11437992002-04-12 09:54:03 +000013412
Fred Drake8cef4cf2000-06-28 16:40:38 +000013413for ac_func in forkpty
13414do
Martin v. Löwis11437992002-04-12 09:54:03 +000013415as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13416echo "$as_me:$LINENO: checking for $ac_func" >&5
13417echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13418if eval "test \"\${$as_ac_var+set}\" = set"; then
13419 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013420else
Martin v. Löwis11437992002-04-12 09:54:03 +000013421 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013422#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013423/* confdefs.h. */
13424_ACEOF
13425cat confdefs.h >>conftest.$ac_ext
13426cat >>conftest.$ac_ext <<_ACEOF
13427/* end confdefs.h. */
Fred Drake8cef4cf2000-06-28 16:40:38 +000013428/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013429 which can conflict with char $ac_func (); below.
13430 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013431 <limits.h> exists even on freestanding compilers. Under hpux,
13432 including <limits.h> includes <sys/time.h> and causes problems
13433 checking for functions defined therein. */
13434#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013435# include <limits.h>
13436#else
13437# include <assert.h>
13438#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013439/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013440#ifdef __cplusplus
13441extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013442{
Martin v. Löwis11437992002-04-12 09:54:03 +000013443#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013444/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013445 builtin and then its argument prototype would still apply. */
13446char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000013447/* The GNU C library defines this for functions which it implements
13448 to always fail with ENOSYS. Some functions are actually named
13449 something starting with __ and the normal name is an alias. */
13450#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13451choke me
13452#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013453char (*f) () = $ac_func;
13454#endif
13455#ifdef __cplusplus
13456}
Fred Drake8cef4cf2000-06-28 16:40:38 +000013457#endif
13458
Skip Montanaro6dead952003-09-25 14:50:04 +000013459int
13460main ()
13461{
13462return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013463 ;
13464 return 0;
13465}
13466_ACEOF
13467rm -f conftest.$ac_objext conftest$ac_exeext
13468if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013469 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013470 ac_status=$?
13471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13472 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013473 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013474 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13475 (eval $ac_try) 2>&5
13476 ac_status=$?
13477 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13478 (exit $ac_status); }; }; then
13479 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013480else
Martin v. Löwis11437992002-04-12 09:54:03 +000013481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013482sed 's/^/| /' conftest.$ac_ext >&5
13483
Martin v. Löwis11437992002-04-12 09:54:03 +000013484eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013485fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013486rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013487fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013488echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13489echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13490if test `eval echo '${'$as_ac_var'}'` = yes; then
13491 cat >>confdefs.h <<_ACEOF
13492#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13493_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013494
Fred Drake8cef4cf2000-06-28 16:40:38 +000013495else
Martin v. Löwis11437992002-04-12 09:54:03 +000013496 echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
13497echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6
13498if test "${ac_cv_lib_util_forkpty+set}" = set; then
13499 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000013500else
Martin v. Löwis11437992002-04-12 09:54:03 +000013501 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013502LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013503cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013504#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013505/* confdefs.h. */
13506_ACEOF
13507cat confdefs.h >>conftest.$ac_ext
13508cat >>conftest.$ac_ext <<_ACEOF
13509/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013510
Fred Drake8cef4cf2000-06-28 16:40:38 +000013511/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013512#ifdef __cplusplus
13513extern "C"
13514#endif
Fred Drake8cef4cf2000-06-28 16:40:38 +000013515/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013516 builtin and then its argument prototype would still apply. */
13517char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013518int
13519main ()
13520{
13521forkpty ();
13522 ;
13523 return 0;
13524}
13525_ACEOF
13526rm -f conftest.$ac_objext conftest$ac_exeext
13527if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013528 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013529 ac_status=$?
13530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13531 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013532 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013533 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13534 (eval $ac_try) 2>&5
13535 ac_status=$?
13536 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13537 (exit $ac_status); }; }; then
13538 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000013539else
Martin v. Löwis11437992002-04-12 09:54:03 +000013540 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013541sed 's/^/| /' conftest.$ac_ext >&5
13542
Martin v. Löwis11437992002-04-12 09:54:03 +000013543ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000013544fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013545rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013546LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000013547fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013548echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
13549echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6
13550if test $ac_cv_lib_util_forkpty = yes; then
13551 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013552#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013553_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000013554 LIBS="$LIBS -lutil"
Fred Drake8cef4cf2000-06-28 16:40:38 +000013555fi
13556
13557fi
13558done
13559
Jack Jansendd19cf82001-12-06 22:36:17 +000013560
Michael W. Hudson54241132001-12-07 15:38:26 +000013561# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000013562
13563
13564
13565
13566
13567
Fred Drake8cef4cf2000-06-28 16:40:38 +000013568for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
13569do
Martin v. Löwis11437992002-04-12 09:54:03 +000013570as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13571echo "$as_me:$LINENO: checking for $ac_func" >&5
13572echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13573if eval "test \"\${$as_ac_var+set}\" = set"; then
13574 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013575else
Martin v. Löwis11437992002-04-12 09:54:03 +000013576 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013577#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013578/* confdefs.h. */
13579_ACEOF
13580cat confdefs.h >>conftest.$ac_ext
13581cat >>conftest.$ac_ext <<_ACEOF
13582/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013583/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013584 which can conflict with char $ac_func (); below.
13585 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013586 <limits.h> exists even on freestanding compilers. Under hpux,
13587 including <limits.h> includes <sys/time.h> and causes problems
13588 checking for functions defined therein. */
13589#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013590# include <limits.h>
13591#else
13592# include <assert.h>
13593#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013594/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013595#ifdef __cplusplus
13596extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013597{
Martin v. Löwis11437992002-04-12 09:54:03 +000013598#endif
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013599/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013600 builtin and then its argument prototype would still apply. */
13601char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013602/* The GNU C library defines this for functions which it implements
13603 to always fail with ENOSYS. Some functions are actually named
13604 something starting with __ and the normal name is an alias. */
13605#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13606choke me
13607#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013608char (*f) () = $ac_func;
13609#endif
13610#ifdef __cplusplus
13611}
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013612#endif
13613
Skip Montanaro6dead952003-09-25 14:50:04 +000013614int
13615main ()
13616{
13617return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013618 ;
13619 return 0;
13620}
13621_ACEOF
13622rm -f conftest.$ac_objext conftest$ac_exeext
13623if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013624 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013625 ac_status=$?
13626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13627 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013628 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013629 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13630 (eval $ac_try) 2>&5
13631 ac_status=$?
13632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13633 (exit $ac_status); }; }; then
13634 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013635else
Martin v. Löwis11437992002-04-12 09:54:03 +000013636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013637sed 's/^/| /' conftest.$ac_ext >&5
13638
Martin v. Löwis11437992002-04-12 09:54:03 +000013639eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013640fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013641rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013642fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013643echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13644echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13645if test `eval echo '${'$as_ac_var'}'` = yes; then
13646 cat >>confdefs.h <<_ACEOF
13647#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13648_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000013649
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013650fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000013651done
13652
Michael W. Hudson54241132001-12-07 15:38:26 +000013653
Martin v. Löwis11437992002-04-12 09:54:03 +000013654
13655
13656
13657
13658
Martin v. Löwis1142de32002-03-29 16:28:31 +000013659for ac_func in dup2 getcwd strdup strerror memmove
Thomas Wouters3a584202000-08-05 23:28:51 +000013660do
Martin v. Löwis11437992002-04-12 09:54:03 +000013661as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13662echo "$as_me:$LINENO: checking for $ac_func" >&5
13663echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13664if eval "test \"\${$as_ac_var+set}\" = set"; then
13665 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013666else
Martin v. Löwis11437992002-04-12 09:54:03 +000013667 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013668#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013669/* confdefs.h. */
13670_ACEOF
13671cat confdefs.h >>conftest.$ac_ext
13672cat >>conftest.$ac_ext <<_ACEOF
13673/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013674/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013675 which can conflict with char $ac_func (); below.
13676 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013677 <limits.h> exists even on freestanding compilers. Under hpux,
13678 including <limits.h> includes <sys/time.h> and causes problems
13679 checking for functions defined therein. */
13680#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013681# include <limits.h>
13682#else
13683# include <assert.h>
13684#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013685/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013686#ifdef __cplusplus
13687extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013688{
Martin v. Löwis11437992002-04-12 09:54:03 +000013689#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000013690/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013691 builtin and then its argument prototype would still apply. */
13692char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000013693/* The GNU C library defines this for functions which it implements
13694 to always fail with ENOSYS. Some functions are actually named
13695 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000013696#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum627b2d71993-12-24 10:39:16 +000013697choke me
13698#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013699char (*f) () = $ac_func;
13700#endif
13701#ifdef __cplusplus
13702}
Guido van Rossum627b2d71993-12-24 10:39:16 +000013703#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013704
Skip Montanaro6dead952003-09-25 14:50:04 +000013705int
13706main ()
13707{
13708return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013709 ;
13710 return 0;
13711}
13712_ACEOF
13713rm -f conftest.$ac_objext conftest$ac_exeext
13714if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013715 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013716 ac_status=$?
13717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13718 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013719 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013720 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13721 (eval $ac_try) 2>&5
13722 ac_status=$?
13723 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13724 (exit $ac_status); }; }; then
13725 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013726else
Martin v. Löwis11437992002-04-12 09:54:03 +000013727 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013728sed 's/^/| /' conftest.$ac_ext >&5
13729
Martin v. Löwis11437992002-04-12 09:54:03 +000013730eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013731fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013732rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000013733fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013734echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13735echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13736if test `eval echo '${'$as_ac_var'}'` = yes; then
13737 cat >>confdefs.h <<_ACEOF
13738#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13739_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000013740
Martin v. Löwis1142de32002-03-29 16:28:31 +000013741else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013742 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Martin v. Löwis1142de32002-03-29 16:28:31 +000013743fi
13744done
13745
13746
Martin v. Löwis11437992002-04-12 09:54:03 +000013747
Martin v. Löwis1142de32002-03-29 16:28:31 +000013748for ac_func in getpgrp
13749do
Martin v. Löwis11437992002-04-12 09:54:03 +000013750as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13751echo "$as_me:$LINENO: checking for $ac_func" >&5
13752echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13753if eval "test \"\${$as_ac_var+set}\" = set"; then
13754 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000013755else
Martin v. Löwis11437992002-04-12 09:54:03 +000013756 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013757#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013758/* confdefs.h. */
13759_ACEOF
13760cat confdefs.h >>conftest.$ac_ext
13761cat >>conftest.$ac_ext <<_ACEOF
13762/* end confdefs.h. */
Martin v. Löwis1142de32002-03-29 16:28:31 +000013763/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013764 which can conflict with char $ac_func (); below.
13765 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013766 <limits.h> exists even on freestanding compilers. Under hpux,
13767 including <limits.h> includes <sys/time.h> and causes problems
13768 checking for functions defined therein. */
13769#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013770# include <limits.h>
13771#else
13772# include <assert.h>
13773#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013774/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013775#ifdef __cplusplus
13776extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013777{
Martin v. Löwis11437992002-04-12 09:54:03 +000013778#endif
Martin v. Löwis1142de32002-03-29 16:28:31 +000013779/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000013780 builtin and then its argument prototype would still apply. */
13781char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000013782/* The GNU C library defines this for functions which it implements
13783 to always fail with ENOSYS. Some functions are actually named
13784 something starting with __ and the normal name is an alias. */
13785#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13786choke me
13787#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013788char (*f) () = $ac_func;
13789#endif
13790#ifdef __cplusplus
13791}
Martin v. Löwis1142de32002-03-29 16:28:31 +000013792#endif
13793
Skip Montanaro6dead952003-09-25 14:50:04 +000013794int
13795main ()
13796{
13797return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013798 ;
13799 return 0;
13800}
13801_ACEOF
13802rm -f conftest.$ac_objext conftest$ac_exeext
13803if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013804 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013805 ac_status=$?
13806 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13807 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013808 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013809 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13810 (eval $ac_try) 2>&5
13811 ac_status=$?
13812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13813 (exit $ac_status); }; }; then
13814 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013815else
Martin v. Löwis11437992002-04-12 09:54:03 +000013816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013817sed 's/^/| /' conftest.$ac_ext >&5
13818
Martin v. Löwis11437992002-04-12 09:54:03 +000013819eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013820fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013821rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013822fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013823echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13824echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13825if test `eval echo '${'$as_ac_var'}'` = yes; then
13826 cat >>confdefs.h <<_ACEOF
13827#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13828_ACEOF
13829 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013830#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013831/* confdefs.h. */
13832_ACEOF
13833cat confdefs.h >>conftest.$ac_ext
13834cat >>conftest.$ac_ext <<_ACEOF
13835/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013836#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013837int
13838main ()
13839{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013840getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000013841 ;
13842 return 0;
13843}
13844_ACEOF
13845rm -f conftest.$ac_objext
13846if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013847 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013848 ac_status=$?
13849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13850 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013851 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013852 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13853 (eval $ac_try) 2>&5
13854 ac_status=$?
13855 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13856 (exit $ac_status); }; }; then
13857
13858cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013859#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013860_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013861
Martin v. Löwis11437992002-04-12 09:54:03 +000013862
Guido van Rossumf78abae1997-01-21 22:02:36 +000013863else
Martin v. Löwis11437992002-04-12 09:54:03 +000013864 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013865sed 's/^/| /' conftest.$ac_ext >&5
13866
Guido van Rossum627b2d71993-12-24 10:39:16 +000013867fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013868rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000013869
Guido van Rossum627b2d71993-12-24 10:39:16 +000013870fi
Thomas Wouters3a584202000-08-05 23:28:51 +000013871done
Guido van Rossum627b2d71993-12-24 10:39:16 +000013872
Jack Jansen150753c2003-03-29 22:07:47 +000013873
13874for ac_func in setpgrp
13875do
13876as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13877echo "$as_me:$LINENO: checking for $ac_func" >&5
13878echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13879if eval "test \"\${$as_ac_var+set}\" = set"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013880 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013881else
Martin v. Löwis11437992002-04-12 09:54:03 +000013882 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013883#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013884/* confdefs.h. */
13885_ACEOF
13886cat confdefs.h >>conftest.$ac_ext
13887cat >>conftest.$ac_ext <<_ACEOF
13888/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013889/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000013890 which can conflict with char $ac_func (); below.
13891 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000013892 <limits.h> exists even on freestanding compilers. Under hpux,
13893 including <limits.h> includes <sys/time.h> and causes problems
13894 checking for functions defined therein. */
13895#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000013896# include <limits.h>
13897#else
13898# include <assert.h>
13899#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013900/* Override any gcc2 internal prototype to avoid an error. */
13901#ifdef __cplusplus
13902extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000013903{
Martin v. Löwis11437992002-04-12 09:54:03 +000013904#endif
Jack Jansen150753c2003-03-29 22:07:47 +000013905/* We use char because int might match the return type of a gcc2
13906 builtin and then its argument prototype would still apply. */
13907char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000013908/* The GNU C library defines this for functions which it implements
13909 to always fail with ENOSYS. Some functions are actually named
13910 something starting with __ and the normal name is an alias. */
13911#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13912choke me
13913#else
Skip Montanaro6dead952003-09-25 14:50:04 +000013914char (*f) () = $ac_func;
13915#endif
13916#ifdef __cplusplus
13917}
Jack Jansen150753c2003-03-29 22:07:47 +000013918#endif
13919
Skip Montanaro6dead952003-09-25 14:50:04 +000013920int
13921main ()
13922{
13923return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000013924 ;
13925 return 0;
13926}
13927_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013928rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwis11437992002-04-12 09:54:03 +000013929if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013930 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013931 ac_status=$?
13932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Jack Jansen150753c2003-03-29 22:07:47 +000013933 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013934 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000013935 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13936 (eval $ac_try) 2>&5
13937 ac_status=$?
13938 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13939 (exit $ac_status); }; }; then
Jack Jansen150753c2003-03-29 22:07:47 +000013940 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000013941else
Jack Jansen150753c2003-03-29 22:07:47 +000013942 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013943sed 's/^/| /' conftest.$ac_ext >&5
13944
Jack Jansen150753c2003-03-29 22:07:47 +000013945eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000013946fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013947rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000013948fi
Jack Jansen150753c2003-03-29 22:07:47 +000013949echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
13950echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13951if test `eval echo '${'$as_ac_var'}'` = yes; then
13952 cat >>confdefs.h <<_ACEOF
13953#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13954_ACEOF
13955 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013956#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000013957/* confdefs.h. */
13958_ACEOF
13959cat confdefs.h >>conftest.$ac_ext
13960cat >>conftest.$ac_ext <<_ACEOF
13961/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000013962#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000013963int
13964main ()
13965{
13966setpgrp(0,0);
13967 ;
13968 return 0;
13969}
13970_ACEOF
13971rm -f conftest.$ac_objext
13972if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013973 (eval $ac_compile) 2>&5
Jack Jansen150753c2003-03-29 22:07:47 +000013974 ac_status=$?
13975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13976 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013977 { ac_try='test -s conftest.$ac_objext'
Jack Jansen150753c2003-03-29 22:07:47 +000013978 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
13979 (eval $ac_try) 2>&5
13980 ac_status=$?
13981 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13982 (exit $ac_status); }; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013983
13984cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000013985#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013986_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013987
Jack Jansen150753c2003-03-29 22:07:47 +000013988
13989else
13990 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013991sed 's/^/| /' conftest.$ac_ext >&5
13992
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013993fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000013994rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000013995
13996fi
13997done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000013998
Martin v. Löwis11437992002-04-12 09:54:03 +000013999
Thomas Wouters3a584202000-08-05 23:28:51 +000014000for ac_func in gettimeofday
14001do
Martin v. Löwis11437992002-04-12 09:54:03 +000014002as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14003echo "$as_me:$LINENO: checking for $ac_func" >&5
14004echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14005if eval "test \"\${$as_ac_var+set}\" = set"; then
14006 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014007else
Martin v. Löwis11437992002-04-12 09:54:03 +000014008 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014009#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014010/* confdefs.h. */
14011_ACEOF
14012cat confdefs.h >>conftest.$ac_ext
14013cat >>conftest.$ac_ext <<_ACEOF
14014/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014015/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014016 which can conflict with char $ac_func (); below.
14017 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014018 <limits.h> exists even on freestanding compilers. Under hpux,
14019 including <limits.h> includes <sys/time.h> and causes problems
14020 checking for functions defined therein. */
14021#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014022# include <limits.h>
14023#else
14024# include <assert.h>
14025#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014026/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014027#ifdef __cplusplus
14028extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014029{
Martin v. Löwis11437992002-04-12 09:54:03 +000014030#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014031/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014032 builtin and then its argument prototype would still apply. */
14033char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014034/* The GNU C library defines this for functions which it implements
14035 to always fail with ENOSYS. Some functions are actually named
14036 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000014037#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014038choke me
14039#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014040char (*f) () = $ac_func;
14041#endif
14042#ifdef __cplusplus
14043}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014044#endif
14045
Skip Montanaro6dead952003-09-25 14:50:04 +000014046int
14047main ()
14048{
14049return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014050 ;
14051 return 0;
14052}
14053_ACEOF
14054rm -f conftest.$ac_objext conftest$ac_exeext
14055if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014056 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014057 ac_status=$?
14058 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14059 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014060 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014061 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14062 (eval $ac_try) 2>&5
14063 ac_status=$?
14064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14065 (exit $ac_status); }; }; then
14066 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014067else
Martin v. Löwis11437992002-04-12 09:54:03 +000014068 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014069sed 's/^/| /' conftest.$ac_ext >&5
14070
Martin v. Löwis11437992002-04-12 09:54:03 +000014071eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014072fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014073rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014074fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014075echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14076echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14077if test `eval echo '${'$as_ac_var'}'` = yes; then
14078 cat >>confdefs.h <<_ACEOF
14079#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14080_ACEOF
14081 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014082#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014083/* confdefs.h. */
14084_ACEOF
14085cat confdefs.h >>conftest.$ac_ext
14086cat >>conftest.$ac_ext <<_ACEOF
14087/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014088#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014089int
14090main ()
14091{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014092gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000014093 ;
14094 return 0;
14095}
14096_ACEOF
14097rm -f conftest.$ac_objext
14098if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014099 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014100 ac_status=$?
14101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14102 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014103 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014104 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14105 (eval $ac_try) 2>&5
14106 ac_status=$?
14107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14108 (exit $ac_status); }; }; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000014109 :
14110else
Martin v. Löwis11437992002-04-12 09:54:03 +000014111 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014112sed 's/^/| /' conftest.$ac_ext >&5
14113
Martin v. Löwis11437992002-04-12 09:54:03 +000014114
14115cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014116#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014117_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014118
Martin v. Löwis11437992002-04-12 09:54:03 +000014119
Guido van Rossum627b2d71993-12-24 10:39:16 +000014120fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014121rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000014122
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014123fi
Thomas Wouters3a584202000-08-05 23:28:51 +000014124done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014125
Michael W. Hudson54241132001-12-07 15:38:26 +000014126
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014127echo "$as_me:$LINENO: checking for major" >&5
14128echo $ECHO_N "checking for major... $ECHO_C" >&6
14129cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014130#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014131/* confdefs.h. */
14132_ACEOF
14133cat confdefs.h >>conftest.$ac_ext
14134cat >>conftest.$ac_ext <<_ACEOF
14135/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014136
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014137#if defined(MAJOR_IN_MKDEV)
14138#include <sys/mkdev.h>
14139#elif defined(MAJOR_IN_SYSMACROS)
14140#include <sys/sysmacros.h>
14141#else
14142#include <sys/types.h>
14143#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014144
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014145int
14146main ()
14147{
14148
14149 makedev(major(0),minor(0));
14150
14151 ;
14152 return 0;
14153}
14154_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000014155rm -f conftest.$ac_objext conftest$ac_exeext
14156if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014157 (eval $ac_link) 2>&5
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014158 ac_status=$?
14159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14160 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014161 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014162 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14163 (eval $ac_try) 2>&5
14164 ac_status=$?
14165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14166 (exit $ac_status); }; }; then
14167
14168
14169cat >>confdefs.h <<\_ACEOF
14170#define HAVE_DEVICE_MACROS 1
14171_ACEOF
14172
14173 echo "$as_me:$LINENO: result: yes" >&5
14174echo "${ECHO_T}yes" >&6
14175
14176else
14177 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014178sed 's/^/| /' conftest.$ac_ext >&5
14179
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000014180
14181 echo "$as_me:$LINENO: result: no" >&5
14182echo "${ECHO_T}no" >&6
14183
14184fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014185rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014186
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014187# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000014188# for [no]getaddrinfo in netdb.h.
14189echo "$as_me:$LINENO: checking for getaddrinfo" >&5
14190echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
14191cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014192#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014193/* confdefs.h. */
14194_ACEOF
14195cat confdefs.h >>conftest.$ac_ext
14196cat >>conftest.$ac_ext <<_ACEOF
14197/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014198
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014199#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014200#include <sys/socket.h>
14201#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000014202#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014203
Martin v. Löwis11437992002-04-12 09:54:03 +000014204int
14205main ()
14206{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014207
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014208getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014209
Martin v. Löwis11437992002-04-12 09:54:03 +000014210 ;
14211 return 0;
14212}
14213_ACEOF
14214rm -f conftest.$ac_objext conftest$ac_exeext
14215if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014216 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014217 ac_status=$?
14218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14219 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014220 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014221 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14222 (eval $ac_try) 2>&5
14223 ac_status=$?
14224 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14225 (exit $ac_status); }; }; then
14226
14227echo "$as_me:$LINENO: result: yes" >&5
14228echo "${ECHO_T}yes" >&6
14229echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
14230echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014231if test "$cross_compiling" = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014232 echo "$as_me:$LINENO: result: buggy" >&5
14233echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014234buggygetaddrinfo=yes
14235else
Martin v. Löwis11437992002-04-12 09:54:03 +000014236 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014237#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014238/* confdefs.h. */
14239_ACEOF
14240cat confdefs.h >>conftest.$ac_ext
14241cat >>conftest.$ac_ext <<_ACEOF
14242/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014243
14244#include <sys/types.h>
14245#include <netdb.h>
14246#include <string.h>
14247#include <sys/socket.h>
14248#include <netinet/in.h>
14249
14250main()
14251{
14252 int passive, gaierr, inet4 = 0, inet6 = 0;
14253 struct addrinfo hints, *ai, *aitop;
14254 char straddr[INET6_ADDRSTRLEN], strport[16];
14255
14256 for (passive = 0; passive <= 1; passive++) {
14257 memset(&hints, 0, sizeof(hints));
14258 hints.ai_family = AF_UNSPEC;
14259 hints.ai_flags = passive ? AI_PASSIVE : 0;
14260 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000014261 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014262 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
14263 (void)gai_strerror(gaierr);
14264 goto bad;
14265 }
14266 for (ai = aitop; ai; ai = ai->ai_next) {
14267 if (ai->ai_addr == NULL ||
14268 ai->ai_addrlen == 0 ||
14269 getnameinfo(ai->ai_addr, ai->ai_addrlen,
14270 straddr, sizeof(straddr), strport, sizeof(strport),
14271 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
14272 goto bad;
14273 }
14274 switch (ai->ai_family) {
14275 case AF_INET:
14276 if (strcmp(strport, "54321") != 0) {
14277 goto bad;
14278 }
14279 if (passive) {
14280 if (strcmp(straddr, "0.0.0.0") != 0) {
14281 goto bad;
14282 }
14283 } else {
14284 if (strcmp(straddr, "127.0.0.1") != 0) {
14285 goto bad;
14286 }
14287 }
14288 inet4++;
14289 break;
14290 case AF_INET6:
14291 if (strcmp(strport, "54321") != 0) {
14292 goto bad;
14293 }
14294 if (passive) {
14295 if (strcmp(straddr, "::") != 0) {
14296 goto bad;
14297 }
14298 } else {
14299 if (strcmp(straddr, "::1") != 0) {
14300 goto bad;
14301 }
14302 }
14303 inet6++;
14304 break;
14305 case AF_UNSPEC:
14306 goto bad;
14307 break;
14308 default:
14309 /* another family support? */
14310 break;
14311 }
14312 }
14313 }
14314
14315 if (!(inet4 == 0 || inet4 == 2))
14316 goto bad;
14317 if (!(inet6 == 0 || inet6 == 2))
14318 goto bad;
14319
14320 if (aitop)
14321 freeaddrinfo(aitop);
14322 exit(0);
14323
14324 bad:
14325 if (aitop)
14326 freeaddrinfo(aitop);
14327 exit(1);
14328}
14329
Martin v. Löwis11437992002-04-12 09:54:03 +000014330_ACEOF
14331rm -f conftest$ac_exeext
14332if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
14333 (eval $ac_link) 2>&5
14334 ac_status=$?
14335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14336 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14337 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14338 (eval $ac_try) 2>&5
14339 ac_status=$?
14340 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14341 (exit $ac_status); }; }; then
14342 echo "$as_me:$LINENO: result: good" >&5
14343echo "${ECHO_T}good" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014344buggygetaddrinfo=no
14345else
Martin v. Löwis11437992002-04-12 09:54:03 +000014346 echo "$as_me: program exited with status $ac_status" >&5
14347echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014348sed 's/^/| /' conftest.$ac_ext >&5
14349
Martin v. Löwis11437992002-04-12 09:54:03 +000014350( exit $ac_status )
14351echo "$as_me:$LINENO: result: buggy" >&5
14352echo "${ECHO_T}buggy" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014353buggygetaddrinfo=yes
14354fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014355rm -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 +000014356fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014357else
Martin v. Löwis11437992002-04-12 09:54:03 +000014358 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014359sed 's/^/| /' conftest.$ac_ext >&5
14360
Martin v. Löwis11437992002-04-12 09:54:03 +000014361
14362echo "$as_me:$LINENO: result: no" >&5
14363echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014364buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014365
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014366fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014367rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014368
14369if test "$buggygetaddrinfo" = "yes"; then
14370 if test "$ipv6" = "yes"; then
14371 echo 'Fatal: You must get working getaddrinfo() function.'
14372 echo ' or you can specify "--disable-ipv6"'.
14373 exit 1
14374 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014375else
Martin v. Löwis11437992002-04-12 09:54:03 +000014376
14377cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014378#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014379_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000014380
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014381fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014382
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014383for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014384do
Martin v. Löwis11437992002-04-12 09:54:03 +000014385as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14386echo "$as_me:$LINENO: checking for $ac_func" >&5
14387echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14388if eval "test \"\${$as_ac_var+set}\" = set"; then
14389 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014390else
Martin v. Löwis11437992002-04-12 09:54:03 +000014391 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014392#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014393/* confdefs.h. */
14394_ACEOF
14395cat confdefs.h >>conftest.$ac_ext
14396cat >>conftest.$ac_ext <<_ACEOF
14397/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014398/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014399 which can conflict with char $ac_func (); below.
14400 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000014401 <limits.h> exists even on freestanding compilers. Under hpux,
14402 including <limits.h> includes <sys/time.h> and causes problems
14403 checking for functions defined therein. */
14404#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000014405# include <limits.h>
14406#else
14407# include <assert.h>
14408#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014409/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014410#ifdef __cplusplus
14411extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000014412{
Martin v. Löwis11437992002-04-12 09:54:03 +000014413#endif
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014414/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000014415 builtin and then its argument prototype would still apply. */
14416char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014417/* The GNU C library defines this for functions which it implements
14418 to always fail with ENOSYS. Some functions are actually named
14419 something starting with __ and the normal name is an alias. */
14420#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14421choke me
14422#else
Skip Montanaro6dead952003-09-25 14:50:04 +000014423char (*f) () = $ac_func;
14424#endif
14425#ifdef __cplusplus
14426}
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014427#endif
14428
Skip Montanaro6dead952003-09-25 14:50:04 +000014429int
14430main ()
14431{
14432return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000014433 ;
14434 return 0;
14435}
14436_ACEOF
14437rm -f conftest.$ac_objext conftest$ac_exeext
14438if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014439 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014440 ac_status=$?
14441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14442 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014443 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014444 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14445 (eval $ac_try) 2>&5
14446 ac_status=$?
14447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14448 (exit $ac_status); }; }; then
14449 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000014450else
Martin v. Löwis11437992002-04-12 09:54:03 +000014451 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014452sed 's/^/| /' conftest.$ac_ext >&5
14453
Martin v. Löwis11437992002-04-12 09:54:03 +000014454eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000014455fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014456rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014457fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014458echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
14459echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14460if test `eval echo '${'$as_ac_var'}'` = yes; then
14461 cat >>confdefs.h <<_ACEOF
14462#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14463_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014464
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000014465fi
14466done
14467
Michael W. Hudson54241132001-12-07 15:38:26 +000014468
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014469# checks for structures
Martin v. Löwis11437992002-04-12 09:54:03 +000014470echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
14471echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
14472if test "${ac_cv_header_time+set}" = set; then
14473 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014474else
Martin v. Löwis11437992002-04-12 09:54:03 +000014475 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014476#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014477/* confdefs.h. */
14478_ACEOF
14479cat confdefs.h >>conftest.$ac_ext
14480cat >>conftest.$ac_ext <<_ACEOF
14481/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014482#include <sys/types.h>
14483#include <sys/time.h>
14484#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014485
Martin v. Löwis11437992002-04-12 09:54:03 +000014486int
14487main ()
14488{
14489if ((struct tm *) 0)
14490return 0;
14491 ;
14492 return 0;
14493}
14494_ACEOF
14495rm -f conftest.$ac_objext
14496if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014497 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014498 ac_status=$?
14499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14500 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014501 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014502 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14503 (eval $ac_try) 2>&5
14504 ac_status=$?
14505 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14506 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014507 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000014508else
Martin v. Löwis11437992002-04-12 09:54:03 +000014509 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014510sed 's/^/| /' conftest.$ac_ext >&5
14511
Martin v. Löwis11437992002-04-12 09:54:03 +000014512ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014513fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014514rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014515fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014516echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
14517echo "${ECHO_T}$ac_cv_header_time" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014518if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014519
14520cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014521#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014522_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014523
14524fi
14525
Martin v. Löwis11437992002-04-12 09:54:03 +000014526echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
14527echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6
14528if test "${ac_cv_struct_tm+set}" = set; then
14529 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014530else
Martin v. Löwis11437992002-04-12 09:54:03 +000014531 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014532#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014533/* confdefs.h. */
14534_ACEOF
14535cat confdefs.h >>conftest.$ac_ext
14536cat >>conftest.$ac_ext <<_ACEOF
14537/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014538#include <sys/types.h>
14539#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014540
Martin v. Löwis11437992002-04-12 09:54:03 +000014541int
14542main ()
14543{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014544struct tm *tp; tp->tm_sec;
Martin v. Löwis11437992002-04-12 09:54:03 +000014545 ;
14546 return 0;
14547}
14548_ACEOF
14549rm -f conftest.$ac_objext
14550if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014551 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014552 ac_status=$?
14553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14554 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014555 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014556 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14557 (eval $ac_try) 2>&5
14558 ac_status=$?
14559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14560 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014561 ac_cv_struct_tm=time.h
14562else
Martin v. Löwis11437992002-04-12 09:54:03 +000014563 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014564sed 's/^/| /' conftest.$ac_ext >&5
14565
Martin v. Löwis11437992002-04-12 09:54:03 +000014566ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014567fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014568rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014569fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014570echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
14571echo "${ECHO_T}$ac_cv_struct_tm" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014572if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014573
14574cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014575#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014576_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014577
14578fi
14579
Martin v. Löwis11437992002-04-12 09:54:03 +000014580echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
14581echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6
14582if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
14583 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014584else
Martin v. Löwis11437992002-04-12 09:54:03 +000014585 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014586#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014587/* confdefs.h. */
14588_ACEOF
14589cat confdefs.h >>conftest.$ac_ext
14590cat >>conftest.$ac_ext <<_ACEOF
14591/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014592#include <sys/types.h>
14593#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000014594
14595
Martin v. Löwis11437992002-04-12 09:54:03 +000014596int
14597main ()
14598{
14599static struct tm ac_aggr;
14600if (ac_aggr.tm_zone)
14601return 0;
14602 ;
14603 return 0;
14604}
14605_ACEOF
14606rm -f conftest.$ac_objext
14607if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014608 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014609 ac_status=$?
14610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14611 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014612 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014613 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14614 (eval $ac_try) 2>&5
14615 ac_status=$?
14616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14617 (exit $ac_status); }; }; then
14618 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014619else
Martin v. Löwis11437992002-04-12 09:54:03 +000014620 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014621sed 's/^/| /' conftest.$ac_ext >&5
14622
14623cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014624#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014625/* confdefs.h. */
14626_ACEOF
14627cat confdefs.h >>conftest.$ac_ext
14628cat >>conftest.$ac_ext <<_ACEOF
14629/* end confdefs.h. */
14630#include <sys/types.h>
14631#include <$ac_cv_struct_tm>
14632
14633
14634int
14635main ()
14636{
14637static struct tm ac_aggr;
14638if (sizeof ac_aggr.tm_zone)
14639return 0;
14640 ;
14641 return 0;
14642}
14643_ACEOF
14644rm -f conftest.$ac_objext
14645if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014646 (eval $ac_compile) 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014647 ac_status=$?
14648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14649 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014650 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000014651 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14652 (eval $ac_try) 2>&5
14653 ac_status=$?
14654 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14655 (exit $ac_status); }; }; then
14656 ac_cv_member_struct_tm_tm_zone=yes
14657else
14658 echo "$as_me: failed program was:" >&5
14659sed 's/^/| /' conftest.$ac_ext >&5
14660
Martin v. Löwis11437992002-04-12 09:54:03 +000014661ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014662fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014663rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014664fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014665rm -f conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014666fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014667echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
14668echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6
14669if test $ac_cv_member_struct_tm_tm_zone = yes; then
14670
14671cat >>confdefs.h <<_ACEOF
14672#define HAVE_STRUCT_TM_TM_ZONE 1
14673_ACEOF
14674
14675
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014676fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014677
Martin v. Löwis11437992002-04-12 09:54:03 +000014678if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
14679
14680cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014681#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014682_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014683
14684else
Martin v. Löwis11437992002-04-12 09:54:03 +000014685 echo "$as_me:$LINENO: checking for tzname" >&5
14686echo $ECHO_N "checking for tzname... $ECHO_C" >&6
14687if test "${ac_cv_var_tzname+set}" = set; then
14688 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014689else
Martin v. Löwis11437992002-04-12 09:54:03 +000014690 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014691#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014692/* confdefs.h. */
14693_ACEOF
14694cat confdefs.h >>conftest.$ac_ext
14695cat >>conftest.$ac_ext <<_ACEOF
14696/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014697#include <time.h>
14698#ifndef tzname /* For SGI. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014699extern char *tzname[]; /* RS6000 and others reject char **tzname. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000014700#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014701
Martin v. Löwis11437992002-04-12 09:54:03 +000014702int
14703main ()
14704{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014705atoi(*tzname);
Martin v. Löwis11437992002-04-12 09:54:03 +000014706 ;
14707 return 0;
14708}
14709_ACEOF
14710rm -f conftest.$ac_objext conftest$ac_exeext
14711if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014712 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014713 ac_status=$?
14714 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14715 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014716 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014717 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14718 (eval $ac_try) 2>&5
14719 ac_status=$?
14720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14721 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014722 ac_cv_var_tzname=yes
14723else
Martin v. Löwis11437992002-04-12 09:54:03 +000014724 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014725sed 's/^/| /' conftest.$ac_ext >&5
14726
Martin v. Löwis11437992002-04-12 09:54:03 +000014727ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014728fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014729rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000014730fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014731echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
14732echo "${ECHO_T}$ac_cv_var_tzname" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000014733 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014734
14735cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014736#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014737_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014738
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014739 fi
14740fi
14741
Martin v. Löwis11437992002-04-12 09:54:03 +000014742echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
14743echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6
14744if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
14745 echo $ECHO_N "(cached) $ECHO_C" >&6
14746else
14747 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014748#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014749/* confdefs.h. */
14750_ACEOF
14751cat confdefs.h >>conftest.$ac_ext
14752cat >>conftest.$ac_ext <<_ACEOF
14753/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014754$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014755int
14756main ()
14757{
14758static struct stat ac_aggr;
14759if (ac_aggr.st_rdev)
14760return 0;
14761 ;
14762 return 0;
14763}
14764_ACEOF
14765rm -f conftest.$ac_objext
14766if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014767 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014768 ac_status=$?
14769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14770 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014771 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014772 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14773 (eval $ac_try) 2>&5
14774 ac_status=$?
14775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14776 (exit $ac_status); }; }; then
14777 ac_cv_member_struct_stat_st_rdev=yes
14778else
14779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014780sed 's/^/| /' conftest.$ac_ext >&5
14781
14782cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014783#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014784/* confdefs.h. */
14785_ACEOF
14786cat confdefs.h >>conftest.$ac_ext
14787cat >>conftest.$ac_ext <<_ACEOF
14788/* end confdefs.h. */
14789$ac_includes_default
14790int
14791main ()
14792{
14793static struct stat ac_aggr;
14794if (sizeof ac_aggr.st_rdev)
14795return 0;
14796 ;
14797 return 0;
14798}
14799_ACEOF
14800rm -f conftest.$ac_objext
14801if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014802 (eval $ac_compile) 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014803 ac_status=$?
14804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14805 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014806 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000014807 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14808 (eval $ac_try) 2>&5
14809 ac_status=$?
14810 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14811 (exit $ac_status); }; }; then
14812 ac_cv_member_struct_stat_st_rdev=yes
14813else
14814 echo "$as_me: failed program was:" >&5
14815sed 's/^/| /' conftest.$ac_ext >&5
14816
Martin v. Löwis11437992002-04-12 09:54:03 +000014817ac_cv_member_struct_stat_st_rdev=no
14818fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014819rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014820fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014821rm -f conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014822fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014823echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
14824echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6
14825if test $ac_cv_member_struct_stat_st_rdev = yes; then
14826
14827cat >>confdefs.h <<_ACEOF
14828#define HAVE_STRUCT_STAT_ST_RDEV 1
14829_ACEOF
14830
14831
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014832fi
14833
Martin v. Löwis11437992002-04-12 09:54:03 +000014834echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
14835echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6
14836if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
14837 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014838else
Martin v. Löwis11437992002-04-12 09:54:03 +000014839 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014840#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014841/* confdefs.h. */
14842_ACEOF
14843cat confdefs.h >>conftest.$ac_ext
14844cat >>conftest.$ac_ext <<_ACEOF
14845/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014846$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014847int
14848main ()
14849{
14850static struct stat ac_aggr;
14851if (ac_aggr.st_blksize)
14852return 0;
14853 ;
14854 return 0;
14855}
14856_ACEOF
14857rm -f conftest.$ac_objext
14858if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014859 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014860 ac_status=$?
14861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14862 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014863 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014864 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14865 (eval $ac_try) 2>&5
14866 ac_status=$?
14867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14868 (exit $ac_status); }; }; then
14869 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014870else
Martin v. Löwis11437992002-04-12 09:54:03 +000014871 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014872sed 's/^/| /' conftest.$ac_ext >&5
14873
14874cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014875#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014876/* confdefs.h. */
14877_ACEOF
14878cat confdefs.h >>conftest.$ac_ext
14879cat >>conftest.$ac_ext <<_ACEOF
14880/* end confdefs.h. */
14881$ac_includes_default
14882int
14883main ()
14884{
14885static struct stat ac_aggr;
14886if (sizeof ac_aggr.st_blksize)
14887return 0;
14888 ;
14889 return 0;
14890}
14891_ACEOF
14892rm -f conftest.$ac_objext
14893if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014894 (eval $ac_compile) 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014895 ac_status=$?
14896 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14897 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014898 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000014899 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14900 (eval $ac_try) 2>&5
14901 ac_status=$?
14902 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14903 (exit $ac_status); }; }; then
14904 ac_cv_member_struct_stat_st_blksize=yes
14905else
14906 echo "$as_me: failed program was:" >&5
14907sed 's/^/| /' conftest.$ac_ext >&5
14908
Martin v. Löwis11437992002-04-12 09:54:03 +000014909ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000014910fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014911rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000014912fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014913rm -f conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000014914fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014915echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
14916echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6
14917if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000014918
Martin v. Löwis11437992002-04-12 09:54:03 +000014919cat >>confdefs.h <<_ACEOF
14920#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14921_ACEOF
14922
14923
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014924fi
14925
Martin v. Löwis11437992002-04-12 09:54:03 +000014926echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
14927echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6
14928if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
14929 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000014930else
Martin v. Löwis11437992002-04-12 09:54:03 +000014931 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014932#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014933/* confdefs.h. */
14934_ACEOF
14935cat confdefs.h >>conftest.$ac_ext
14936cat >>conftest.$ac_ext <<_ACEOF
14937/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014938$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000014939int
14940main ()
14941{
14942static struct stat ac_aggr;
14943if (ac_aggr.st_blocks)
14944return 0;
14945 ;
14946 return 0;
14947}
14948_ACEOF
14949rm -f conftest.$ac_objext
14950if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014951 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014952 ac_status=$?
14953 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14954 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014955 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000014956 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14957 (eval $ac_try) 2>&5
14958 ac_status=$?
14959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14960 (exit $ac_status); }; }; then
14961 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000014962else
Martin v. Löwis11437992002-04-12 09:54:03 +000014963 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014964sed 's/^/| /' conftest.$ac_ext >&5
14965
14966cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014967#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000014968/* confdefs.h. */
14969_ACEOF
14970cat confdefs.h >>conftest.$ac_ext
14971cat >>conftest.$ac_ext <<_ACEOF
14972/* end confdefs.h. */
14973$ac_includes_default
14974int
14975main ()
14976{
14977static struct stat ac_aggr;
14978if (sizeof ac_aggr.st_blocks)
14979return 0;
14980 ;
14981 return 0;
14982}
14983_ACEOF
14984rm -f conftest.$ac_objext
14985if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014986 (eval $ac_compile) 2>&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014987 ac_status=$?
14988 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14989 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014990 { ac_try='test -s conftest.$ac_objext'
Skip Montanaro6dead952003-09-25 14:50:04 +000014991 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
14992 (eval $ac_try) 2>&5
14993 ac_status=$?
14994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14995 (exit $ac_status); }; }; then
14996 ac_cv_member_struct_stat_st_blocks=yes
14997else
14998 echo "$as_me: failed program was:" >&5
14999sed 's/^/| /' conftest.$ac_ext >&5
15000
Martin v. Löwis11437992002-04-12 09:54:03 +000015001ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000015002fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015003rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015004fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015005rm -f conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000015006fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015007echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
15008echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6
15009if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000015010
Martin v. Löwis11437992002-04-12 09:54:03 +000015011cat >>confdefs.h <<_ACEOF
15012#define HAVE_STRUCT_STAT_ST_BLOCKS 1
15013_ACEOF
15014
15015
15016cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015017#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015018_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015019
15020else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015021 LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
Guido van Rossum98bf58f2001-10-18 20:34:25 +000015022fi
15023
Michael W. Hudson54241132001-12-07 15:38:26 +000015024
Martin v. Löwis11437992002-04-12 09:54:03 +000015025
15026echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
15027echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6
15028if test "${ac_cv_header_time_altzone+set}" = set; then
15029 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015030else
Martin v. Löwis11437992002-04-12 09:54:03 +000015031 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015032#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015033/* confdefs.h. */
15034_ACEOF
15035cat confdefs.h >>conftest.$ac_ext
15036cat >>conftest.$ac_ext <<_ACEOF
15037/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015038#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015039int
15040main ()
15041{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015042return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000015043 ;
15044 return 0;
15045}
15046_ACEOF
15047rm -f conftest.$ac_objext
15048if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015049 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015050 ac_status=$?
15051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15052 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015053 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015054 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15055 (eval $ac_try) 2>&5
15056 ac_status=$?
15057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15058 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015059 ac_cv_header_time_altzone=yes
15060else
Martin v. Löwis11437992002-04-12 09:54:03 +000015061 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015062sed 's/^/| /' conftest.$ac_ext >&5
15063
Martin v. Löwis11437992002-04-12 09:54:03 +000015064ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000015065fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015066rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015067fi
15068
Martin v. Löwis11437992002-04-12 09:54:03 +000015069echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
15070echo "${ECHO_T}$ac_cv_header_time_altzone" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015071if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015072
15073cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015074#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015075_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015076
15077fi
15078
Guido van Rossumda88dad1995-01-26 00:46:29 +000015079was_it_defined=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015080echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
15081echo $ECHO_N "checking whether sys/select.h and sys/time.h may both be included... $ECHO_C" >&6
15082cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015083#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015084/* confdefs.h. */
15085_ACEOF
15086cat confdefs.h >>conftest.$ac_ext
15087cat >>conftest.$ac_ext <<_ACEOF
15088/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015089
15090#include <sys/types.h>
15091#include <sys/select.h>
15092#include <sys/time.h>
15093
Martin v. Löwis11437992002-04-12 09:54:03 +000015094int
15095main ()
15096{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015097;
Martin v. Löwis11437992002-04-12 09:54:03 +000015098 ;
15099 return 0;
15100}
15101_ACEOF
15102rm -f conftest.$ac_objext
15103if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015104 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015105 ac_status=$?
15106 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15107 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015108 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015109 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15110 (eval $ac_try) 2>&5
15111 ac_status=$?
15112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15113 (exit $ac_status); }; }; then
15114
15115
15116cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015117#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015118_ACEOF
15119
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015120 was_it_defined=yes
15121
Guido van Rossumf78abae1997-01-21 22:02:36 +000015122else
Martin v. Löwis11437992002-04-12 09:54:03 +000015123 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015124sed 's/^/| /' conftest.$ac_ext >&5
15125
Guido van Rossum7f43da71994-08-01 12:15:30 +000015126fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015127rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015128echo "$as_me:$LINENO: result: $was_it_defined" >&5
15129echo "${ECHO_T}$was_it_defined" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +000015130
Martin v. Löwis11437992002-04-12 09:54:03 +000015131echo "$as_me:$LINENO: checking for addrinfo" >&5
15132echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6
15133if test "${ac_cv_struct_addrinfo+set}" = set; then
15134 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015135else
Martin v. Löwis11437992002-04-12 09:54:03 +000015136 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015137#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015138/* confdefs.h. */
15139_ACEOF
15140cat confdefs.h >>conftest.$ac_ext
15141cat >>conftest.$ac_ext <<_ACEOF
15142/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015143
15144# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015145int
15146main ()
15147{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015148struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000015149 ;
15150 return 0;
15151}
15152_ACEOF
15153rm -f conftest.$ac_objext
15154if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015155 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015156 ac_status=$?
15157 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15158 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015159 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015160 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15161 (eval $ac_try) 2>&5
15162 ac_status=$?
15163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15164 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015165 ac_cv_struct_addrinfo=yes
15166else
Martin v. Löwis11437992002-04-12 09:54:03 +000015167 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015168sed 's/^/| /' conftest.$ac_ext >&5
15169
Martin v. Löwis11437992002-04-12 09:54:03 +000015170ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015171fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015172rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015173fi
15174
Martin v. Löwis11437992002-04-12 09:54:03 +000015175echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
15176echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015177if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015178
15179cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015180#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015181_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015182
15183fi
15184
Martin v. Löwis11437992002-04-12 09:54:03 +000015185echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
15186echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6
15187if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
15188 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015189else
Martin v. Löwis11437992002-04-12 09:54:03 +000015190 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015191#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015192/* confdefs.h. */
15193_ACEOF
15194cat confdefs.h >>conftest.$ac_ext
15195cat >>conftest.$ac_ext <<_ACEOF
15196/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015197
15198# include <sys/types.h>
15199# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015200int
15201main ()
15202{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015203struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000015204 ;
15205 return 0;
15206}
15207_ACEOF
15208rm -f conftest.$ac_objext
15209if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015210 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015211 ac_status=$?
15212 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15213 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015214 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015215 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15216 (eval $ac_try) 2>&5
15217 ac_status=$?
15218 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15219 (exit $ac_status); }; }; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015220 ac_cv_struct_sockaddr_storage=yes
15221else
Martin v. Löwis11437992002-04-12 09:54:03 +000015222 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015223sed 's/^/| /' conftest.$ac_ext >&5
15224
Martin v. Löwis11437992002-04-12 09:54:03 +000015225ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015226fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015227rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015228fi
15229
Martin v. Löwis11437992002-04-12 09:54:03 +000015230echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
15231echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015232if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015233
15234cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015235#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015236_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015237
15238fi
15239
Guido van Rossum627b2d71993-12-24 10:39:16 +000015240# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000015241
Michael W. Hudson54241132001-12-07 15:38:26 +000015242
Martin v. Löwis11437992002-04-12 09:54:03 +000015243echo "$as_me:$LINENO: checking whether char is unsigned" >&5
15244echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6
15245if test "${ac_cv_c_char_unsigned+set}" = set; then
15246 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000015247else
Martin v. Löwis11437992002-04-12 09:54:03 +000015248 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015249#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015250/* confdefs.h. */
15251_ACEOF
15252cat confdefs.h >>conftest.$ac_ext
15253cat >>conftest.$ac_ext <<_ACEOF
15254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015255$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000015256int
15257main ()
15258{
15259static int test_array [1 - 2 * !(((char) -1) < 0)];
15260test_array [0] = 0
15261
15262 ;
15263 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000015264}
Martin v. Löwis11437992002-04-12 09:54:03 +000015265_ACEOF
15266rm -f conftest.$ac_objext
15267if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015268 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015269 ac_status=$?
15270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15271 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015272 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015273 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15274 (eval $ac_try) 2>&5
15275 ac_status=$?
15276 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15277 (exit $ac_status); }; }; then
Michael W. Hudson54241132001-12-07 15:38:26 +000015278 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015279else
15280 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015281sed 's/^/| /' conftest.$ac_ext >&5
15282
Martin v. Löwis11437992002-04-12 09:54:03 +000015283ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015284fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015285rm -f conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000015286fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015287echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
15288echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015289if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015290 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015291#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015292_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015293
15294fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000015295
Martin v. Löwis11437992002-04-12 09:54:03 +000015296echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
15297echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
15298if test "${ac_cv_c_const+set}" = set; then
15299 echo $ECHO_N "(cached) $ECHO_C" >&6
15300else
15301 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015302#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015303/* confdefs.h. */
15304_ACEOF
15305cat confdefs.h >>conftest.$ac_ext
15306cat >>conftest.$ac_ext <<_ACEOF
15307/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015308
Martin v. Löwis11437992002-04-12 09:54:03 +000015309int
15310main ()
15311{
15312/* FIXME: Include the comments suggested by Paul. */
15313#ifndef __cplusplus
15314 /* Ultrix mips cc rejects this. */
15315 typedef int charset[2];
15316 const charset x;
15317 /* SunOS 4.1.1 cc rejects this. */
15318 char const *const *ccp;
15319 char **p;
15320 /* NEC SVR4.0.2 mips cc rejects this. */
15321 struct point {int x, y;};
15322 static struct point const zero = {0,0};
15323 /* AIX XL C 1.02.0.0 rejects this.
15324 It does not let you subtract one const X* pointer from another in
15325 an arm of an if-expression whose if-part is not a constant
15326 expression */
15327 const char *g = "string";
15328 ccp = &g + (g ? g-g : 0);
15329 /* HPUX 7.0 cc rejects these. */
15330 ++ccp;
15331 p = (char**) ccp;
15332 ccp = (char const *const *) p;
15333 { /* SCO 3.2v4 cc rejects this. */
15334 char *t;
15335 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015336
Martin v. Löwis11437992002-04-12 09:54:03 +000015337 *t++ = 0;
15338 }
15339 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
15340 int x[] = {25, 17};
15341 const int *foo = &x[0];
15342 ++foo;
15343 }
15344 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
15345 typedef const int *iptr;
15346 iptr p = 0;
15347 ++p;
15348 }
15349 { /* AIX XL C 1.02.0.0 rejects this saying
15350 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
15351 struct s { int j; const int *ap[3]; };
15352 struct s *b; b->j = 5;
15353 }
15354 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
15355 const int foo = 10;
15356 }
15357#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000015358
Martin v. Löwis11437992002-04-12 09:54:03 +000015359 ;
15360 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000015361}
Martin v. Löwis11437992002-04-12 09:54:03 +000015362_ACEOF
15363rm -f conftest.$ac_objext
15364if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015365 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015366 ac_status=$?
15367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15368 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015369 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015370 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15371 (eval $ac_try) 2>&5
15372 ac_status=$?
15373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15374 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015375 ac_cv_c_const=yes
15376else
Martin v. Löwis11437992002-04-12 09:54:03 +000015377 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015378sed 's/^/| /' conftest.$ac_ext >&5
15379
Martin v. Löwis11437992002-04-12 09:54:03 +000015380ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015381fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015382rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015383fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015384echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
15385echo "${ECHO_T}$ac_cv_c_const" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015386if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015387
15388cat >>confdefs.h <<\_ACEOF
15389#define const
15390_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015391
15392fi
15393
Michael W. Hudson54241132001-12-07 15:38:26 +000015394
Guido van Rossumda88dad1995-01-26 00:46:29 +000015395works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015396echo "$as_me:$LINENO: checking for working volatile" >&5
15397echo $ECHO_N "checking for working volatile... $ECHO_C" >&6
15398cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015399#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015400/* confdefs.h. */
15401_ACEOF
15402cat confdefs.h >>conftest.$ac_ext
15403cat >>conftest.$ac_ext <<_ACEOF
15404/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000015405
Martin v. Löwis11437992002-04-12 09:54:03 +000015406int
15407main ()
15408{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015409volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015410 ;
15411 return 0;
15412}
15413_ACEOF
15414rm -f conftest.$ac_objext
15415if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015416 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015417 ac_status=$?
15418 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15419 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015420 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015421 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15422 (eval $ac_try) 2>&5
15423 ac_status=$?
15424 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15425 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015426 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000015427else
Martin v. Löwis11437992002-04-12 09:54:03 +000015428 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015429sed 's/^/| /' conftest.$ac_ext >&5
15430
Martin v. Löwis11437992002-04-12 09:54:03 +000015431
15432cat >>confdefs.h <<\_ACEOF
15433#define volatile
15434_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015435
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015436
Guido van Rossum627b2d71993-12-24 10:39:16 +000015437fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015438rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015439echo "$as_me:$LINENO: result: $works" >&5
15440echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015441
Guido van Rossumda88dad1995-01-26 00:46:29 +000015442works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015443echo "$as_me:$LINENO: checking for working signed char" >&5
15444echo $ECHO_N "checking for working signed char... $ECHO_C" >&6
15445cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015446#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015447/* confdefs.h. */
15448_ACEOF
15449cat confdefs.h >>conftest.$ac_ext
15450cat >>conftest.$ac_ext <<_ACEOF
15451/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015452
Martin v. Löwis11437992002-04-12 09:54:03 +000015453int
15454main ()
15455{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015456signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000015457 ;
15458 return 0;
15459}
15460_ACEOF
15461rm -f conftest.$ac_objext
15462if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015463 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015464 ac_status=$?
15465 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15466 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015467 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015468 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15469 (eval $ac_try) 2>&5
15470 ac_status=$?
15471 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15472 (exit $ac_status); }; }; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000015473 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000015474else
Martin v. Löwis11437992002-04-12 09:54:03 +000015475 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015476sed 's/^/| /' conftest.$ac_ext >&5
15477
Martin v. Löwis11437992002-04-12 09:54:03 +000015478
15479cat >>confdefs.h <<\_ACEOF
15480#define signed
15481_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000015482
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015483
Guido van Rossum7f43da71994-08-01 12:15:30 +000015484fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015485rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015486echo "$as_me:$LINENO: result: $works" >&5
15487echo "${ECHO_T}$works" >&6
Guido van Rossum7f43da71994-08-01 12:15:30 +000015488
Guido van Rossumda88dad1995-01-26 00:46:29 +000015489have_prototypes=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015490echo "$as_me:$LINENO: checking for prototypes" >&5
15491echo $ECHO_N "checking for prototypes... $ECHO_C" >&6
15492cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015493#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015494/* confdefs.h. */
15495_ACEOF
15496cat confdefs.h >>conftest.$ac_ext
15497cat >>conftest.$ac_ext <<_ACEOF
15498/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015499int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015500int
15501main ()
15502{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015503return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000015504 ;
15505 return 0;
15506}
15507_ACEOF
15508rm -f conftest.$ac_objext
15509if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015510 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015511 ac_status=$?
15512 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15513 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015514 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015515 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15516 (eval $ac_try) 2>&5
15517 ac_status=$?
15518 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15519 (exit $ac_status); }; }; then
15520
15521
15522cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015523#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015524_ACEOF
15525
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015526 have_prototypes=yes
15527
Guido van Rossumf78abae1997-01-21 22:02:36 +000015528else
Martin v. Löwis11437992002-04-12 09:54:03 +000015529 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015530sed 's/^/| /' conftest.$ac_ext >&5
15531
Guido van Rossum7f43da71994-08-01 12:15:30 +000015532fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015533rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015534echo "$as_me:$LINENO: result: $have_prototypes" >&5
15535echo "${ECHO_T}$have_prototypes" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015536
Guido van Rossumda88dad1995-01-26 00:46:29 +000015537works=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015538echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
15539echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6
15540cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015541#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015542/* confdefs.h. */
15543_ACEOF
15544cat confdefs.h >>conftest.$ac_ext
15545cat >>conftest.$ac_ext <<_ACEOF
15546/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000015547
15548#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000015549int foo(int x, ...) {
15550 va_list va;
15551 va_start(va, x);
15552 va_arg(va, int);
15553 va_arg(va, char *);
15554 va_arg(va, double);
15555 return 0;
15556}
Guido van Rossum7f43da71994-08-01 12:15:30 +000015557
Martin v. Löwis11437992002-04-12 09:54:03 +000015558int
15559main ()
15560{
Guido van Rossum90eea071996-08-30 20:58:57 +000015561return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000015562 ;
15563 return 0;
15564}
15565_ACEOF
15566rm -f conftest.$ac_objext
15567if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015568 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015569 ac_status=$?
15570 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15571 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015572 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015573 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15574 (eval $ac_try) 2>&5
15575 ac_status=$?
15576 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15577 (exit $ac_status); }; }; then
15578
15579
15580cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015581#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015582_ACEOF
15583
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015584 works=yes
15585
Guido van Rossumf78abae1997-01-21 22:02:36 +000015586else
Martin v. Löwis11437992002-04-12 09:54:03 +000015587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015588sed 's/^/| /' conftest.$ac_ext >&5
15589
Guido van Rossum627b2d71993-12-24 10:39:16 +000015590fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015591rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015592echo "$as_me:$LINENO: result: $works" >&5
15593echo "${ECHO_T}$works" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015594
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015595# check if sockaddr has sa_len member
Martin v. Löwis11437992002-04-12 09:54:03 +000015596echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
15597echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6
15598cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015599#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015600/* confdefs.h. */
15601_ACEOF
15602cat confdefs.h >>conftest.$ac_ext
15603cat >>conftest.$ac_ext <<_ACEOF
15604/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015605#include <sys/types.h>
15606#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015607int
15608main ()
15609{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015610struct sockaddr x;
15611x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000015612 ;
15613 return 0;
15614}
15615_ACEOF
15616rm -f conftest.$ac_objext
15617if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015618 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015619 ac_status=$?
15620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15621 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015622 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015623 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15624 (eval $ac_try) 2>&5
15625 ac_status=$?
15626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15627 (exit $ac_status); }; }; then
15628 echo "$as_me:$LINENO: result: yes" >&5
15629echo "${ECHO_T}yes" >&6
15630
15631cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015632#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015633_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015634
15635else
Martin v. Löwis11437992002-04-12 09:54:03 +000015636 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015637sed 's/^/| /' conftest.$ac_ext >&5
15638
Martin v. Löwis11437992002-04-12 09:54:03 +000015639echo "$as_me:$LINENO: result: no" >&5
15640echo "${ECHO_T}no" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015641fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015642rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000015643
Guido van Rossumda88dad1995-01-26 00:46:29 +000015644va_list_is_array=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015645echo "$as_me:$LINENO: checking whether va_list is an array" >&5
15646echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6
15647cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015648#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015649/* confdefs.h. */
15650_ACEOF
15651cat confdefs.h >>conftest.$ac_ext
15652cat >>conftest.$ac_ext <<_ACEOF
15653/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015654
15655#ifdef HAVE_STDARG_PROTOTYPES
15656#include <stdarg.h>
15657#else
15658#include <varargs.h>
15659#endif
15660
Martin v. Löwis11437992002-04-12 09:54:03 +000015661int
15662main ()
15663{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015664va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000015665 ;
15666 return 0;
15667}
15668_ACEOF
15669rm -f conftest.$ac_objext
15670if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015671 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015672 ac_status=$?
15673 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15674 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015675 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015676 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15677 (eval $ac_try) 2>&5
15678 ac_status=$?
15679 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15680 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015681 :
15682else
Martin v. Löwis11437992002-04-12 09:54:03 +000015683 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015684sed 's/^/| /' conftest.$ac_ext >&5
15685
Martin v. Löwis11437992002-04-12 09:54:03 +000015686
15687
15688cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015689#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015690_ACEOF
15691
Guido van Rossumda88dad1995-01-26 00:46:29 +000015692 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000015693
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015694fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015695rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015696echo "$as_me:$LINENO: result: $va_list_is_array" >&5
15697echo "${ECHO_T}$va_list_is_array" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015698
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015699# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000015700
15701
15702
15703echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
15704echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6
15705if test "${ac_cv_func_gethostbyname_r+set}" = set; then
15706 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015707else
Martin v. Löwis11437992002-04-12 09:54:03 +000015708 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015709#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015710/* confdefs.h. */
15711_ACEOF
15712cat confdefs.h >>conftest.$ac_ext
15713cat >>conftest.$ac_ext <<_ACEOF
15714/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015715/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015716 which can conflict with char gethostbyname_r (); below.
15717 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015718 <limits.h> exists even on freestanding compilers. Under hpux,
15719 including <limits.h> includes <sys/time.h> and causes problems
15720 checking for functions defined therein. */
15721#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015722# include <limits.h>
15723#else
15724# include <assert.h>
15725#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015726/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015727#ifdef __cplusplus
15728extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000015729{
Martin v. Löwis11437992002-04-12 09:54:03 +000015730#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015731/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000015732 builtin and then its argument prototype would still apply. */
15733char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015734/* The GNU C library defines this for functions which it implements
15735 to always fail with ENOSYS. Some functions are actually named
15736 something starting with __ and the normal name is an alias. */
15737#if defined (__stub_gethostbyname_r) || defined (__stub___gethostbyname_r)
15738choke me
15739#else
Skip Montanaro6dead952003-09-25 14:50:04 +000015740char (*f) () = gethostbyname_r;
15741#endif
15742#ifdef __cplusplus
15743}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015744#endif
15745
Skip Montanaro6dead952003-09-25 14:50:04 +000015746int
15747main ()
15748{
15749return f != gethostbyname_r;
Martin v. Löwis11437992002-04-12 09:54:03 +000015750 ;
15751 return 0;
15752}
15753_ACEOF
15754rm -f conftest.$ac_objext conftest$ac_exeext
15755if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015756 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015757 ac_status=$?
15758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15759 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015760 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015761 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15762 (eval $ac_try) 2>&5
15763 ac_status=$?
15764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15765 (exit $ac_status); }; }; then
15766 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015767else
Martin v. Löwis11437992002-04-12 09:54:03 +000015768 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015769sed 's/^/| /' conftest.$ac_ext >&5
15770
Martin v. Löwis11437992002-04-12 09:54:03 +000015771ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015772fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015773rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015774fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015775echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
15776echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6
15777if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015778
Martin v. Löwis11437992002-04-12 09:54:03 +000015779 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015780#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015781_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015782
Martin v. Löwis11437992002-04-12 09:54:03 +000015783 echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
15784echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015785 OLD_CFLAGS=$CFLAGS
15786 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015787 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015788#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015789/* confdefs.h. */
15790_ACEOF
15791cat confdefs.h >>conftest.$ac_ext
15792cat >>conftest.$ac_ext <<_ACEOF
15793/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015794
15795# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015796
Martin v. Löwis11437992002-04-12 09:54:03 +000015797int
15798main ()
15799{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015800
15801 char *name;
15802 struct hostent *he, *res;
15803 char buffer[2048];
15804 int buflen = 2048;
15805 int h_errnop;
15806
15807 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000015808
15809 ;
15810 return 0;
15811}
15812_ACEOF
15813rm -f conftest.$ac_objext
15814if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015815 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015816 ac_status=$?
15817 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15818 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015819 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015820 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15821 (eval $ac_try) 2>&5
15822 ac_status=$?
15823 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15824 (exit $ac_status); }; }; then
15825
15826 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015827#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015828_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015829
Martin v. Löwis11437992002-04-12 09:54:03 +000015830
15831cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015832#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015833_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015834
Martin v. Löwis11437992002-04-12 09:54:03 +000015835 echo "$as_me:$LINENO: result: yes" >&5
15836echo "${ECHO_T}yes" >&6
15837
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015838else
Martin v. Löwis11437992002-04-12 09:54:03 +000015839 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015840sed 's/^/| /' conftest.$ac_ext >&5
15841
Martin v. Löwis11437992002-04-12 09:54:03 +000015842
15843 echo "$as_me:$LINENO: result: no" >&5
15844echo "${ECHO_T}no" >&6
15845 echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
15846echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6
15847 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;
15863 char buffer[2048];
15864 int buflen = 2048;
15865 int h_errnop;
15866
15867 (void) gethostbyname_r(name, he, buffer, buflen, &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_5_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 3 args" >&5
15906echo $ECHO_N "checking gethostbyname_r with 3 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 struct hostent_data data;
15924
15925 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000015926
15927 ;
15928 return 0;
15929}
15930_ACEOF
15931rm -f conftest.$ac_objext
15932if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015933 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015934 ac_status=$?
15935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15936 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015937 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000015938 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
15939 (eval $ac_try) 2>&5
15940 ac_status=$?
15941 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15942 (exit $ac_status); }; }; then
15943
15944 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015945#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015946_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000015947
Martin v. Löwis11437992002-04-12 09:54:03 +000015948
15949cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015950#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015951_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015952
Martin v. Löwis11437992002-04-12 09:54:03 +000015953 echo "$as_me:$LINENO: result: yes" >&5
15954echo "${ECHO_T}yes" >&6
15955
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015956else
Martin v. Löwis11437992002-04-12 09:54:03 +000015957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015958sed 's/^/| /' conftest.$ac_ext >&5
15959
Martin v. Löwis11437992002-04-12 09:54:03 +000015960
15961 echo "$as_me:$LINENO: result: no" >&5
15962echo "${ECHO_T}no" >&6
15963
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015964fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015965rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015966
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015967fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015968rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015969
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015970fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015971rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015972 CFLAGS=$OLD_CFLAGS
15973
15974else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015975
Martin v. Löwis11437992002-04-12 09:54:03 +000015976
15977for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000015978do
Martin v. Löwis11437992002-04-12 09:54:03 +000015979as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15980echo "$as_me:$LINENO: checking for $ac_func" >&5
15981echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15982if eval "test \"\${$as_ac_var+set}\" = set"; then
15983 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015984else
Martin v. Löwis11437992002-04-12 09:54:03 +000015985 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015986#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000015987/* confdefs.h. */
15988_ACEOF
15989cat confdefs.h >>conftest.$ac_ext
15990cat >>conftest.$ac_ext <<_ACEOF
15991/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000015992/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015993 which can conflict with char $ac_func (); below.
15994 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000015995 <limits.h> exists even on freestanding compilers. Under hpux,
15996 including <limits.h> includes <sys/time.h> and causes problems
15997 checking for functions defined therein. */
15998#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000015999# include <limits.h>
16000#else
16001# include <assert.h>
16002#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016003/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016004#ifdef __cplusplus
16005extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016006{
Martin v. Löwis11437992002-04-12 09:54:03 +000016007#endif
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016008/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016009 builtin and then its argument prototype would still apply. */
16010char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016011/* The GNU C library defines this for functions which it implements
16012 to always fail with ENOSYS. Some functions are actually named
16013 something starting with __ and the normal name is an alias. */
Thomas Wouters3a584202000-08-05 23:28:51 +000016014#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016015choke me
16016#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016017char (*f) () = $ac_func;
16018#endif
16019#ifdef __cplusplus
16020}
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016021#endif
16022
Skip Montanaro6dead952003-09-25 14:50:04 +000016023int
16024main ()
16025{
16026return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016027 ;
16028 return 0;
16029}
16030_ACEOF
16031rm -f conftest.$ac_objext conftest$ac_exeext
16032if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016033 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016034 ac_status=$?
16035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16036 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016037 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016038 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16039 (eval $ac_try) 2>&5
16040 ac_status=$?
16041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16042 (exit $ac_status); }; }; then
16043 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016044else
Martin v. Löwis11437992002-04-12 09:54:03 +000016045 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016046sed 's/^/| /' conftest.$ac_ext >&5
16047
Martin v. Löwis11437992002-04-12 09:54:03 +000016048eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016049fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016050rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016051fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016052echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16053echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16054if test `eval echo '${'$as_ac_var'}'` = yes; then
16055 cat >>confdefs.h <<_ACEOF
16056#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16057_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016058
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016059fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016060done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016061
Michael W. Hudson54241132001-12-07 15:38:26 +000016062
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000016063fi
16064
Michael W. Hudson54241132001-12-07 15:38:26 +000016065
16066
16067
16068
16069
16070
Guido van Rossum627b2d71993-12-24 10:39:16 +000016071# checks for system services
16072# (none yet)
16073
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016074# Linux requires this for correct f.p. operations
Martin v. Löwis11437992002-04-12 09:54:03 +000016075echo "$as_me:$LINENO: checking for __fpu_control" >&5
16076echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6
16077if test "${ac_cv_func___fpu_control+set}" = set; then
16078 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016079else
Martin v. Löwis11437992002-04-12 09:54:03 +000016080 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016081#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016082/* confdefs.h. */
16083_ACEOF
16084cat confdefs.h >>conftest.$ac_ext
16085cat >>conftest.$ac_ext <<_ACEOF
16086/* end confdefs.h. */
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016087/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016088 which can conflict with char __fpu_control (); below.
16089 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016090 <limits.h> exists even on freestanding compilers. Under hpux,
16091 including <limits.h> includes <sys/time.h> and causes problems
16092 checking for functions defined therein. */
16093#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016094# include <limits.h>
16095#else
16096# include <assert.h>
16097#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016098/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016099#ifdef __cplusplus
16100extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016101{
Martin v. Löwis11437992002-04-12 09:54:03 +000016102#endif
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016103/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016104 builtin and then its argument prototype would still apply. */
16105char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016106/* The GNU C library defines this for functions which it implements
16107 to always fail with ENOSYS. Some functions are actually named
16108 something starting with __ and the normal name is an alias. */
16109#if defined (__stub___fpu_control) || defined (__stub_____fpu_control)
16110choke me
16111#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016112char (*f) () = __fpu_control;
16113#endif
16114#ifdef __cplusplus
16115}
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016116#endif
16117
Skip Montanaro6dead952003-09-25 14:50:04 +000016118int
16119main ()
16120{
16121return f != __fpu_control;
Martin v. Löwis11437992002-04-12 09:54:03 +000016122 ;
16123 return 0;
16124}
16125_ACEOF
16126rm -f conftest.$ac_objext conftest$ac_exeext
16127if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016128 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016129 ac_status=$?
16130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16131 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016132 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016133 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16134 (eval $ac_try) 2>&5
16135 ac_status=$?
16136 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16137 (exit $ac_status); }; }; then
16138 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016139else
Martin v. Löwis11437992002-04-12 09:54:03 +000016140 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016141sed 's/^/| /' conftest.$ac_ext >&5
16142
Martin v. Löwis11437992002-04-12 09:54:03 +000016143ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016144fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016145rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016146fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016147echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
16148echo "${ECHO_T}$ac_cv_func___fpu_control" >&6
16149if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016150 :
16151else
Martin v. Löwis11437992002-04-12 09:54:03 +000016152
16153echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
16154echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6
16155if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
16156 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016157else
Martin v. Löwis11437992002-04-12 09:54:03 +000016158 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016159LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016160cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016161#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016162/* confdefs.h. */
16163_ACEOF
16164cat confdefs.h >>conftest.$ac_ext
16165cat >>conftest.$ac_ext <<_ACEOF
16166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016167
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016168/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016169#ifdef __cplusplus
16170extern "C"
16171#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016172/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016173 builtin and then its argument prototype would still apply. */
16174char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016175int
16176main ()
16177{
16178__fpu_control ();
16179 ;
16180 return 0;
16181}
16182_ACEOF
16183rm -f conftest.$ac_objext conftest$ac_exeext
16184if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016185 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016186 ac_status=$?
16187 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16188 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016189 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016190 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16191 (eval $ac_try) 2>&5
16192 ac_status=$?
16193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16194 (exit $ac_status); }; }; then
16195 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000016196else
Martin v. Löwis11437992002-04-12 09:54:03 +000016197 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016198sed 's/^/| /' conftest.$ac_ext >&5
16199
Martin v. Löwis11437992002-04-12 09:54:03 +000016200ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016201fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016202rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016203LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016204fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016205echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
16206echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6
16207if test $ac_cv_lib_ieee___fpu_control = yes; then
16208 cat >>confdefs.h <<_ACEOF
16209#define HAVE_LIBIEEE 1
16210_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016211
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016212 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016213
Guido van Rossum627b2d71993-12-24 10:39:16 +000016214fi
16215
Michael W. Hudson54241132001-12-07 15:38:26 +000016216
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000016217fi
16218
Michael W. Hudson54241132001-12-07 15:38:26 +000016219
Guido van Rossum7f253911997-05-09 02:42:48 +000016220# Check for --with-fpectl
Martin v. Löwis11437992002-04-12 09:54:03 +000016221echo "$as_me:$LINENO: checking for --with-fpectl" >&5
16222echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6
16223
Guido van Rossum7f253911997-05-09 02:42:48 +000016224# Check whether --with-fpectl or --without-fpectl was given.
16225if test "${with_fpectl+set}" = set; then
16226 withval="$with_fpectl"
Martin v. Löwis11437992002-04-12 09:54:03 +000016227
Guido van Rossum7f253911997-05-09 02:42:48 +000016228if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016229then
16230
16231cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000016232#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016233_ACEOF
16234
16235 echo "$as_me:$LINENO: result: yes" >&5
16236echo "${ECHO_T}yes" >&6
16237else echo "$as_me:$LINENO: result: no" >&5
16238echo "${ECHO_T}no" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016239fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016240else
Martin v. Löwis11437992002-04-12 09:54:03 +000016241 echo "$as_me:$LINENO: result: no" >&5
16242echo "${ECHO_T}no" >&6
16243fi;
Guido van Rossum7f253911997-05-09 02:42:48 +000016244
Guido van Rossum7f43da71994-08-01 12:15:30 +000016245# check for --with-libm=...
16246
Guido van Rossum563e7081996-09-10 18:20:48 +000016247case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000016248Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016249BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000016250*) LIBM=-lm
16251esac
Martin v. Löwis11437992002-04-12 09:54:03 +000016252echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
16253echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6
16254
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016255# Check whether --with-libm or --without-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016256if test "${with_libm+set}" = set; then
16257 withval="$with_libm"
Martin v. Löwis11437992002-04-12 09:54:03 +000016258
Guido van Rossum7f253911997-05-09 02:42:48 +000016259if test "$withval" = no
16260then LIBM=
Martin v. Löwis11437992002-04-12 09:54:03 +000016261 echo "$as_me:$LINENO: result: force LIBM empty" >&5
16262echo "${ECHO_T}force LIBM empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016263elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016264then LIBM=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016265 echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
16266echo "${ECHO_T}set LIBM=\"$withval\"" >&6
16267else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
16268echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
16269 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016270fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016271else
Martin v. Löwis11437992002-04-12 09:54:03 +000016272 echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
16273echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6
16274fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016275
16276# check for --with-libc=...
16277
Martin v. Löwis11437992002-04-12 09:54:03 +000016278echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
16279echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6
16280
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016281# Check whether --with-libc or --without-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016282if test "${with_libc+set}" = set; then
16283 withval="$with_libc"
Martin v. Löwis11437992002-04-12 09:54:03 +000016284
Guido van Rossum7f253911997-05-09 02:42:48 +000016285if test "$withval" = no
16286then LIBC=
Martin v. Löwis11437992002-04-12 09:54:03 +000016287 echo "$as_me:$LINENO: result: force LIBC empty" >&5
16288echo "${ECHO_T}force LIBC empty" >&6
Guido van Rossum7f253911997-05-09 02:42:48 +000016289elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000016290then LIBC=$withval
Martin v. Löwis11437992002-04-12 09:54:03 +000016291 echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
16292echo "${ECHO_T}set LIBC=\"$withval\"" >&6
16293else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
16294echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
16295 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000016296fi
Guido van Rossum7f253911997-05-09 02:42:48 +000016297else
Martin v. Löwis11437992002-04-12 09:54:03 +000016298 echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
16299echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6
16300fi;
Guido van Rossum7f43da71994-08-01 12:15:30 +000016301
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016302# check for hypot() in math library
16303LIBS_SAVE=$LIBS
16304LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000016305
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016306for ac_func in hypot
16307do
Martin v. Löwis11437992002-04-12 09:54:03 +000016308as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16309echo "$as_me:$LINENO: checking for $ac_func" >&5
16310echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16311if eval "test \"\${$as_ac_var+set}\" = set"; then
16312 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016313else
Martin v. Löwis11437992002-04-12 09:54:03 +000016314 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016315#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016316/* confdefs.h. */
16317_ACEOF
16318cat confdefs.h >>conftest.$ac_ext
16319cat >>conftest.$ac_ext <<_ACEOF
16320/* end confdefs.h. */
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016321/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016322 which can conflict with char $ac_func (); below.
16323 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Anthony Baxterc0501192003-09-27 09:12:27 +000016324 <limits.h> exists even on freestanding compilers. Under hpux,
16325 including <limits.h> includes <sys/time.h> and causes problems
16326 checking for functions defined therein. */
16327#if defined (__STDC__) && !defined (_HPUX_SOURCE)
Skip Montanaro6dead952003-09-25 14:50:04 +000016328# include <limits.h>
16329#else
16330# include <assert.h>
16331#endif
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016332/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016333#ifdef __cplusplus
16334extern "C"
Skip Montanaro6dead952003-09-25 14:50:04 +000016335{
Martin v. Löwis11437992002-04-12 09:54:03 +000016336#endif
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016337/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000016338 builtin and then its argument prototype would still apply. */
16339char $ac_func ();
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016340/* The GNU C library defines this for functions which it implements
16341 to always fail with ENOSYS. Some functions are actually named
16342 something starting with __ and the normal name is an alias. */
16343#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16344choke me
16345#else
Skip Montanaro6dead952003-09-25 14:50:04 +000016346char (*f) () = $ac_func;
16347#endif
16348#ifdef __cplusplus
16349}
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016350#endif
16351
Skip Montanaro6dead952003-09-25 14:50:04 +000016352int
16353main ()
16354{
16355return f != $ac_func;
Martin v. Löwis11437992002-04-12 09:54:03 +000016356 ;
16357 return 0;
16358}
16359_ACEOF
16360rm -f conftest.$ac_objext conftest$ac_exeext
16361if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016362 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016363 ac_status=$?
16364 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16365 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016366 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016367 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16368 (eval $ac_try) 2>&5
16369 ac_status=$?
16370 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16371 (exit $ac_status); }; }; then
16372 eval "$as_ac_var=yes"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016373else
Martin v. Löwis11437992002-04-12 09:54:03 +000016374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016375sed 's/^/| /' conftest.$ac_ext >&5
16376
Martin v. Löwis11437992002-04-12 09:54:03 +000016377eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016378fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016379rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016380fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016381echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
16382echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16383if test `eval echo '${'$as_ac_var'}'` = yes; then
16384 cat >>confdefs.h <<_ACEOF
16385#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16386_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000016387
Michael W. Hudson54241132001-12-07 15:38:26 +000016388else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016389 LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016390fi
Guido van Rossum2b3ac691996-08-30 15:18:41 +000016391done
16392
Michael W. Hudson54241132001-12-07 15:38:26 +000016393
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000016394LIBS=$LIBS_SAVE
16395
Guido van Rossumef2255b2000-03-10 22:30:29 +000016396# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000016397if test "${ac_cv_header_wchar_h+set}" = set; then
16398 echo "$as_me:$LINENO: checking for wchar.h" >&5
16399echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16400if test "${ac_cv_header_wchar_h+set}" = set; then
16401 echo $ECHO_N "(cached) $ECHO_C" >&6
16402fi
16403echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16404echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000016405else
Martin v. Löwis11437992002-04-12 09:54:03 +000016406 # Is the header compilable?
16407echo "$as_me:$LINENO: checking wchar.h usability" >&5
16408echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6
16409cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016410#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016411/* confdefs.h. */
16412_ACEOF
16413cat confdefs.h >>conftest.$ac_ext
16414cat >>conftest.$ac_ext <<_ACEOF
16415/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016416$ac_includes_default
16417#include <wchar.h>
16418_ACEOF
16419rm -f conftest.$ac_objext
16420if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016421 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016422 ac_status=$?
16423 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16424 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016425 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016426 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16427 (eval $ac_try) 2>&5
16428 ac_status=$?
16429 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16430 (exit $ac_status); }; }; then
16431 ac_header_compiler=yes
16432else
16433 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016434sed 's/^/| /' conftest.$ac_ext >&5
16435
Martin v. Löwis11437992002-04-12 09:54:03 +000016436ac_header_compiler=no
16437fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016438rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016439echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16440echo "${ECHO_T}$ac_header_compiler" >&6
16441
16442# Is the header present?
16443echo "$as_me:$LINENO: checking wchar.h presence" >&5
16444echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6
16445cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016446#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016447/* confdefs.h. */
16448_ACEOF
16449cat confdefs.h >>conftest.$ac_ext
16450cat >>conftest.$ac_ext <<_ACEOF
16451/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000016452#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016453_ACEOF
16454if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
16455 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16456 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016457 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016458 rm -f conftest.er1
16459 cat conftest.err >&5
16460 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16461 (exit $ac_status); } >/dev/null; then
16462 if test -s conftest.err; then
16463 ac_cpp_err=$ac_c_preproc_warn_flag
16464 else
16465 ac_cpp_err=
16466 fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016467else
Martin v. Löwis11437992002-04-12 09:54:03 +000016468 ac_cpp_err=yes
16469fi
16470if test -z "$ac_cpp_err"; then
16471 ac_header_preproc=yes
16472else
16473 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016474sed 's/^/| /' conftest.$ac_ext >&5
16475
Martin v. Löwis11437992002-04-12 09:54:03 +000016476 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000016477fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016478rm -f conftest.err conftest.$ac_ext
16479echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16480echo "${ECHO_T}$ac_header_preproc" >&6
16481
16482# So? What about this header?
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016483case $ac_header_compiler:$ac_header_preproc in
16484 yes:no )
Martin v. Löwis11437992002-04-12 09:54:03 +000016485 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
16486echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016487 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016488echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16489 (
16490 cat <<\_ASBOX
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016491## ------------------------------------ ##
16492## Report this to bug-autoconf@gnu.org. ##
16493## ------------------------------------ ##
16494_ASBOX
16495 ) |
16496 sed "s/^/$as_me: WARNING: /" >&2
16497 ;;
16498 no:yes )
16499 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
16500echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
16501 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
16502echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
16503 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
16504echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
16505 (
16506 cat <<\_ASBOX
16507## ------------------------------------ ##
16508## Report this to bug-autoconf@gnu.org. ##
16509## ------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016510_ASBOX
16511 ) |
16512 sed "s/^/$as_me: WARNING: /" >&2
16513 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016514esac
16515echo "$as_me:$LINENO: checking for wchar.h" >&5
16516echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6
16517if test "${ac_cv_header_wchar_h+set}" = set; then
16518 echo $ECHO_N "(cached) $ECHO_C" >&6
16519else
16520 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000016521fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016522echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
16523echo "${ECHO_T}$ac_cv_header_wchar_h" >&6
16524
16525fi
16526if test $ac_cv_header_wchar_h = yes; then
16527
16528
16529cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000016530#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016531_ACEOF
16532
Martin v. Löwisc45929e2002-04-06 10:10:49 +000016533 wchar_h="yes"
16534
Guido van Rossumef2255b2000-03-10 22:30:29 +000016535else
Martin v. Löwis11437992002-04-12 09:54:03 +000016536 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000016537
16538fi
16539
Michael W. Hudson54241132001-12-07 15:38:26 +000016540
Martin v. Löwis11437992002-04-12 09:54:03 +000016541
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016542# determine wchar_t size
16543if test "$wchar_h" = yes
16544then
Martin v. Löwis11437992002-04-12 09:54:03 +000016545 echo "$as_me:$LINENO: checking for wchar_t" >&5
16546echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
16547if test "${ac_cv_type_wchar_t+set}" = set; then
16548 echo $ECHO_N "(cached) $ECHO_C" >&6
16549else
16550 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016551#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016552/* confdefs.h. */
16553_ACEOF
16554cat confdefs.h >>conftest.$ac_ext
16555cat >>conftest.$ac_ext <<_ACEOF
16556/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016557#include <wchar.h>
16558
Martin v. Löwis11437992002-04-12 09:54:03 +000016559int
16560main ()
16561{
16562if ((wchar_t *) 0)
16563 return 0;
16564if (sizeof (wchar_t))
16565 return 0;
16566 ;
16567 return 0;
16568}
16569_ACEOF
16570rm -f conftest.$ac_objext
16571if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016572 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016573 ac_status=$?
16574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16575 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016576 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016577 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16578 (eval $ac_try) 2>&5
16579 ac_status=$?
16580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16581 (exit $ac_status); }; }; then
16582 ac_cv_type_wchar_t=yes
16583else
16584 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016585sed 's/^/| /' conftest.$ac_ext >&5
16586
Martin v. Löwis11437992002-04-12 09:54:03 +000016587ac_cv_type_wchar_t=no
16588fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016589rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016590fi
16591echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
16592echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
16593
16594echo "$as_me:$LINENO: checking size of wchar_t" >&5
16595echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
16596if test "${ac_cv_sizeof_wchar_t+set}" = set; then
16597 echo $ECHO_N "(cached) $ECHO_C" >&6
16598else
16599 if test "$ac_cv_type_wchar_t" = yes; then
16600 # The cast to unsigned long works around a bug in the HP C Compiler
16601 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
16602 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
16603 # This bug is HP SR number 8606223364.
16604 if test "$cross_compiling" = yes; then
16605 # Depending upon the size, compute the lo and hi bounds.
16606cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016607#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016608/* confdefs.h. */
16609_ACEOF
16610cat confdefs.h >>conftest.$ac_ext
16611cat >>conftest.$ac_ext <<_ACEOF
16612/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016613#include <wchar.h>
16614
Martin v. Löwis11437992002-04-12 09:54:03 +000016615int
16616main ()
16617{
16618static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= 0)];
16619test_array [0] = 0
16620
16621 ;
16622 return 0;
16623}
16624_ACEOF
16625rm -f conftest.$ac_objext
16626if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016627 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016628 ac_status=$?
16629 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16630 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016631 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016632 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16633 (eval $ac_try) 2>&5
16634 ac_status=$?
16635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16636 (exit $ac_status); }; }; then
16637 ac_lo=0 ac_mid=0
16638 while :; do
16639 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016640#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016641/* confdefs.h. */
16642_ACEOF
16643cat confdefs.h >>conftest.$ac_ext
16644cat >>conftest.$ac_ext <<_ACEOF
16645/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016646#include <wchar.h>
16647
Martin v. Löwis11437992002-04-12 09:54:03 +000016648int
16649main ()
16650{
16651static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16652test_array [0] = 0
16653
16654 ;
16655 return 0;
16656}
16657_ACEOF
16658rm -f conftest.$ac_objext
16659if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016660 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016661 ac_status=$?
16662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16663 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016664 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16666 (eval $ac_try) 2>&5
16667 ac_status=$?
16668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16669 (exit $ac_status); }; }; then
16670 ac_hi=$ac_mid; break
16671else
16672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016673sed 's/^/| /' conftest.$ac_ext >&5
16674
Martin v. Löwis11437992002-04-12 09:54:03 +000016675ac_lo=`expr $ac_mid + 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016676 if test $ac_lo -le $ac_mid; then
16677 ac_lo= ac_hi=
16678 break
16679 fi
16680 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000016681fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016682rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016683 done
16684else
16685 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016686sed 's/^/| /' conftest.$ac_ext >&5
16687
Martin v. Löwis11437992002-04-12 09:54:03 +000016688cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016689#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016690/* confdefs.h. */
16691_ACEOF
16692cat confdefs.h >>conftest.$ac_ext
16693cat >>conftest.$ac_ext <<_ACEOF
16694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016695#include <wchar.h>
16696
Martin v. Löwis11437992002-04-12 09:54:03 +000016697int
16698main ()
16699{
16700static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) < 0)];
16701test_array [0] = 0
16702
16703 ;
16704 return 0;
16705}
16706_ACEOF
16707rm -f conftest.$ac_objext
16708if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016709 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016710 ac_status=$?
16711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16712 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016713 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016714 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16715 (eval $ac_try) 2>&5
16716 ac_status=$?
16717 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16718 (exit $ac_status); }; }; then
16719 ac_hi=-1 ac_mid=-1
16720 while :; do
16721 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016722#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016723/* confdefs.h. */
16724_ACEOF
16725cat confdefs.h >>conftest.$ac_ext
16726cat >>conftest.$ac_ext <<_ACEOF
16727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016728#include <wchar.h>
16729
Martin v. Löwis11437992002-04-12 09:54:03 +000016730int
16731main ()
16732{
16733static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) >= $ac_mid)];
16734test_array [0] = 0
16735
16736 ;
16737 return 0;
16738}
16739_ACEOF
16740rm -f conftest.$ac_objext
16741if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016742 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016743 ac_status=$?
16744 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16745 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016746 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016747 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16748 (eval $ac_try) 2>&5
16749 ac_status=$?
16750 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16751 (exit $ac_status); }; }; then
16752 ac_lo=$ac_mid; break
16753else
16754 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016755sed 's/^/| /' conftest.$ac_ext >&5
16756
Martin v. Löwis11437992002-04-12 09:54:03 +000016757ac_hi=`expr '(' $ac_mid ')' - 1`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016758 if test $ac_mid -le $ac_hi; then
16759 ac_lo= ac_hi=
16760 break
16761 fi
16762 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000016763fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016764rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016765 done
16766else
16767 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016768sed 's/^/| /' conftest.$ac_ext >&5
16769
Martin v. Löwis11437992002-04-12 09:54:03 +000016770ac_lo= ac_hi=
16771fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016772rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016773fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016774rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016775# Binary search between lo and hi bounds.
16776while test "x$ac_lo" != "x$ac_hi"; do
16777 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
16778 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016779#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016780/* confdefs.h. */
16781_ACEOF
16782cat confdefs.h >>conftest.$ac_ext
16783cat >>conftest.$ac_ext <<_ACEOF
16784/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016785#include <wchar.h>
16786
Martin v. Löwis11437992002-04-12 09:54:03 +000016787int
16788main ()
16789{
16790static int test_array [1 - 2 * !(((long) (sizeof (wchar_t))) <= $ac_mid)];
16791test_array [0] = 0
16792
16793 ;
16794 return 0;
16795}
16796_ACEOF
16797rm -f conftest.$ac_objext
16798if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016799 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016800 ac_status=$?
16801 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16802 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016803 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000016804 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16805 (eval $ac_try) 2>&5
16806 ac_status=$?
16807 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16808 (exit $ac_status); }; }; then
16809 ac_hi=$ac_mid
16810else
16811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016812sed 's/^/| /' conftest.$ac_ext >&5
16813
Martin v. Löwis11437992002-04-12 09:54:03 +000016814ac_lo=`expr '(' $ac_mid ')' + 1`
16815fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016816rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016817done
16818case $ac_lo in
16819?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Skip Montanaro6dead952003-09-25 14:50:04 +000016820'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16821See \`config.log' for more details." >&5
16822echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16823See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016824 { (exit 1); exit 1; }; } ;;
16825esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016826else
16827 if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000016828 { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
16829See \`config.log' for more details." >&5
16830echo "$as_me: error: cannot run test program while cross compiling
16831See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016832 { (exit 1); exit 1; }; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000016833else
Martin v. Löwis11437992002-04-12 09:54:03 +000016834 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016835#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016836/* confdefs.h. */
16837_ACEOF
16838cat confdefs.h >>conftest.$ac_ext
16839cat >>conftest.$ac_ext <<_ACEOF
16840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016841#include <wchar.h>
16842
16843long longval () { return (long) (sizeof (wchar_t)); }
16844unsigned long ulongval () { return (long) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000016845#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016846#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016847int
16848main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016849{
Martin v. Löwis11437992002-04-12 09:54:03 +000016850
16851 FILE *f = fopen ("conftest.val", "w");
16852 if (! f)
16853 exit (1);
16854 if (((long) (sizeof (wchar_t))) < 0)
16855 {
16856 long i = longval ();
16857 if (i != ((long) (sizeof (wchar_t))))
16858 exit (1);
16859 fprintf (f, "%ld\n", i);
16860 }
16861 else
16862 {
16863 unsigned long i = ulongval ();
16864 if (i != ((long) (sizeof (wchar_t))))
16865 exit (1);
16866 fprintf (f, "%lu\n", i);
16867 }
16868 exit (ferror (f) || fclose (f) != 0);
16869
16870 ;
16871 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000016872}
Martin v. Löwis11437992002-04-12 09:54:03 +000016873_ACEOF
16874rm -f conftest$ac_exeext
16875if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16876 (eval $ac_link) 2>&5
16877 ac_status=$?
16878 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16879 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16880 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16881 (eval $ac_try) 2>&5
16882 ac_status=$?
16883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16884 (exit $ac_status); }; }; then
16885 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000016886else
Martin v. Löwis11437992002-04-12 09:54:03 +000016887 echo "$as_me: program exited with status $ac_status" >&5
16888echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016889sed 's/^/| /' conftest.$ac_ext >&5
16890
Martin v. Löwis11437992002-04-12 09:54:03 +000016891( exit $ac_status )
Skip Montanaro6dead952003-09-25 14:50:04 +000016892{ { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t), 77
16893See \`config.log' for more details." >&5
16894echo "$as_me: error: cannot compute sizeof (wchar_t), 77
16895See \`config.log' for more details." >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000016896 { (exit 1); exit 1; }; }
16897fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016898rm -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 +000016899fi
16900fi
16901rm -f conftest.val
16902else
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016903 ac_cv_sizeof_wchar_t=0
Guido van Rossumef2255b2000-03-10 22:30:29 +000016904fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000016905fi
Martin v. Löwis11437992002-04-12 09:54:03 +000016906echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
16907echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
16908cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016909#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000016910_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016911
Michael W. Hudson54241132001-12-07 15:38:26 +000016912
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000016913fi
16914
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016915echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
16916echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6
16917have_ucs4_tcl=no
16918cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016919#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016920/* confdefs.h. */
16921_ACEOF
16922cat confdefs.h >>conftest.$ac_ext
16923cat >>conftest.$ac_ext <<_ACEOF
16924/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016925
16926#include <tcl.h>
16927#if TCL_UTF_MAX != 6
16928# error "NOT UCS4_TCL"
16929#endif
16930int
16931main ()
16932{
16933
16934 ;
16935 return 0;
16936}
16937_ACEOF
16938rm -f conftest.$ac_objext
16939if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016940 (eval $ac_compile) 2>&5
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016941 ac_status=$?
16942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16943 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016944 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016945 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
16946 (eval $ac_try) 2>&5
16947 ac_status=$?
16948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16949 (exit $ac_status); }; }; then
16950
16951
16952cat >>confdefs.h <<\_ACEOF
16953#define HAVE_UCS4_TCL 1
16954_ACEOF
16955
16956 have_ucs4_tcl=yes
16957
16958else
16959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016960sed 's/^/| /' conftest.$ac_ext >&5
16961
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016962fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016963rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000016964echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
16965echo "${ECHO_T}$have_ucs4_tcl" >&6
16966
Skip Montanaro6dead952003-09-25 14:50:04 +000016967# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016968if test "$wchar_h" = yes
16969then
16970 # check whether wchar_t is signed or not
16971 echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
16972echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6
16973 if test "${ac_cv_wchar_t_signed+set}" = set; then
16974 echo $ECHO_N "(cached) $ECHO_C" >&6
16975else
16976
16977 if test "$cross_compiling" = yes; then
16978 ac_cv_wchar_t_signed=yes
16979else
16980 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016981#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000016982/* confdefs.h. */
16983_ACEOF
16984cat confdefs.h >>conftest.$ac_ext
16985cat >>conftest.$ac_ext <<_ACEOF
16986/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000016987
16988 #include <wchar.h>
16989 int main()
16990 {
16991 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 1 : 0);
16992 }
16993
16994_ACEOF
16995rm -f conftest$ac_exeext
16996if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
16997 (eval $ac_link) 2>&5
16998 ac_status=$?
16999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17000 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17001 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17002 (eval $ac_try) 2>&5
17003 ac_status=$?
17004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17005 (exit $ac_status); }; }; then
17006 ac_cv_wchar_t_signed=yes
17007else
17008 echo "$as_me: program exited with status $ac_status" >&5
17009echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017010sed 's/^/| /' conftest.$ac_ext >&5
17011
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017012( exit $ac_status )
17013ac_cv_wchar_t_signed=no
17014fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017015rm -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 +000017016fi
17017fi
17018
17019 echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
17020echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6
17021fi
17022
Martin v. Löwis11437992002-04-12 09:54:03 +000017023echo "$as_me:$LINENO: checking what type to use for unicode" >&5
17024echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017025# Check whether --enable-unicode or --disable-unicode was given.
17026if test "${enable_unicode+set}" = set; then
17027 enableval="$enable_unicode"
Martin v. Löwis11437992002-04-12 09:54:03 +000017028
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017029else
17030 enable_unicode=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000017031fi;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017032
17033if test $enable_unicode = yes
17034then
Martin v. Löwisfd917792001-06-27 20:22:04 +000017035 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000017036 case "$have_ucs4_tcl" in
17037 yes) enable_unicode="ucs4"
17038 ;;
17039 *) enable_unicode="ucs2"
17040 ;;
17041 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017042fi
17043
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017044
17045
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017046case "$enable_unicode" in
17047ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000017048 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017049#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000017050_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017051
17052 ;;
17053ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000017054 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017055#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000017056_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017057
17058 ;;
17059esac
17060
Michael W. Hudson54241132001-12-07 15:38:26 +000017061
Martin v. Löwis11437992002-04-12 09:54:03 +000017062
17063
Martin v. Löwis0036cba2002-04-12 09:58:45 +000017064
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017065if test "$enable_unicode" = "no"
17066then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017067 UNICODE_OBJS=""
Martin v. Löwis11437992002-04-12 09:54:03 +000017068 echo "$as_me:$LINENO: result: not used" >&5
17069echo "${ECHO_T}not used" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017070else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000017071 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000017072
17073cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017074#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017075_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017076
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000017077
17078 # wchar_t is only usable if it maps to an unsigned type
17079 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
17080 -a "$ac_cv_wchar_t_signed" == "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017081 then
17082 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017083
Martin v. Löwis11437992002-04-12 09:54:03 +000017084cat >>confdefs.h <<\_ACEOF
17085#define HAVE_USABLE_WCHAR_T 1
17086_ACEOF
17087
17088 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017089#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000017090_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017091
17092 elif test "$ac_cv_sizeof_short" = "$unicode_size"
17093 then
17094 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000017095 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017096#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000017097_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017098
17099 elif test "$ac_cv_sizeof_long" = "$unicode_size"
17100 then
17101 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000017102 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017103#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000017104_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017105
17106 else
17107 PY_UNICODE_TYPE="no type found"
17108 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017109 echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
17110echo "${ECHO_T}$PY_UNICODE_TYPE" >&6
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000017111fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000017112
17113# check for endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017114echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
17115echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
17116if test "${ac_cv_c_bigendian+set}" = set; then
17117 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000017118else
Martin v. Löwis11437992002-04-12 09:54:03 +000017119 # See if sys/param.h defines the BYTE_ORDER macro.
17120cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017121#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017122/* confdefs.h. */
17123_ACEOF
17124cat confdefs.h >>conftest.$ac_ext
17125cat >>conftest.$ac_ext <<_ACEOF
17126/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017127#include <sys/types.h>
17128#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017129
Martin v. Löwis11437992002-04-12 09:54:03 +000017130int
17131main ()
17132{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017133#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
17134 bogus endian macros
17135#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017136
17137 ;
17138 return 0;
17139}
17140_ACEOF
17141rm -f conftest.$ac_objext
17142if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017143 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017144 ac_status=$?
17145 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17146 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017147 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017148 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17149 (eval $ac_try) 2>&5
17150 ac_status=$?
17151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17152 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017153 # It does; now see whether it defined to BIG_ENDIAN or not.
Martin v. Löwis11437992002-04-12 09:54:03 +000017154cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017155#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017156/* confdefs.h. */
17157_ACEOF
17158cat confdefs.h >>conftest.$ac_ext
17159cat >>conftest.$ac_ext <<_ACEOF
17160/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000017161#include <sys/types.h>
17162#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000017163
Martin v. Löwis11437992002-04-12 09:54:03 +000017164int
17165main ()
17166{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017167#if BYTE_ORDER != BIG_ENDIAN
17168 not big endian
17169#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017170
17171 ;
17172 return 0;
17173}
17174_ACEOF
17175rm -f conftest.$ac_objext
17176if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017177 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017178 ac_status=$?
17179 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17180 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017181 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017182 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17183 (eval $ac_try) 2>&5
17184 ac_status=$?
17185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17186 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017187 ac_cv_c_bigendian=yes
17188else
Martin v. Löwis11437992002-04-12 09:54:03 +000017189 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017190sed 's/^/| /' conftest.$ac_ext >&5
17191
Martin v. Löwis11437992002-04-12 09:54:03 +000017192ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000017193fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017194rm -f conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000017195else
Martin v. Löwis11437992002-04-12 09:54:03 +000017196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017197sed 's/^/| /' conftest.$ac_ext >&5
17198
Martin v. Löwis11437992002-04-12 09:54:03 +000017199# It does not; compile a test program.
Guido van Rossumef2255b2000-03-10 22:30:29 +000017200if test "$cross_compiling" = yes; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017201 # try to guess the endianness by grepping values into an object file
Martin v. Löwis11437992002-04-12 09:54:03 +000017202 ac_cv_c_bigendian=unknown
17203 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017204#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017205/* confdefs.h. */
17206_ACEOF
17207cat confdefs.h >>conftest.$ac_ext
17208cat >>conftest.$ac_ext <<_ACEOF
17209/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017210short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
17211short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
17212void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
17213short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
17214short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
17215void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017216int
17217main ()
17218{
17219 _ascii (); _ebcdic ();
17220 ;
17221 return 0;
17222}
17223_ACEOF
17224rm -f conftest.$ac_objext
17225if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017226 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017227 ac_status=$?
17228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17229 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017230 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017231 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17232 (eval $ac_try) 2>&5
17233 ac_status=$?
17234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17235 (exit $ac_status); }; }; then
Skip Montanaro6dead952003-09-25 14:50:04 +000017236 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017237 ac_cv_c_bigendian=yes
17238fi
Skip Montanaro6dead952003-09-25 14:50:04 +000017239if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017240 if test "$ac_cv_c_bigendian" = unknown; then
17241 ac_cv_c_bigendian=no
17242 else
17243 # finding both strings is unlikely to happen, but who knows?
17244 ac_cv_c_bigendian=unknown
17245 fi
17246fi
17247else
17248 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017249sed 's/^/| /' conftest.$ac_ext >&5
17250
Martin v. Löwis11437992002-04-12 09:54:03 +000017251fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017252rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017253else
17254 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017255#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017256/* confdefs.h. */
17257_ACEOF
17258cat confdefs.h >>conftest.$ac_ext
17259cat >>conftest.$ac_ext <<_ACEOF
17260/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017261int
17262main ()
17263{
Guido van Rossumef2255b2000-03-10 22:30:29 +000017264 /* Are we little or big endian? From Harbison&Steele. */
17265 union
17266 {
17267 long l;
17268 char c[sizeof (long)];
17269 } u;
17270 u.l = 1;
17271 exit (u.c[sizeof (long) - 1] == 1);
17272}
Martin v. Löwis11437992002-04-12 09:54:03 +000017273_ACEOF
17274rm -f conftest$ac_exeext
17275if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17276 (eval $ac_link) 2>&5
17277 ac_status=$?
17278 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17279 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17280 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17281 (eval $ac_try) 2>&5
17282 ac_status=$?
17283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17284 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000017285 ac_cv_c_bigendian=no
17286else
Martin v. Löwis11437992002-04-12 09:54:03 +000017287 echo "$as_me: program exited with status $ac_status" >&5
17288echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017289sed 's/^/| /' conftest.$ac_ext >&5
17290
Martin v. Löwis11437992002-04-12 09:54:03 +000017291( exit $ac_status )
17292ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000017293fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017294rm -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 +000017295fi
Martin v. Löwis11437992002-04-12 09:54:03 +000017296fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017297rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017298fi
17299echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
17300echo "${ECHO_T}$ac_cv_c_bigendian" >&6
17301case $ac_cv_c_bigendian in
17302 yes)
Jack Jansendd19cf82001-12-06 22:36:17 +000017303
Martin v. Löwis11437992002-04-12 09:54:03 +000017304cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000017305#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017306_ACEOF
17307 ;;
17308 no)
17309 ;;
17310 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000017311 { { echo "$as_me:$LINENO: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017312presetting ac_cv_c_bigendian=no (or yes) will help" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017313echo "$as_me: error: unknown endianness
Martin v. Löwis11437992002-04-12 09:54:03 +000017314presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
17315 { (exit 1); exit 1; }; } ;;
17316esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000017317
Michael W. Hudson54241132001-12-07 15:38:26 +000017318
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017319# Check whether right shifting a negative integer extends the sign bit
17320# or fills with zeros (like the Cray J90, according to Tim Peters).
Martin v. Löwis11437992002-04-12 09:54:03 +000017321echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
17322echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6
17323if test "${ac_cv_rshift_extends_sign+set}" = set; then
17324 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017325else
Martin v. Löwis11437992002-04-12 09:54:03 +000017326
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017327if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017328 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017329else
Martin v. Löwis11437992002-04-12 09:54:03 +000017330 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017331#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017332/* confdefs.h. */
17333_ACEOF
17334cat confdefs.h >>conftest.$ac_ext
17335cat >>conftest.$ac_ext <<_ACEOF
17336/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017337
17338int main()
17339{
Vladimir Marangozova6180282000-07-12 05:05:06 +000017340 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017341}
17342
Martin v. Löwis11437992002-04-12 09:54:03 +000017343_ACEOF
17344rm -f conftest$ac_exeext
17345if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17346 (eval $ac_link) 2>&5
17347 ac_status=$?
17348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17349 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17350 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17351 (eval $ac_try) 2>&5
17352 ac_status=$?
17353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17354 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000017355 ac_cv_rshift_extends_sign=yes
17356else
Martin v. Löwis11437992002-04-12 09:54:03 +000017357 echo "$as_me: program exited with status $ac_status" >&5
17358echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017359sed 's/^/| /' conftest.$ac_ext >&5
17360
Martin v. Löwis11437992002-04-12 09:54:03 +000017361( exit $ac_status )
17362ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000017363fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017364rm -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 +000017365fi
Vladimir Marangozova6180282000-07-12 05:05:06 +000017366fi
17367
Martin v. Löwis11437992002-04-12 09:54:03 +000017368echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
17369echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000017370if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017371then
Martin v. Löwis11437992002-04-12 09:54:03 +000017372
17373cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017374#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017375_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017376
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017377fi
17378
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017379# check for getc_unlocked and related locking functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017380echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
17381echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6
17382if test "${ac_cv_have_getc_unlocked+set}" = set; then
17383 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017384else
Martin v. Löwis11437992002-04-12 09:54:03 +000017385
17386cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017387#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017388/* confdefs.h. */
17389_ACEOF
17390cat confdefs.h >>conftest.$ac_ext
17391cat >>conftest.$ac_ext <<_ACEOF
17392/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017393#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017394int
17395main ()
17396{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017397
17398 FILE *f = fopen("/dev/null", "r");
17399 flockfile(f);
17400 getc_unlocked(f);
17401 funlockfile(f);
17402
Martin v. Löwis11437992002-04-12 09:54:03 +000017403 ;
17404 return 0;
17405}
17406_ACEOF
17407rm -f conftest.$ac_objext conftest$ac_exeext
17408if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017409 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017410 ac_status=$?
17411 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17412 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017413 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017414 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17415 (eval $ac_try) 2>&5
17416 ac_status=$?
17417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17418 (exit $ac_status); }; }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017419 ac_cv_have_getc_unlocked=yes
17420else
Martin v. Löwis11437992002-04-12 09:54:03 +000017421 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017422sed 's/^/| /' conftest.$ac_ext >&5
17423
Martin v. Löwis11437992002-04-12 09:54:03 +000017424ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017425fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017426rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017427fi
17428
Martin v. Löwis11437992002-04-12 09:54:03 +000017429echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
17430echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017431if test "$ac_cv_have_getc_unlocked" = yes
17432then
Martin v. Löwis11437992002-04-12 09:54:03 +000017433
17434cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017435#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017436_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000017437
17438fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000017439
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017440# check for readline 2.1
17441echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
17442echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6
17443if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
17444 echo $ECHO_N "(cached) $ECHO_C" >&6
17445else
17446 ac_check_lib_save_LIBS=$LIBS
17447LIBS="-lreadline -ltermcap $LIBS"
17448cat >conftest.$ac_ext <<_ACEOF
17449#line $LINENO "configure"
17450/* confdefs.h. */
17451_ACEOF
17452cat confdefs.h >>conftest.$ac_ext
17453cat >>conftest.$ac_ext <<_ACEOF
17454/* end confdefs.h. */
17455
17456/* Override any gcc2 internal prototype to avoid an error. */
17457#ifdef __cplusplus
17458extern "C"
17459#endif
17460/* We use char because int might match the return type of a gcc2
17461 builtin and then its argument prototype would still apply. */
17462char rl_callback_handler_install ();
17463int
17464main ()
17465{
17466rl_callback_handler_install ();
17467 ;
17468 return 0;
17469}
17470_ACEOF
17471rm -f conftest.$ac_objext conftest$ac_exeext
17472if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17473 (eval $ac_link) 2>&5
17474 ac_status=$?
17475 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17476 (exit $ac_status); } &&
17477 { ac_try='test -s conftest$ac_exeext'
17478 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17479 (eval $ac_try) 2>&5
17480 ac_status=$?
17481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17482 (exit $ac_status); }; }; then
17483 ac_cv_lib_readline_rl_callback_handler_install=yes
17484else
17485 echo "$as_me: failed program was:" >&5
17486sed 's/^/| /' conftest.$ac_ext >&5
17487
17488ac_cv_lib_readline_rl_callback_handler_install=no
17489fi
17490rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17491LIBS=$ac_check_lib_save_LIBS
17492fi
17493echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
17494echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6
17495if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
17496
17497cat >>confdefs.h <<\_ACEOF
17498#define HAVE_RL_CALLBACK 1
17499_ACEOF
17500
17501fi
17502
17503
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017504# check for readline 2.2
17505cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017506#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017507/* confdefs.h. */
17508_ACEOF
17509cat confdefs.h >>conftest.$ac_ext
17510cat >>conftest.$ac_ext <<_ACEOF
17511/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017512#include <readline/readline.h>
17513_ACEOF
17514if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17515 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17516 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000017517 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017518 rm -f conftest.er1
17519 cat conftest.err >&5
17520 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17521 (exit $ac_status); } >/dev/null; then
17522 if test -s conftest.err; then
17523 ac_cpp_err=$ac_c_preproc_warn_flag
17524 else
17525 ac_cpp_err=
17526 fi
17527else
17528 ac_cpp_err=yes
17529fi
17530if test -z "$ac_cpp_err"; then
17531 have_readline=yes
17532else
17533 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017534sed 's/^/| /' conftest.$ac_ext >&5
17535
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017536 have_readline=no
17537fi
17538rm -f conftest.err conftest.$ac_ext
17539if test $have_readline = yes
17540then
17541 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017542#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017543/* confdefs.h. */
17544_ACEOF
17545cat confdefs.h >>conftest.$ac_ext
17546cat >>conftest.$ac_ext <<_ACEOF
17547/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017548#include <readline/readline.h>
17549
17550_ACEOF
17551if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017552 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000017553
17554cat >>confdefs.h <<\_ACEOF
17555#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
17556_ACEOF
17557
17558fi
17559rm -f conftest*
17560
17561fi
17562
Martin v. Löwis0daad592001-09-30 21:09:59 +000017563# check for readline 4.0
Martin v. Löwis11437992002-04-12 09:54:03 +000017564echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
17565echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6
17566if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
17567 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000017568else
Martin v. Löwis11437992002-04-12 09:54:03 +000017569 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum353ae582001-07-10 16:45:32 +000017570LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017571cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017572#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017573/* confdefs.h. */
17574_ACEOF
17575cat confdefs.h >>conftest.$ac_ext
17576cat >>conftest.$ac_ext <<_ACEOF
17577/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017578
Guido van Rossum353ae582001-07-10 16:45:32 +000017579/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017580#ifdef __cplusplus
17581extern "C"
17582#endif
Guido van Rossum353ae582001-07-10 16:45:32 +000017583/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017584 builtin and then its argument prototype would still apply. */
17585char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017586int
17587main ()
17588{
17589rl_pre_input_hook ();
17590 ;
17591 return 0;
17592}
17593_ACEOF
17594rm -f conftest.$ac_objext conftest$ac_exeext
17595if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017596 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017597 ac_status=$?
17598 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17599 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017600 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017601 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17602 (eval $ac_try) 2>&5
17603 ac_status=$?
17604 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17605 (exit $ac_status); }; }; then
17606 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000017607else
Martin v. Löwis11437992002-04-12 09:54:03 +000017608 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017609sed 's/^/| /' conftest.$ac_ext >&5
17610
Martin v. Löwis11437992002-04-12 09:54:03 +000017611ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000017612fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017613rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017614LIBS=$ac_check_lib_save_LIBS
17615fi
17616echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
17617echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6
17618if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017619
Martin v. Löwis11437992002-04-12 09:54:03 +000017620cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017621#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017622_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000017623
Martin v. Löwis0daad592001-09-30 21:09:59 +000017624fi
17625
Michael W. Hudson54241132001-12-07 15:38:26 +000017626
Martin v. Löwis0daad592001-09-30 21:09:59 +000017627# check for readline 4.2
Martin v. Löwis11437992002-04-12 09:54:03 +000017628echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
17629echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6
17630if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
17631 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000017632else
Martin v. Löwis11437992002-04-12 09:54:03 +000017633 ac_check_lib_save_LIBS=$LIBS
Martin v. Löwis0daad592001-09-30 21:09:59 +000017634LIBS="-lreadline -ltermcap $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017635cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017636#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017637/* confdefs.h. */
17638_ACEOF
17639cat confdefs.h >>conftest.$ac_ext
17640cat >>conftest.$ac_ext <<_ACEOF
17641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017642
Martin v. Löwis0daad592001-09-30 21:09:59 +000017643/* Override any gcc2 internal prototype to avoid an error. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017644#ifdef __cplusplus
17645extern "C"
17646#endif
Martin v. Löwis0daad592001-09-30 21:09:59 +000017647/* We use char because int might match the return type of a gcc2
Martin v. Löwis11437992002-04-12 09:54:03 +000017648 builtin and then its argument prototype would still apply. */
17649char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017650int
17651main ()
17652{
17653rl_completion_matches ();
17654 ;
17655 return 0;
17656}
17657_ACEOF
17658rm -f conftest.$ac_objext conftest$ac_exeext
17659if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017660 (eval $ac_link) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017661 ac_status=$?
17662 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17663 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017664 { ac_try='test -s conftest$ac_exeext'
Martin v. Löwis11437992002-04-12 09:54:03 +000017665 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17666 (eval $ac_try) 2>&5
17667 ac_status=$?
17668 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17669 (exit $ac_status); }; }; then
17670 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000017671else
Martin v. Löwis11437992002-04-12 09:54:03 +000017672 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017673sed 's/^/| /' conftest.$ac_ext >&5
17674
Martin v. Löwis11437992002-04-12 09:54:03 +000017675ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000017676fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017677rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017678LIBS=$ac_check_lib_save_LIBS
17679fi
17680echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
17681echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6
17682if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000017683
Martin v. Löwis11437992002-04-12 09:54:03 +000017684cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017685#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017686_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000017687
Guido van Rossum353ae582001-07-10 16:45:32 +000017688fi
17689
Jack Jansendd19cf82001-12-06 22:36:17 +000017690
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017691# also in readline 4.2
17692cat >conftest.$ac_ext <<_ACEOF
17693#line $LINENO "configure"
17694/* confdefs.h. */
17695_ACEOF
17696cat confdefs.h >>conftest.$ac_ext
17697cat >>conftest.$ac_ext <<_ACEOF
17698/* end confdefs.h. */
17699#include <readline/readline.h>
17700_ACEOF
17701if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
17702 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17703 ac_status=$?
17704 grep -v '^ *+' conftest.er1 >conftest.err
17705 rm -f conftest.er1
17706 cat conftest.err >&5
17707 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17708 (exit $ac_status); } >/dev/null; then
17709 if test -s conftest.err; then
17710 ac_cpp_err=$ac_c_preproc_warn_flag
17711 else
17712 ac_cpp_err=
17713 fi
17714else
17715 ac_cpp_err=yes
17716fi
17717if test -z "$ac_cpp_err"; then
17718 have_readline=yes
17719else
17720 echo "$as_me: failed program was:" >&5
17721sed 's/^/| /' conftest.$ac_ext >&5
17722
17723 have_readline=no
17724fi
17725rm -f conftest.err conftest.$ac_ext
17726if test $have_readline = yes
17727then
17728 cat >conftest.$ac_ext <<_ACEOF
17729#line $LINENO "configure"
17730/* confdefs.h. */
17731_ACEOF
17732cat confdefs.h >>conftest.$ac_ext
17733cat >>conftest.$ac_ext <<_ACEOF
17734/* end confdefs.h. */
17735#include <readline/readline.h>
17736
17737_ACEOF
17738if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17739 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
17740
17741cat >>confdefs.h <<\_ACEOF
17742#define HAVE_RL_CATCH_SIGNAL 1
17743_ACEOF
17744
17745fi
17746rm -f conftest*
17747
17748fi
17749
Martin v. Löwis11437992002-04-12 09:54:03 +000017750echo "$as_me:$LINENO: checking for broken nice()" >&5
17751echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6
17752if test "${ac_cv_broken_nice+set}" = set; then
17753 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000017754else
Martin v. Löwis11437992002-04-12 09:54:03 +000017755
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017756if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000017757 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017758else
Martin v. Löwis11437992002-04-12 09:54:03 +000017759 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017760#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017761/* confdefs.h. */
17762_ACEOF
17763cat confdefs.h >>conftest.$ac_ext
17764cat >>conftest.$ac_ext <<_ACEOF
17765/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017766
17767int main()
17768{
17769 int val1 = nice(1);
17770 if (val1 != -1 && val1 == nice(2))
17771 exit(0);
17772 exit(1);
17773}
17774
Martin v. Löwis11437992002-04-12 09:54:03 +000017775_ACEOF
17776rm -f conftest$ac_exeext
17777if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17778 (eval $ac_link) 2>&5
17779 ac_status=$?
17780 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17781 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17782 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17783 (eval $ac_try) 2>&5
17784 ac_status=$?
17785 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17786 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017787 ac_cv_broken_nice=yes
17788else
Martin v. Löwis11437992002-04-12 09:54:03 +000017789 echo "$as_me: program exited with status $ac_status" >&5
17790echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017791sed 's/^/| /' conftest.$ac_ext >&5
17792
Martin v. Löwis11437992002-04-12 09:54:03 +000017793( exit $ac_status )
17794ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017795fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017796rm -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 +000017797fi
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017798fi
17799
Martin v. Löwis11437992002-04-12 09:54:03 +000017800echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
17801echo "${ECHO_T}$ac_cv_broken_nice" >&6
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017802if test "$ac_cv_broken_nice" = yes
17803then
Martin v. Löwis11437992002-04-12 09:54:03 +000017804
17805cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017806#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017807_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000017808
17809fi
17810
Nicholas Bastine62c5c82004-03-21 23:45:42 +000017811echo "$as_me:$LINENO: checking for broken poll()" >&5
17812echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6
17813if test "$cross_compiling" = yes; then
17814 ac_cv_broken_poll=no
17815else
17816 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017817#line $LINENO "configure"
Nicholas Bastine62c5c82004-03-21 23:45:42 +000017818/* confdefs.h. */
17819_ACEOF
17820cat confdefs.h >>conftest.$ac_ext
17821cat >>conftest.$ac_ext <<_ACEOF
17822/* end confdefs.h. */
17823
17824#include <poll.h>
17825
17826int main (void)
17827 {
17828 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
17829
17830 close (42);
17831
17832 int poll_test = poll (&poll_struct, 1, 0);
17833
17834 if (poll_test < 0)
17835 {
17836 exit(0);
17837 }
17838 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
17839 {
17840 exit(0);
17841 }
17842 else
17843 {
17844 exit(1);
17845 }
17846 }
17847
17848_ACEOF
17849rm -f conftest$ac_exeext
17850if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17851 (eval $ac_link) 2>&5
17852 ac_status=$?
17853 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17854 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17855 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17856 (eval $ac_try) 2>&5
17857 ac_status=$?
17858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17859 (exit $ac_status); }; }; then
17860 ac_cv_broken_poll=yes
17861else
17862 echo "$as_me: program exited with status $ac_status" >&5
17863echo "$as_me: failed program was:" >&5
17864sed 's/^/| /' conftest.$ac_ext >&5
17865
17866( exit $ac_status )
17867ac_cv_broken_poll=no
17868fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017869rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Nicholas Bastine62c5c82004-03-21 23:45:42 +000017870fi
17871echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
17872echo "${ECHO_T}$ac_cv_broken_poll" >&6
17873if test "$ac_cv_broken_poll" = yes
17874then
17875
17876cat >>confdefs.h <<\_ACEOF
17877#define HAVE_BROKEN_POLL 1
17878_ACEOF
17879
17880fi
17881
17882
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017883# tzset(3) exists and works like we expect it to
17884echo "$as_me:$LINENO: checking for working tzset()" >&5
17885echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6
17886if test "${ac_cv_working_tzset+set}" = set; then
17887 echo $ECHO_N "(cached) $ECHO_C" >&6
17888else
17889
17890if test "$cross_compiling" = yes; then
17891 ac_cv_working_tzset=no
17892else
17893 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017894#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017895/* confdefs.h. */
17896_ACEOF
17897cat confdefs.h >>conftest.$ac_ext
17898cat >>conftest.$ac_ext <<_ACEOF
17899/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017900
17901#include <stdlib.h>
17902#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000017903#include <string.h>
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017904int main()
17905{
Brett Cannon18367812003-09-19 00:59:16 +000017906 /* Note that we need to ensure that not only does tzset(3)
17907 do 'something' with localtime, but it works as documented
17908 in the library reference and as expected by the test suite.
17909
17910 Red Hat 6.2 doesn't understand the southern hemisphere
17911 after New Year's Day; it thinks swaps on that day.
17912 */
17913
17914 time_t groundhogday = 1044144000; /* GMT-based; well, it's a colony */
17915 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
17916
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017917 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017918 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017919 if (localtime(&groundhogday)->tm_hour != 0)
17920 exit(1);
17921
Neal Norwitz7f2588c2003-04-11 15:35:53 +000017922 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017923 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000017924 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017925 exit(1);
Brett Cannon18367812003-09-19 00:59:16 +000017926
17927 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
17928 tzset();
17929 if (localtime(&groundhogday)->tm_hour != 11)
17930 exit(1);
17931 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
17932 exit(1);
17933 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
17934 exit(1);
17935
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017936 exit(0);
17937}
17938
17939_ACEOF
17940rm -f conftest$ac_exeext
17941if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
17942 (eval $ac_link) 2>&5
17943 ac_status=$?
17944 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17945 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17946 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
17947 (eval $ac_try) 2>&5
17948 ac_status=$?
17949 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17950 (exit $ac_status); }; }; then
17951 ac_cv_working_tzset=yes
17952else
17953 echo "$as_me: program exited with status $ac_status" >&5
17954echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017955sed 's/^/| /' conftest.$ac_ext >&5
17956
Guido van Rossumd11b62e2003-03-14 21:51:36 +000017957( exit $ac_status )
17958ac_cv_working_tzset=no
17959fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017960rm -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 +000017961fi
17962fi
17963
17964echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
17965echo "${ECHO_T}$ac_cv_working_tzset" >&6
17966if test "$ac_cv_working_tzset" = yes
17967then
17968
17969cat >>confdefs.h <<\_ACEOF
17970#define HAVE_WORKING_TZSET 1
17971_ACEOF
17972
17973fi
17974
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017975# Look for subsecond timestamps in struct stat
17976echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
17977echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6
17978if test "${ac_cv_stat_tv_nsec+set}" = set; then
17979 echo $ECHO_N "(cached) $ECHO_C" >&6
17980else
17981 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000017982#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000017983/* confdefs.h. */
17984_ACEOF
17985cat confdefs.h >>conftest.$ac_ext
17986cat >>conftest.$ac_ext <<_ACEOF
17987/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017988#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000017989int
17990main ()
17991{
17992
17993struct stat st;
17994st.st_mtim.tv_nsec = 1;
17995
17996 ;
17997 return 0;
17998}
17999_ACEOF
18000rm -f conftest.$ac_objext
18001if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018002 (eval $ac_compile) 2>&5
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018003 ac_status=$?
18004 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18005 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018006 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018007 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18008 (eval $ac_try) 2>&5
18009 ac_status=$?
18010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18011 (exit $ac_status); }; }; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000018012 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018013else
18014 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018015sed 's/^/| /' conftest.$ac_ext >&5
18016
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018017ac_cv_stat_tv_nsec=no
18018fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018019rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis94717ed2002-09-09 14:24:16 +000018020fi
18021
18022echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
18023echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6
18024if test "$ac_cv_stat_tv_nsec" = yes
18025then
18026
18027cat >>confdefs.h <<\_ACEOF
18028#define HAVE_STAT_TV_NSEC 1
18029_ACEOF
18030
18031fi
18032
Jack Jansen666b1e72001-10-31 12:11:48 +000018033# On HP/UX 11.0, mvwdelch is a block with a return statement
Martin v. Löwis11437992002-04-12 09:54:03 +000018034echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
18035echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6
18036if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
18037 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018038else
Martin v. Löwis11437992002-04-12 09:54:03 +000018039 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018040#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018041/* confdefs.h. */
18042_ACEOF
18043cat confdefs.h >>conftest.$ac_ext
18044cat >>conftest.$ac_ext <<_ACEOF
18045/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018046#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018047int
18048main ()
18049{
Jack Jansen666b1e72001-10-31 12:11:48 +000018050
18051 int rtn;
18052 rtn = mvwdelch(0,0,0);
18053
Martin v. Löwis11437992002-04-12 09:54:03 +000018054 ;
18055 return 0;
18056}
18057_ACEOF
18058rm -f conftest.$ac_objext
18059if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018060 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018061 ac_status=$?
18062 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18063 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018064 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018065 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18066 (eval $ac_try) 2>&5
18067 ac_status=$?
18068 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18069 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000018070 ac_cv_mvwdelch_is_expression=yes
18071else
Martin v. Löwis11437992002-04-12 09:54:03 +000018072 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018073sed 's/^/| /' conftest.$ac_ext >&5
18074
Martin v. Löwis11437992002-04-12 09:54:03 +000018075ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018076fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018077rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000018078fi
18079
Martin v. Löwis11437992002-04-12 09:54:03 +000018080echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
18081echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018082
18083if test "$ac_cv_mvwdelch_is_expression" = yes
18084then
Martin v. Löwis11437992002-04-12 09:54:03 +000018085
18086cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018087#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018088_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018089
18090fi
18091
Martin v. Löwis11437992002-04-12 09:54:03 +000018092echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
18093echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6
18094if test "${ac_cv_window_has_flags+set}" = set; then
18095 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000018096else
Martin v. Löwis11437992002-04-12 09:54:03 +000018097 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018098#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018099/* confdefs.h. */
18100_ACEOF
18101cat confdefs.h >>conftest.$ac_ext
18102cat >>conftest.$ac_ext <<_ACEOF
18103/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000018104#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018105int
18106main ()
18107{
Jack Jansen666b1e72001-10-31 12:11:48 +000018108
18109 WINDOW *w;
18110 w->_flags = 0;
18111
Martin v. Löwis11437992002-04-12 09:54:03 +000018112 ;
18113 return 0;
18114}
18115_ACEOF
18116rm -f conftest.$ac_objext
18117if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018118 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018119 ac_status=$?
18120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18121 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018122 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018123 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18124 (eval $ac_try) 2>&5
18125 ac_status=$?
18126 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18127 (exit $ac_status); }; }; then
Jack Jansen666b1e72001-10-31 12:11:48 +000018128 ac_cv_window_has_flags=yes
18129else
Martin v. Löwis11437992002-04-12 09:54:03 +000018130 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018131sed 's/^/| /' conftest.$ac_ext >&5
18132
Martin v. Löwis11437992002-04-12 09:54:03 +000018133ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000018134fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018135rm -f conftest.$ac_objext conftest.$ac_ext
Jack Jansen666b1e72001-10-31 12:11:48 +000018136fi
18137
Martin v. Löwis11437992002-04-12 09:54:03 +000018138echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
18139echo "${ECHO_T}$ac_cv_window_has_flags" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000018140
Jack Jansen666b1e72001-10-31 12:11:48 +000018141
18142if test "$ac_cv_window_has_flags" = yes
18143then
Martin v. Löwis11437992002-04-12 09:54:03 +000018144
18145cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018146#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018147_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000018148
18149fi
18150
Martin v. Löwis24a880b2002-12-31 12:55:15 +000018151echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
18152echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6
18153
18154if test -e /dev/ptmx
18155then
18156 echo "$as_me:$LINENO: result: yes" >&5
18157echo "${ECHO_T}yes" >&6
18158
18159cat >>confdefs.h <<\_ACEOF
18160#define HAVE_DEV_PTMX 1
18161_ACEOF
18162
18163else
18164 echo "$as_me:$LINENO: result: no" >&5
18165echo "${ECHO_T}no" >&6
18166fi
18167
Neal Norwitz865400f2003-03-21 01:42:58 +000018168echo "$as_me:$LINENO: checking for /dev/ptc" >&5
18169echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6
18170
18171if test -e /dev/ptc
18172then
18173 echo "$as_me:$LINENO: result: yes" >&5
18174echo "${ECHO_T}yes" >&6
18175
18176cat >>confdefs.h <<\_ACEOF
18177#define HAVE_DEV_PTC 1
18178_ACEOF
18179
18180else
18181 echo "$as_me:$LINENO: result: no" >&5
18182echo "${ECHO_T}no" >&6
18183fi
18184
Martin v. Löwis11437992002-04-12 09:54:03 +000018185echo "$as_me:$LINENO: checking for socklen_t" >&5
18186echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
18187if test "${ac_cv_type_socklen_t+set}" = set; then
18188 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000018189else
Martin v. Löwis11437992002-04-12 09:54:03 +000018190 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018191#line $LINENO "configure"
Skip Montanaro6dead952003-09-25 14:50:04 +000018192/* confdefs.h. */
18193_ACEOF
18194cat confdefs.h >>conftest.$ac_ext
18195cat >>conftest.$ac_ext <<_ACEOF
18196/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000018197
18198#ifdef HAVE_SYS_TYPES_H
18199#include <sys/types.h>
18200#endif
18201#ifdef HAVE_SYS_SOCKET_H
18202#include <sys/socket.h>
18203#endif
18204
18205
Martin v. Löwis11437992002-04-12 09:54:03 +000018206int
18207main ()
18208{
18209if ((socklen_t *) 0)
18210 return 0;
18211if (sizeof (socklen_t))
18212 return 0;
18213 ;
18214 return 0;
18215}
18216_ACEOF
18217rm -f conftest.$ac_objext
18218if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018219 (eval $ac_compile) 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000018220 ac_status=$?
18221 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18222 (exit $ac_status); } &&
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018223 { ac_try='test -s conftest.$ac_objext'
Martin v. Löwis11437992002-04-12 09:54:03 +000018224 { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
18225 (eval $ac_try) 2>&5
18226 ac_status=$?
18227 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18228 (exit $ac_status); }; }; then
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000018229 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000018230else
Martin v. Löwis11437992002-04-12 09:54:03 +000018231 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018232sed 's/^/| /' conftest.$ac_ext >&5
18233
Martin v. Löwis11437992002-04-12 09:54:03 +000018234ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000018235fi
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018236rm -f conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018237fi
18238echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
18239echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
18240if test $ac_cv_type_socklen_t = yes; then
18241 :
18242else
Guido van Rossum95713eb2000-05-18 20:53:31 +000018243
Martin v. Löwis01c04012002-11-11 14:58:44 +000018244cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018245#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000018246_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000018247
18248fi
18249
Michael W. Hudson54241132001-12-07 15:38:26 +000018250
Michael W. Hudson54241132001-12-07 15:38:26 +000018251
18252
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000018253for h in `(cd $srcdir;echo Python/thread_*.h)`
18254do
18255 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
18256done
18257
Michael W. Hudson54241132001-12-07 15:38:26 +000018258
Jack Jansen0b06be72002-06-21 14:48:38 +000018259SRCDIRS="Parser Grammar Objects Python Modules Mac Mac/Python"
Martin v. Löwis11437992002-04-12 09:54:03 +000018260echo "$as_me:$LINENO: checking for build directories" >&5
18261echo $ECHO_N "checking for build directories... $ECHO_C" >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018262for dir in $SRCDIRS; do
18263 if test ! -d $dir; then
18264 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000018265 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000018266done
Martin v. Löwis11437992002-04-12 09:54:03 +000018267echo "$as_me:$LINENO: result: done" >&5
18268echo "${ECHO_T}done" >&6
Fred Drake036144d2000-10-26 17:09:35 +000018269
Guido van Rossum627b2d71993-12-24 10:39:16 +000018270# generate output files
Skip Montanaro6dead952003-09-25 14:50:04 +000018271 ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000018272
Martin v. Löwis11437992002-04-12 09:54:03 +000018273cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018274# This file is a shell script that caches the results of configure
18275# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000018276# scripts and configure runs, see configure's option --config-cache.
18277# It is not useful on other systems. If it contains results you don't
18278# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018279#
Martin v. Löwis11437992002-04-12 09:54:03 +000018280# config.status only pays attention to the cache file if you give it
18281# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018282#
Skip Montanaro6dead952003-09-25 14:50:04 +000018283# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000018284# loading this file, other *unset* `ac_cv_foo' will be assigned the
18285# following values.
18286
18287_ACEOF
18288
Guido van Rossumf78abae1997-01-21 22:02:36 +000018289# The following way of writing the cache mishandles newlines in values,
18290# but we know of no workaround that is simple, portable, and efficient.
18291# So, don't put newlines in cache variables' values.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018292# Ultrix sh set writes to stderr and can't be redirected directly,
18293# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwis11437992002-04-12 09:54:03 +000018294{
18295 (set) 2>&1 |
18296 case `(ac_space=' '; set | grep ac_space) 2>&1` in
18297 *ac_space=\ *)
18298 # `set' does not quote correctly, so add quotes (double-quote
18299 # substitution turns \\\\ into \\, and sed turns \\ into \).
18300 sed -n \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018301 "s/'/'\\\\''/g;
18302 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000018303 ;;
18304 *)
18305 # `set' quotes correctly as required by POSIX, so do not add quotes.
18306 sed -n \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018307 "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000018308 ;;
18309 esac;
18310} |
18311 sed '
18312 t clear
18313 : clear
18314 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18315 t end
18316 /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18317 : end' >>confcache
Skip Montanaro6dead952003-09-25 14:50:04 +000018318if diff $cache_file confcache >/dev/null 2>&1; then :; else
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018319 if test -w $cache_file; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018320 test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18321 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018322 else
18323 echo "not updating unwritable cache $cache_file"
18324 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018325fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018326rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000018327
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018328test "x$prefix" = xNONE && prefix=$ac_default_prefix
18329# Let make expand exec_prefix.
18330test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000018331
Martin v. Löwis11437992002-04-12 09:54:03 +000018332# VPATH may cause trouble with some makes, so we remove $(srcdir),
18333# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18334# trailing colons and then remove the whole line if VPATH becomes empty
18335# (actually we leave an empty line to preserve line numbers).
Guido van Rossum7f43da71994-08-01 12:15:30 +000018336if test "x$srcdir" = x.; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018337 ac_vpsub='/^[ ]*VPATH[ ]*=/{
Martin v. Löwis11437992002-04-12 09:54:03 +000018338s/:*\$(srcdir):*/:/;
18339s/:*\${srcdir}:*/:/;
18340s/:*@srcdir@:*/:/;
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018341s/^\([^=]*=[ ]*\):*/\1/;
Martin v. Löwis11437992002-04-12 09:54:03 +000018342s/:*$//;
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018343s/^[^=]*=[ ]*$//;
Martin v. Löwis11437992002-04-12 09:54:03 +000018344}'
Guido van Rossum7f43da71994-08-01 12:15:30 +000018345fi
18346
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018347DEFS=-DHAVE_CONFIG_H
18348
Skip Montanaro6dead952003-09-25 14:50:04 +000018349ac_libobjs=
18350ac_ltlibobjs=
18351for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18352 # 1. Remove the extension, and $U if already installed.
18353 ac_i=`echo "$ac_i" |
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018354 sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018355 # 2. Add them.
18356 ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
18357 ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
18358done
18359LIBOBJS=$ac_libobjs
18360
18361LTLIBOBJS=$ac_ltlibobjs
18362
18363
Martin v. Löwis11437992002-04-12 09:54:03 +000018364
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018365: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000018366ac_clean_files_save=$ac_clean_files
18367ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18368{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
18369echo "$as_me: creating $CONFIG_STATUS" >&6;}
18370cat >$CONFIG_STATUS <<_ACEOF
18371#! $SHELL
18372# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018373# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018374# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000018375# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000018376
Martin v. Löwis11437992002-04-12 09:54:03 +000018377debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000018378ac_cs_recheck=false
18379ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000018380SHELL=\${CONFIG_SHELL-$SHELL}
18381_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000018382
Martin v. Löwis11437992002-04-12 09:54:03 +000018383cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000018384## --------------------- ##
18385## M4sh Initialization. ##
18386## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000018387
Martin v. Löwis11437992002-04-12 09:54:03 +000018388# Be Bourne compatible
18389if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18390 emulate sh
18391 NULLCMD=:
Skip Montanaro6dead952003-09-25 14:50:04 +000018392 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
18393 # is contrary to our usage. Disable this feature.
18394 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwis11437992002-04-12 09:54:03 +000018395elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18396 set -o posix
Michael W. Hudson54241132001-12-07 15:38:26 +000018397fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018398
Martin v. Löwis11437992002-04-12 09:54:03 +000018399# Support unset when possible.
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018400if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018401 as_unset=unset
18402else
18403 as_unset=false
18404fi
Michael W. Hudson54241132001-12-07 15:38:26 +000018405
Skip Montanaro6dead952003-09-25 14:50:04 +000018406
18407# Work around bugs in pre-3.0 UWIN ksh.
18408$as_unset ENV MAIL MAILPATH
18409PS1='$ '
18410PS2='> '
18411PS4='+ '
18412
18413# NLS nuisances.
18414for as_var in \
18415 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
18416 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
18417 LC_TELEPHONE LC_TIME
18418do
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018419 if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
Skip Montanaro6dead952003-09-25 14:50:04 +000018420 eval $as_var=C; export $as_var
18421 else
18422 $as_unset $as_var
18423 fi
18424done
18425
18426# Required to use basename.
18427if expr a : '\(a\)' >/dev/null 2>&1; then
18428 as_expr=expr
18429else
18430 as_expr=false
18431fi
18432
18433if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
18434 as_basename=basename
18435else
18436 as_basename=false
18437fi
Martin v. Löwis11437992002-04-12 09:54:03 +000018438
18439
18440# Name of the executable.
Skip Montanaro6dead952003-09-25 14:50:04 +000018441as_me=`$as_basename "$0" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000018442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18443 X"$0" : 'X\(//\)$' \| \
18444 X"$0" : 'X\(/\)$' \| \
18445 . : '\(.\)' 2>/dev/null ||
18446echo X/"$0" |
18447 sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
18448 /^X\/\(\/\/\)$/{ s//\1/; q; }
18449 /^X\/\(\/\).*/{ s//\1/; q; }
18450 s/.*/./; q'`
18451
Skip Montanaro6dead952003-09-25 14:50:04 +000018452
Martin v. Löwis11437992002-04-12 09:54:03 +000018453# PATH needs CR, and LINENO needs CR and PATH.
18454# Avoid depending upon Character Ranges.
18455as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18456as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18457as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18458as_cr_digits='0123456789'
18459as_cr_alnum=$as_cr_Letters$as_cr_digits
18460
18461# The user is always right.
18462if test "${PATH_SEPARATOR+set}" != set; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018463 echo "#! /bin/sh" >conf$$.sh
18464 echo "exit 0" >>conf$$.sh
18465 chmod +x conf$$.sh
18466 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018467 PATH_SEPARATOR=';'
18468 else
18469 PATH_SEPARATOR=:
18470 fi
Skip Montanaro6dead952003-09-25 14:50:04 +000018471 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018472fi
18473
18474
18475 as_lineno_1=$LINENO
18476 as_lineno_2=$LINENO
18477 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18478 test "x$as_lineno_1" != "x$as_lineno_2" &&
18479 test "x$as_lineno_3" = "x$as_lineno_2" || {
18480 # Find who we are. Look in the path if we contain no path at all
18481 # relative or not.
18482 case $0 in
18483 *[\\/]* ) as_myself=$0 ;;
18484 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18485for as_dir in $PATH
18486do
18487 IFS=$as_save_IFS
18488 test -z "$as_dir" && as_dir=.
18489 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18490done
18491
18492 ;;
18493 esac
18494 # We did not find ourselves, most probably we were run as `sh COMMAND'
18495 # in which case we are not to be found in the path.
18496 if test "x$as_myself" = x; then
18497 as_myself=$0
18498 fi
18499 if test ! -f "$as_myself"; then
18500 { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
18501echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
18502 { (exit 1); exit 1; }; }
18503 fi
18504 case $CONFIG_SHELL in
18505 '')
18506 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18507for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
18508do
18509 IFS=$as_save_IFS
18510 test -z "$as_dir" && as_dir=.
18511 for as_base in sh bash ksh sh5; do
18512 case $as_dir in
18513 /*)
18514 if ("$as_dir/$as_base" -c '
18515 as_lineno_1=$LINENO
18516 as_lineno_2=$LINENO
18517 as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
18518 test "x$as_lineno_1" != "x$as_lineno_2" &&
18519 test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
Skip Montanaro6dead952003-09-25 14:50:04 +000018520 $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
18521 $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018522 CONFIG_SHELL=$as_dir/$as_base
18523 export CONFIG_SHELL
18524 exec "$CONFIG_SHELL" "$0" ${1+"$@"}
18525 fi;;
18526 esac
18527 done
18528done
18529;;
Jack Jansendd19cf82001-12-06 22:36:17 +000018530 esac
18531
Martin v. Löwis11437992002-04-12 09:54:03 +000018532 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
18533 # uniformly replaced by the line number. The first 'sed' inserts a
18534 # line-number line before each line; the second 'sed' does the real
18535 # work. The second script uses 'N' to pair each line-number line
18536 # with the numbered line, and appends trailing '-' during
18537 # substitution so that $LINENO is not a special case at line end.
18538 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
18539 # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
18540 sed '=' <$as_myself |
18541 sed '
18542 N
18543 s,$,-,
18544 : loop
18545 s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
18546 t loop
18547 s,-$,,
18548 s,^['$as_cr_digits']*\n,,
18549 ' >$as_me.lineno &&
18550 chmod +x $as_me.lineno ||
18551 { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
18552echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
18553 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000018554
Martin v. Löwis11437992002-04-12 09:54:03 +000018555 # Don't try to exec as it changes $[0], causing all sort of problems
18556 # (the dirname of $[0] is not the place where we might find the
18557 # original and so on. Autoconf is especially sensible to this).
18558 . ./$as_me.lineno
18559 # Exit status is that of the last command.
18560 exit
18561}
18562
18563
18564case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
18565 *c*,-n*) ECHO_N= ECHO_C='
18566' ECHO_T=' ' ;;
18567 *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
18568 *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
18569esac
18570
18571if expr a : '\(a\)' >/dev/null 2>&1; then
18572 as_expr=expr
18573else
18574 as_expr=false
18575fi
18576
18577rm -f conf$$ conf$$.exe conf$$.file
18578echo >conf$$.file
18579if ln -s conf$$.file conf$$ 2>/dev/null; then
18580 # We could just check for DJGPP; but this test a) works b) is more generic
18581 # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18582 if test -f conf$$.exe; then
18583 # Don't use ln at all; we don't have any links
18584 as_ln_s='cp -p'
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018585 else
Martin v. Löwis11437992002-04-12 09:54:03 +000018586 as_ln_s='ln -s'
18587 fi
18588elif ln conf$$.file conf$$ 2>/dev/null; then
18589 as_ln_s=ln
18590else
18591 as_ln_s='cp -p'
18592fi
18593rm -f conf$$ conf$$.exe conf$$.file
18594
Skip Montanaro6dead952003-09-25 14:50:04 +000018595if mkdir -p . 2>/dev/null; then
18596 as_mkdir_p=:
18597else
18598 as_mkdir_p=false
18599fi
18600
Martin v. Löwis11437992002-04-12 09:54:03 +000018601as_executable_p="test -f"
18602
18603# Sed expression to map a string onto a valid CPP name.
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018604as_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 +000018605
18606# Sed expression to map a string onto a valid variable name.
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018607as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
Martin v. Löwis11437992002-04-12 09:54:03 +000018608
18609
18610# IFS
18611# We need space, tab and new line, in precisely that order.
18612as_nl='
18613'
18614IFS=" $as_nl"
18615
18616# CDPATH.
Skip Montanaro6dead952003-09-25 14:50:04 +000018617$as_unset CDPATH
Martin v. Löwis11437992002-04-12 09:54:03 +000018618
18619exec 6>&1
18620
18621# Open the log real soon, to keep \$[0] and so on meaningful, and to
18622# report actual input values of CONFIG_FILES etc. instead of their
18623# values after options handling. Logging --version etc. is OK.
18624exec 5>>config.log
18625{
18626 echo
18627 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18628## Running $as_me. ##
18629_ASBOX
18630} >&5
18631cat >&5 <<_CSEOF
18632
Fred Drake9bd44622003-07-30 17:39:48 +000018633This file was extended by python $as_me 2.4, which was
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018634generated by GNU Autoconf 2.57. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000018635
18636 CONFIG_FILES = $CONFIG_FILES
18637 CONFIG_HEADERS = $CONFIG_HEADERS
18638 CONFIG_LINKS = $CONFIG_LINKS
18639 CONFIG_COMMANDS = $CONFIG_COMMANDS
18640 $ $0 $@
18641
18642_CSEOF
18643echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
18644echo >&5
18645_ACEOF
18646
18647# Files that config.status was made for.
18648if test -n "$ac_config_files"; then
18649 echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18650fi
18651
18652if test -n "$ac_config_headers"; then
18653 echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18654fi
18655
18656if test -n "$ac_config_links"; then
18657 echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18658fi
18659
18660if test -n "$ac_config_commands"; then
18661 echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18662fi
18663
18664cat >>$CONFIG_STATUS <<\_ACEOF
18665
18666ac_cs_usage="\
18667\`$as_me' instantiates files from templates according to the
18668current configuration.
18669
18670Usage: $0 [OPTIONS] [FILE]...
18671
18672 -h, --help print this help, then exit
18673 -V, --version print version number, then exit
Skip Montanaro6dead952003-09-25 14:50:04 +000018674 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000018675 -d, --debug don't remove temporary files
18676 --recheck update $as_me by reconfiguring in the same conditions
18677 --file=FILE[:TEMPLATE]
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018678 instantiate the configuration file FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018679 --header=FILE[:TEMPLATE]
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018680 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000018681
18682Configuration files:
18683$config_files
18684
18685Configuration headers:
18686$config_headers
18687
18688Report bugs to <bug-autoconf@gnu.org>."
18689_ACEOF
18690
18691cat >>$CONFIG_STATUS <<_ACEOF
18692ac_cs_version="\\
Fred Drake9bd44622003-07-30 17:39:48 +000018693python config.status 2.4
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018694configured by $0, generated by GNU Autoconf 2.57,
Martin v. Löwis11437992002-04-12 09:54:03 +000018695 with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18696
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018697Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18698Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000018699This config.status script is free software; the Free Software Foundation
18700gives unlimited permission to copy, distribute and modify it."
18701srcdir=$srcdir
18702INSTALL="$INSTALL"
18703_ACEOF
18704
18705cat >>$CONFIG_STATUS <<\_ACEOF
18706# If no file are specified by the user, then we need to provide default
18707# value. By we need to know if files were specified by the user.
18708ac_need_defaults=:
18709while test $# != 0
18710do
18711 case $1 in
18712 --*=*)
18713 ac_option=`expr "x$1" : 'x\([^=]*\)='`
18714 ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000018715 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000018716 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018717 -*)
18718 ac_option=$1
18719 ac_optarg=$2
18720 ac_shift=shift
18721 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018722 *) # This is not an option, so the user has probably given explicit
18723 # arguments.
Skip Montanaro6dead952003-09-25 14:50:04 +000018724 ac_option=$1
Martin v. Löwis11437992002-04-12 09:54:03 +000018725 ac_need_defaults=false;;
18726 esac
18727
Skip Montanaro6dead952003-09-25 14:50:04 +000018728 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000018729 # Handling of the options.
18730_ACEOF
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000018731cat >>$CONFIG_STATUS <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018732 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18733 ac_cs_recheck=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018734 --version | --vers* | -V )
18735 echo "$ac_cs_version"; exit 0 ;;
18736 --he | --h)
18737 # Conflict between --help and --header
18738 { { echo "$as_me:$LINENO: error: ambiguous option: $1
18739Try \`$0 --help' for more information." >&5
18740echo "$as_me: error: ambiguous option: $1
18741Try \`$0 --help' for more information." >&2;}
18742 { (exit 1); exit 1; }; };;
18743 --help | --hel | -h )
18744 echo "$ac_cs_usage"; exit 0 ;;
18745 --debug | --d* | -d )
18746 debug=: ;;
18747 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000018748 $ac_shift
18749 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018750 ac_need_defaults=false;;
18751 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000018752 $ac_shift
18753 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000018754 ac_need_defaults=false;;
Skip Montanaro6dead952003-09-25 14:50:04 +000018755 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18756 | -silent | --silent | --silen | --sile | --sil | --si | --s)
18757 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000018758
18759 # This is an error.
18760 -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
18761Try \`$0 --help' for more information." >&5
18762echo "$as_me: error: unrecognized option: $1
18763Try \`$0 --help' for more information." >&2;}
18764 { (exit 1); exit 1; }; } ;;
18765
18766 *) ac_config_targets="$ac_config_targets $1" ;;
18767
18768 esac
18769 shift
18770done
18771
Skip Montanaro6dead952003-09-25 14:50:04 +000018772ac_configure_extra_args=
18773
18774if $ac_cs_silent; then
18775 exec 6>/dev/null
18776 ac_configure_extra_args="$ac_configure_extra_args --silent"
18777fi
18778
18779_ACEOF
18780cat >>$CONFIG_STATUS <<_ACEOF
18781if \$ac_cs_recheck; then
18782 echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
18783 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18784fi
18785
Martin v. Löwis11437992002-04-12 09:54:03 +000018786_ACEOF
18787
18788
18789
18790
18791
18792cat >>$CONFIG_STATUS <<\_ACEOF
18793for ac_config_target in $ac_config_targets
18794do
18795 case "$ac_config_target" in
18796 # Handling of arguments.
18797 "Makefile.pre" ) CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
18798 "Modules/Setup.config" ) CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
18799 "pyconfig.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
18800 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
18801echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18802 { (exit 1); exit 1; }; };;
18803 esac
18804done
18805
18806# If the user did not use the arguments to specify the items to instantiate,
18807# then the envvar interface is used. Set only those that are not.
18808# We use the long form for the default assignment because of an extremely
18809# bizarre bug on SunOS 4.1.3.
18810if $ac_need_defaults; then
18811 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18812 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18813fi
18814
Skip Montanaro6dead952003-09-25 14:50:04 +000018815# Have a temporary directory for convenience. Make it in the build tree
18816# simply because there is no reason to put it here, and in addition,
18817# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwis11437992002-04-12 09:54:03 +000018818# Create a temporary directory, and hook for its removal unless debugging.
18819$debug ||
18820{
18821 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18822 trap '{ (exit 1); exit 1; }' 1 2 13 15
18823}
18824
18825# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000018826
Martin v. Löwis11437992002-04-12 09:54:03 +000018827{
Skip Montanaro6dead952003-09-25 14:50:04 +000018828 tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000018829 test -n "$tmp" && test -d "$tmp"
18830} ||
18831{
Skip Montanaro6dead952003-09-25 14:50:04 +000018832 tmp=./confstat$$-$RANDOM
Martin v. Löwis11437992002-04-12 09:54:03 +000018833 (umask 077 && mkdir $tmp)
18834} ||
18835{
Skip Montanaro6dead952003-09-25 14:50:04 +000018836 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000018837 { (exit 1); exit 1; }
18838}
18839
18840_ACEOF
18841
18842cat >>$CONFIG_STATUS <<_ACEOF
18843
18844#
18845# CONFIG_FILES section.
18846#
18847
18848# No need to generate the scripts if there are no CONFIG_FILES.
18849# This happens for instance when ./config.status config.h
18850if test -n "\$CONFIG_FILES"; then
18851 # Protect against being on the right side of a sed subst in config.status.
18852 sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18853 s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18854s,@SHELL@,$SHELL,;t t
18855s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18856s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18857s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18858s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18859s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18860s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18861s,@exec_prefix@,$exec_prefix,;t t
18862s,@prefix@,$prefix,;t t
18863s,@program_transform_name@,$program_transform_name,;t t
18864s,@bindir@,$bindir,;t t
18865s,@sbindir@,$sbindir,;t t
18866s,@libexecdir@,$libexecdir,;t t
18867s,@datadir@,$datadir,;t t
18868s,@sysconfdir@,$sysconfdir,;t t
18869s,@sharedstatedir@,$sharedstatedir,;t t
18870s,@localstatedir@,$localstatedir,;t t
18871s,@libdir@,$libdir,;t t
18872s,@includedir@,$includedir,;t t
18873s,@oldincludedir@,$oldincludedir,;t t
18874s,@infodir@,$infodir,;t t
18875s,@mandir@,$mandir,;t t
18876s,@build_alias@,$build_alias,;t t
18877s,@host_alias@,$host_alias,;t t
18878s,@target_alias@,$target_alias,;t t
18879s,@DEFS@,$DEFS,;t t
18880s,@ECHO_C@,$ECHO_C,;t t
18881s,@ECHO_N@,$ECHO_N,;t t
18882s,@ECHO_T@,$ECHO_T,;t t
18883s,@LIBS@,$LIBS,;t t
18884s,@VERSION@,$VERSION,;t t
18885s,@SOVERSION@,$SOVERSION,;t t
18886s,@CONFIG_ARGS@,$CONFIG_ARGS,;t t
18887s,@PYTHONFRAMEWORK@,$PYTHONFRAMEWORK,;t t
18888s,@PYTHONFRAMEWORKDIR@,$PYTHONFRAMEWORKDIR,;t t
18889s,@PYTHONFRAMEWORKPREFIX@,$PYTHONFRAMEWORKPREFIX,;t t
18890s,@PYTHONFRAMEWORKINSTALLDIR@,$PYTHONFRAMEWORKINSTALLDIR,;t t
18891s,@MACHDEP@,$MACHDEP,;t t
18892s,@SGI_ABI@,$SGI_ABI,;t t
Jack Jansen83f898c2002-12-30 22:23:40 +000018893s,@EXTRAPLATDIR@,$EXTRAPLATDIR,;t t
Jack Jansen7b59b422003-03-17 15:44:10 +000018894s,@EXTRAMACHDEPPATH@,$EXTRAMACHDEPPATH,;t t
Jack Jansen6b08a402004-06-03 12:41:45 +000018895s,@CONFIGURE_MACOSX_DEPLOYMENT_TARGET@,$CONFIGURE_MACOSX_DEPLOYMENT_TARGET,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018896s,@CXX@,$CXX,;t t
18897s,@MAINOBJ@,$MAINOBJ,;t t
18898s,@EXEEXT@,$EXEEXT,;t t
18899s,@CC@,$CC,;t t
18900s,@CFLAGS@,$CFLAGS,;t t
18901s,@LDFLAGS@,$LDFLAGS,;t t
18902s,@CPPFLAGS@,$CPPFLAGS,;t t
18903s,@ac_ct_CC@,$ac_ct_CC,;t t
18904s,@OBJEXT@,$OBJEXT,;t t
18905s,@CPP@,$CPP,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018906s,@EGREP@,$EGREP,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018907s,@BUILDEXEEXT@,$BUILDEXEEXT,;t t
18908s,@LIBRARY@,$LIBRARY,;t t
18909s,@LDLIBRARY@,$LDLIBRARY,;t t
18910s,@DLLLIBRARY@,$DLLLIBRARY,;t t
18911s,@BLDLIBRARY@,$BLDLIBRARY,;t t
18912s,@LDLIBRARYDIR@,$LDLIBRARYDIR,;t t
18913s,@INSTSONAME@,$INSTSONAME,;t t
18914s,@RUNSHARED@,$RUNSHARED,;t t
18915s,@LINKCC@,$LINKCC,;t t
18916s,@RANLIB@,$RANLIB,;t t
18917s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18918s,@AR@,$AR,;t t
18919s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18920s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18921s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18922s,@LN@,$LN,;t t
18923s,@OPT@,$OPT,;t t
Skip Montanarodecc6a42003-01-01 20:07:49 +000018924s,@BASECFLAGS@,$BASECFLAGS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018925s,@LIBTOOL_CRUFT@,$LIBTOOL_CRUFT,;t t
18926s,@SO@,$SO,;t t
18927s,@LDSHARED@,$LDSHARED,;t t
18928s,@BLDSHARED@,$BLDSHARED,;t t
18929s,@CCSHARED@,$CCSHARED,;t t
18930s,@LINKFORSHARED@,$LINKFORSHARED,;t t
18931s,@CFLAGSFORSHARED@,$CFLAGSFORSHARED,;t t
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018932s,@SHLIBS@,$SHLIBS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018933s,@USE_SIGNAL_MODULE@,$USE_SIGNAL_MODULE,;t t
18934s,@SIGNAL_OBJS@,$SIGNAL_OBJS,;t t
18935s,@USE_THREAD_MODULE@,$USE_THREAD_MODULE,;t t
18936s,@LDLAST@,$LDLAST,;t t
18937s,@THREADOBJ@,$THREADOBJ,;t t
18938s,@DLINCLDIR@,$DLINCLDIR,;t t
18939s,@DYNLOADFILE@,$DYNLOADFILE,;t t
18940s,@MACHDEP_OBJS@,$MACHDEP_OBJS,;t t
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018941s,@TRUE@,$TRUE,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018942s,@LIBOBJS@,$LIBOBJS,;t t
18943s,@HAVE_GETHOSTBYNAME_R_6_ARG@,$HAVE_GETHOSTBYNAME_R_6_ARG,;t t
18944s,@HAVE_GETHOSTBYNAME_R_5_ARG@,$HAVE_GETHOSTBYNAME_R_5_ARG,;t t
18945s,@HAVE_GETHOSTBYNAME_R_3_ARG@,$HAVE_GETHOSTBYNAME_R_3_ARG,;t t
18946s,@HAVE_GETHOSTBYNAME_R@,$HAVE_GETHOSTBYNAME_R,;t t
18947s,@HAVE_GETHOSTBYNAME@,$HAVE_GETHOSTBYNAME,;t t
18948s,@LIBM@,$LIBM,;t t
18949s,@LIBC@,$LIBC,;t t
18950s,@UNICODE_OBJS@,$UNICODE_OBJS,;t t
18951s,@THREADHEADERS@,$THREADHEADERS,;t t
18952s,@SRCDIRS@,$SRCDIRS,;t t
Skip Montanaro6dead952003-09-25 14:50:04 +000018953s,@LTLIBOBJS@,$LTLIBOBJS,;t t
Martin v. Löwis11437992002-04-12 09:54:03 +000018954CEOF
18955
18956_ACEOF
18957
18958 cat >>$CONFIG_STATUS <<\_ACEOF
18959 # Split the substitutions into bite-sized pieces for seds with
18960 # small command number limits, like on Digital OSF/1 and HP-UX.
18961 ac_max_sed_lines=48
18962 ac_sed_frag=1 # Number of current file.
18963 ac_beg=1 # First line for current file.
18964 ac_end=$ac_max_sed_lines # Line after last line for current file.
18965 ac_more_lines=:
18966 ac_sed_cmds=
18967 while $ac_more_lines; do
18968 if test $ac_beg -gt 1; then
18969 sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18970 else
18971 sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18972 fi
18973 if test ! -s $tmp/subs.frag; then
18974 ac_more_lines=false
18975 else
18976 # The purpose of the label and of the branching condition is to
18977 # speed up the sed processing (if there are no `@' at all, there
18978 # is no need to browse any of the substitutions).
18979 # These are the two extra sed commands mentioned above.
18980 (echo ':t
18981 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18982 if test -z "$ac_sed_cmds"; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018983 ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000018984 else
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000018985 ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
Martin v. Löwis11437992002-04-12 09:54:03 +000018986 fi
18987 ac_sed_frag=`expr $ac_sed_frag + 1`
18988 ac_beg=$ac_end
18989 ac_end=`expr $ac_end + $ac_max_sed_lines`
18990 fi
18991 done
18992 if test -z "$ac_sed_cmds"; then
18993 ac_sed_cmds=cat
18994 fi
18995fi # test -n "$CONFIG_FILES"
18996
18997_ACEOF
18998cat >>$CONFIG_STATUS <<\_ACEOF
18999for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19000 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19001 case $ac_file in
19002 - | *:- | *:-:* ) # input from stdin
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019003 cat >$tmp/stdin
19004 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19005 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019006 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019007 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019008 * ) ac_file_in=$ac_file.in ;;
19009 esac
19010
19011 # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19012 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19013$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019014 X"$ac_file" : 'X\(//\)[^/]' \| \
19015 X"$ac_file" : 'X\(//\)$' \| \
19016 X"$ac_file" : 'X\(/\)' \| \
19017 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000019018echo X"$ac_file" |
19019 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19020 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19021 /^X\(\/\/\)$/{ s//\1/; q; }
19022 /^X\(\/\).*/{ s//\1/; q; }
19023 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019024 { if $as_mkdir_p; then
19025 mkdir -p "$ac_dir"
19026 else
19027 as_dir="$ac_dir"
19028 as_dirs=
19029 while test ! -d "$as_dir"; do
19030 as_dirs="$as_dir $as_dirs"
19031 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19032$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019033 X"$as_dir" : 'X\(//\)[^/]' \| \
19034 X"$as_dir" : 'X\(//\)$' \| \
19035 X"$as_dir" : 'X\(/\)' \| \
19036 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000019037echo X"$as_dir" |
19038 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19039 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19040 /^X\(\/\/\)$/{ s//\1/; q; }
19041 /^X\(\/\).*/{ s//\1/; q; }
19042 s/.*/./; q'`
19043 done
19044 test ! -n "$as_dirs" || mkdir $as_dirs
19045 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19046echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19047 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019048
19049 ac_builddir=.
19050
19051if test "$ac_dir" != .; then
19052 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
19053 # A "../" for each directory in $ac_dir_suffix.
19054 ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
19055else
19056 ac_dir_suffix= ac_top_builddir=
19057fi
19058
19059case $srcdir in
19060 .) # No --srcdir option. We are building in place.
19061 ac_srcdir=.
19062 if test -z "$ac_top_builddir"; then
19063 ac_top_srcdir=.
19064 else
19065 ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
19066 fi ;;
19067 [\\/]* | ?:[\\/]* ) # Absolute path.
19068 ac_srcdir=$srcdir$ac_dir_suffix;
19069 ac_top_srcdir=$srcdir ;;
19070 *) # Relative path.
19071 ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
19072 ac_top_srcdir=$ac_top_builddir$srcdir ;;
19073esac
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019074# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
19075# absolute.
19076ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
19077ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
19078ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
19079ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
Martin v. Löwis11437992002-04-12 09:54:03 +000019080
19081
19082 case $INSTALL in
19083 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19084 *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
19085 esac
19086
19087 if test x"$ac_file" != x-; then
19088 { echo "$as_me:$LINENO: creating $ac_file" >&5
19089echo "$as_me: creating $ac_file" >&6;}
19090 rm -f "$ac_file"
19091 fi
19092 # Let's still pretend it is `configure' which instantiates (i.e., don't
19093 # use $as_me), people would be surprised to read:
19094 # /* config.h. Generated by config.status. */
19095 if test x"$ac_file" = x-; then
19096 configure_input=
19097 else
19098 configure_input="$ac_file. "
19099 fi
19100 configure_input=$configure_input"Generated from `echo $ac_file_in |
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019101 sed 's,.*/,,'` by configure."
Martin v. Löwis11437992002-04-12 09:54:03 +000019102
19103 # First look for the input files in the build tree, otherwise in the
19104 # src tree.
19105 ac_file_inputs=`IFS=:
19106 for f in $ac_file_in; do
19107 case $f in
19108 -) echo $tmp/stdin ;;
19109 [\\/$]*)
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019110 # Absolute (can't be DOS-style, as IFS=:)
19111 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019112echo "$as_me: error: cannot find input file: $f" >&2;}
19113 { (exit 1); exit 1; }; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019114 echo $f;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019115 *) # Relative
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019116 if test -f "$f"; then
19117 # Build tree
19118 echo $f
19119 elif test -f "$srcdir/$f"; then
19120 # Source tree
19121 echo $srcdir/$f
19122 else
19123 # /dev/null tree
19124 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019125echo "$as_me: error: cannot find input file: $f" >&2;}
19126 { (exit 1); exit 1; }; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019127 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019128 esac
19129 done` || { (exit 1); exit 1; }
19130_ACEOF
19131cat >>$CONFIG_STATUS <<_ACEOF
19132 sed "$ac_vpsub
19133$extrasub
19134_ACEOF
19135cat >>$CONFIG_STATUS <<\_ACEOF
19136:t
19137/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19138s,@configure_input@,$configure_input,;t t
19139s,@srcdir@,$ac_srcdir,;t t
19140s,@abs_srcdir@,$ac_abs_srcdir,;t t
19141s,@top_srcdir@,$ac_top_srcdir,;t t
19142s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
19143s,@builddir@,$ac_builddir,;t t
19144s,@abs_builddir@,$ac_abs_builddir,;t t
19145s,@top_builddir@,$ac_top_builddir,;t t
19146s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
19147s,@INSTALL@,$ac_INSTALL,;t t
19148" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19149 rm -f $tmp/stdin
19150 if test x"$ac_file" != x-; then
19151 mv $tmp/out $ac_file
19152 else
19153 cat $tmp/out
19154 rm -f $tmp/out
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019155 fi
19156
Martin v. Löwis11437992002-04-12 09:54:03 +000019157done
19158_ACEOF
19159cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019160
Martin v. Löwis11437992002-04-12 09:54:03 +000019161#
19162# CONFIG_HEADER section.
19163#
Guido van Rossum627b2d71993-12-24 10:39:16 +000019164
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019165# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19166# NAME is the cpp macro being defined and VALUE is the value it is being given.
Guido van Rossum7f43da71994-08-01 12:15:30 +000019167#
19168# ac_d sets the value in "#define NAME VALUE" lines.
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019169ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)'
19170ac_dB='[ ].*$,\1#\2'
Martin v. Löwis11437992002-04-12 09:54:03 +000019171ac_dC=' '
19172ac_dD=',;t'
19173# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019174ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
Martin v. Löwis11437992002-04-12 09:54:03 +000019175ac_uB='$,\1#\2define\3'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019176ac_uC=' '
Martin v. Löwis11437992002-04-12 09:54:03 +000019177ac_uD=',;t'
Guido van Rossum7f43da71994-08-01 12:15:30 +000019178
Martin v. Löwis11437992002-04-12 09:54:03 +000019179for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
Guido van Rossumf78abae1997-01-21 22:02:36 +000019180 # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
Martin v. Löwis11437992002-04-12 09:54:03 +000019181 case $ac_file in
19182 - | *:- | *:-:* ) # input from stdin
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019183 cat >$tmp/stdin
19184 ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19185 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019186 *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019187 ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019188 * ) ac_file_in=$ac_file.in ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019189 esac
19190
Martin v. Löwis11437992002-04-12 09:54:03 +000019191 test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
19192echo "$as_me: creating $ac_file" >&6;}
Guido van Rossum7f43da71994-08-01 12:15:30 +000019193
Martin v. Löwis11437992002-04-12 09:54:03 +000019194 # First look for the input files in the build tree, otherwise in the
19195 # src tree.
19196 ac_file_inputs=`IFS=:
19197 for f in $ac_file_in; do
19198 case $f in
19199 -) echo $tmp/stdin ;;
19200 [\\/$]*)
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019201 # Absolute (can't be DOS-style, as IFS=:)
19202 test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019203echo "$as_me: error: cannot find input file: $f" >&2;}
19204 { (exit 1); exit 1; }; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019205 echo $f;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019206 *) # Relative
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019207 if test -f "$f"; then
19208 # Build tree
19209 echo $f
19210 elif test -f "$srcdir/$f"; then
19211 # Source tree
19212 echo $srcdir/$f
19213 else
19214 # /dev/null tree
19215 { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019216echo "$as_me: error: cannot find input file: $f" >&2;}
19217 { (exit 1); exit 1; }; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019218 fi;;
Martin v. Löwis11437992002-04-12 09:54:03 +000019219 esac
19220 done` || { (exit 1); exit 1; }
19221 # Remove the trailing spaces.
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019222 sed 's/[ ]*$//' $ac_file_inputs >$tmp/in
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019223
Martin v. Löwis11437992002-04-12 09:54:03 +000019224_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019225
Martin v. Löwis11437992002-04-12 09:54:03 +000019226# Transform confdefs.h into two sed scripts, `conftest.defines' and
19227# `conftest.undefs', that substitutes the proper values into
19228# config.h.in to produce config.h. The first handles `#define'
19229# templates, and the second `#undef' templates.
19230# And first: Protect against being on the right side of a sed subst in
19231# config.status. Protect against being in an unquoted here document
19232# in config.status.
19233rm -f conftest.defines conftest.undefs
19234# Using a here document instead of a string reduces the quoting nightmare.
19235# Putting comments in sed scripts is not portable.
19236#
19237# `end' is used to avoid that the second main sed command (meant for
19238# 0-ary CPP macros) applies to n-ary macro definitions.
19239# See the Autoconf documentation for `clear'.
19240cat >confdef2sed.sed <<\_ACEOF
19241s/[\\&,]/\\&/g
19242s,[\\$`],\\&,g
19243t clear
19244: clear
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019245s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000019246t end
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019247s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
Martin v. Löwis11437992002-04-12 09:54:03 +000019248: end
19249_ACEOF
19250# If some macros were called several times there might be several times
19251# the same #defines, which is useless. Nevertheless, we may not want to
19252# sort them, since we want the *last* AC-DEFINE to be honored.
19253uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
19254sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
19255rm -f confdef2sed.sed
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019256
19257# This sed command replaces #undef with comments. This is necessary, for
19258# example, in the case of _POSIX_SOURCE, which is predefined and required
19259# on some systems where configure will not decide to define it.
Martin v. Löwis11437992002-04-12 09:54:03 +000019260cat >>conftest.undefs <<\_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019261s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
Martin v. Löwis11437992002-04-12 09:54:03 +000019262_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019263
Martin v. Löwis11437992002-04-12 09:54:03 +000019264# Break up conftest.defines because some shells have a limit on the size
19265# of here documents, and old seds have small limits too (100 cmds).
19266echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019267echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019268echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
19269echo ' :' >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019270rm -f conftest.tail
Martin v. Löwis11437992002-04-12 09:54:03 +000019271while grep . conftest.defines >/dev/null
Jack Jansendd19cf82001-12-06 22:36:17 +000019272do
Martin v. Löwis11437992002-04-12 09:54:03 +000019273 # Write a limited-size here document to $tmp/defines.sed.
19274 echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
19275 # Speed up: don't consider the non `#define' lines.
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019276 echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019277 # Work around the forget-to-reset-the-flag bug.
19278 echo 't clr' >>$CONFIG_STATUS
19279 echo ': clr' >>$CONFIG_STATUS
19280 sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019281 echo 'CEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000019282 sed -f $tmp/defines.sed $tmp/in >$tmp/out
19283 rm -f $tmp/in
19284 mv $tmp/out $tmp/in
19285' >>$CONFIG_STATUS
19286 sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
19287 rm -f conftest.defines
19288 mv conftest.tail conftest.defines
Jack Jansendd19cf82001-12-06 22:36:17 +000019289done
Martin v. Löwis11437992002-04-12 09:54:03 +000019290rm -f conftest.defines
Skip Montanaro6dead952003-09-25 14:50:04 +000019291echo ' fi # grep' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019292echo >>$CONFIG_STATUS
Jack Jansendd19cf82001-12-06 22:36:17 +000019293
Martin v. Löwis11437992002-04-12 09:54:03 +000019294# Break up conftest.undefs because some shells have a limit on the size
19295# of here documents, and old seds have small limits too (100 cmds).
19296echo ' # Handle all the #undef templates' >>$CONFIG_STATUS
19297rm -f conftest.tail
19298while grep . conftest.undefs >/dev/null
19299do
19300 # Write a limited-size here document to $tmp/undefs.sed.
19301 echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
19302 # Speed up: don't consider the non `#undef'
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019303 echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019304 # Work around the forget-to-reset-the-flag bug.
19305 echo 't clr' >>$CONFIG_STATUS
19306 echo ': clr' >>$CONFIG_STATUS
19307 sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
19308 echo 'CEOF
19309 sed -f $tmp/undefs.sed $tmp/in >$tmp/out
19310 rm -f $tmp/in
19311 mv $tmp/out $tmp/in
19312' >>$CONFIG_STATUS
19313 sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
19314 rm -f conftest.undefs
19315 mv conftest.tail conftest.undefs
19316done
19317rm -f conftest.undefs
19318
19319cat >>$CONFIG_STATUS <<\_ACEOF
19320 # Let's still pretend it is `configure' which instantiates (i.e., don't
19321 # use $as_me), people would be surprised to read:
19322 # /* config.h. Generated by config.status. */
19323 if test x"$ac_file" = x-; then
19324 echo "/* Generated by configure. */" >$tmp/config.h
Guido van Rossum7f43da71994-08-01 12:15:30 +000019325 else
Martin v. Löwis11437992002-04-12 09:54:03 +000019326 echo "/* $ac_file. Generated by configure. */" >$tmp/config.h
Jack Jansendd19cf82001-12-06 22:36:17 +000019327 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019328 cat $tmp/in >>$tmp/config.h
19329 rm -f $tmp/in
19330 if test x"$ac_file" != x-; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019331 if diff $ac_file $tmp/config.h >/dev/null 2>&1; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019332 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
19333echo "$as_me: $ac_file is unchanged" >&6;}
19334 else
19335 ac_dir=`(dirname "$ac_file") 2>/dev/null ||
19336$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019337 X"$ac_file" : 'X\(//\)[^/]' \| \
19338 X"$ac_file" : 'X\(//\)$' \| \
19339 X"$ac_file" : 'X\(/\)' \| \
19340 . : '\(.\)' 2>/dev/null ||
Martin v. Löwis11437992002-04-12 09:54:03 +000019341echo X"$ac_file" |
19342 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19343 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19344 /^X\(\/\/\)$/{ s//\1/; q; }
19345 /^X\(\/\).*/{ s//\1/; q; }
19346 s/.*/./; q'`
Skip Montanaro6dead952003-09-25 14:50:04 +000019347 { if $as_mkdir_p; then
19348 mkdir -p "$ac_dir"
19349 else
19350 as_dir="$ac_dir"
19351 as_dirs=
19352 while test ! -d "$as_dir"; do
19353 as_dirs="$as_dir $as_dirs"
19354 as_dir=`(dirname "$as_dir") 2>/dev/null ||
19355$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000019356 X"$as_dir" : 'X\(//\)[^/]' \| \
19357 X"$as_dir" : 'X\(//\)$' \| \
19358 X"$as_dir" : 'X\(/\)' \| \
19359 . : '\(.\)' 2>/dev/null ||
Skip Montanaro6dead952003-09-25 14:50:04 +000019360echo X"$as_dir" |
19361 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19362 /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19363 /^X\(\/\/\)$/{ s//\1/; q; }
19364 /^X\(\/\).*/{ s//\1/; q; }
19365 s/.*/./; q'`
19366 done
19367 test ! -n "$as_dirs" || mkdir $as_dirs
19368 fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
19369echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
19370 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019371
Martin v. Löwis11437992002-04-12 09:54:03 +000019372 rm -f $ac_file
19373 mv $tmp/config.h $ac_file
19374 fi
19375 else
19376 cat $tmp/config.h
19377 rm -f $tmp/config.h
19378 fi
19379done
19380_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000019381
Martin v. Löwis11437992002-04-12 09:54:03 +000019382cat >>$CONFIG_STATUS <<\_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019383
Martin v. Löwis11437992002-04-12 09:54:03 +000019384{ (exit 0); exit 0; }
19385_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019386chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000019387ac_clean_files=$ac_clean_files_save
19388
19389
19390# configure is writing to config.log, and then calls config.status.
19391# config.status does its own redirection, appending to config.log.
19392# Unfortunately, on DOS this fails, as config.log is still kept open
19393# by configure, so config.status won't be able to write to it; its
19394# output is simply discarded. So we exec the FD to /dev/null,
19395# effectively closing config.log, so it can be properly (re)opened and
19396# appended to by config.status. When coming back to configure, we
19397# need to make the FD available again.
19398if test "$no_create" != yes; then
19399 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000019400 ac_config_status_args=
19401 test "$silent" = yes &&
19402 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000019403 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000019404 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000019405 exec 5>>config.log
19406 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19407 # would make configure fail if this is the last instruction.
19408 $ac_cs_success || { (exit 1); exit 1; }
19409fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019410
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000019411
19412echo "creating Setup"
19413if test ! -f Modules/Setup
19414then
19415 cp $srcdir/Modules/Setup.dist Modules/Setup
19416fi
19417
19418echo "creating Setup.local"
19419if test ! -f Modules/Setup.local
19420then
19421 echo "# Edit this file for local setup changes" >Modules/Setup.local
19422fi
19423
19424echo "creating Makefile"
19425$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
19426 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000019427 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000019428mv config.c Modules